Beam Spot SW Guide

Contents

Introduction

TBD.

Simulation of the beam spot

TBD.

Measure the beam spot

cmsrel CMSSW_2_1_9
cd CMSSW_2_1_9/src
cmsenv
cvs co RecoVertex/BeamSpotProducer
scram b -j4
cd RecoVertex/BeamSpotProducer/test

Edit the file analyze_d0_phi_cfg.py with the dataset you want to use. Note that a collection of reconstructed tracks must be available in the dataset.

cmsRun analyze_d0_phi_cfg.py

The last part of the output would have lines like these:

-------------------------------------


 Total number of events processed: 1500

-------------------------------------


 calculating beam spot...
 we will use 865 good tracks out of 23038
 number of tracks used: 0
 number of tracks used: 865
 number of tracks used: 865
 number of tracks used: 865
 number of tracks used: 865
 number of tracks used: 865
 number of tracks used: 864
 number of tracks used: 861
 number of tracks used: 856
 number of tracks used: 852
 number of tracks used: 849
 number of tracks used: 846
 number of tracks used: 833
 number of tracks used: 821
 number of tracks used: 782
 number of tracks used: 690
 number of tracks used: 558
 total number of iterations = 16
BSFitter: default fit does not extract beam width, assigning a width of zero.

 RESULTS OF DEFAULT FIT:
-----------------------------------------------------
            Calculated Beam Spot

   X0 = 0.0269609 +/- 0.00105306 [cm]
   Y0 = -0.0113844 +/- 0.0010433 [cm]
   Z0 = -0.19446 +/- 0.869978 [cm]
 Sigma Z0 = 3.67511 +/- 0.797522 [cm]
 dxdz = 0.000207963 +/- 0.000252846 [radians]
 dydz = -0.000114872 +/- 0.00024516 [radians]
 Beam Width = 0 +/- 0 [cm]
-----------------------------------------------------


[BeamSpotAnalyzer] endJob done 

The output of the fit is also saved in a flat file (for the moment, the default name is EarlyCollision.txt)

test > more EarlyCollision.txt
X 0.0269609
Y -0.0113844
Z -0.19446
sigmaZ 3.67511
dxdz 0.000207963
dydz -0.000114872
BeamWidth 0
Cov(0,j) 1.10894e-06 -2.80517e-08 0 0 0 0 0 
Cov(1,j) -2.80517e-08 1.08848e-06 0 0 0 0 0 
Cov(2,j) 0 0 0.756862 0 0 0 0 
Cov(3,j) 0 0 0 0.636041 0 0 0 
Cov(4,j) 0 0 0 0 6.39311e-08 4.89863e-09 0 
Cov(5,j) 0 0 0 0 4.89863e-09 6.01036e-08 0 
Cov(6,j) 0 0 0 0 0 0 0

As you can see, the result of the fit does not include the beam width. We are not running the extend fit to get the beam profile because this procedure needs a more detail analysis. For the moment, we include by hand the beam width and its error in the flat file which will be uploaded to the database.

Produce your private beam spot calibration

The following recipe can be used to use your own beam spot calibration in the reconstruction. For example, if you simulated a new sample with a different beam scenario, you can use this procedure to use in the reconstruction the new beam line position.

First, you need to calculate the beam position of your customized sample. Please follow the instructions of how to measure the beam spot. Then you can upload the new beam position to the DB either the condition DB or a sqlite DB file:

cmsrel CMSSW_2_1_9
cd CMSSW_2_1_9/src
cmsenv
cvs co RecoVertex/BeamSpotProducer
scram b -j 4
cd RecoVertex/BeamSpotProducer/test
cmsRun write2DB.py

Edit the configuration file "write2DB.py" accordingly if you want to upload a new payload to the DB or to save the data to a sqlite file.

You can test the new payload by reading back from the DB:

cmsRun readDB.py

Notice that you always need to define a tag name and its IOV for a given new beam position.

In your analyzer then you can use the configuration from the "readDB.py" to load your new beam position:

process.load("CondCore.DBCommon.CondDBCommon_cfi")

# PRODUCE A SQLITE FILE

process.CondDBCommon.connect = "sqlite_file:EarlyCollision.db"
process.CondDBCommon.DBParameters.authenticationPath = '/afs/cern.ch/cms/DB/conddb'


process.PoolDBOutputService = cms.Service("PoolDBOutputService",
                                          process.CondDBCommon,
                                          toPut = cms.VPSet(cms.PSet(
    record = cms.string('BeamSpotObjectsRcd'),
    tag = cms.string('Early900GeVCollision_7p4cm_V1_IDEAL_V10')
))
)

Estimate a new beam position using a new alignment

ssh lxplus.cern.ch
ssh cmsusr1
tcsh
setenv SCRAM_ARCH slc4_ia32_gcc345
source /nfshome0/cmssw2/scripts/setup.csh
cmsrel CMSSW_2_1_9
cd CMSSW_2_1_9/src
cmsenv
cmscvsroot CMSSW
addpkg RecoVertex/BeamSpotProducer
scram b -j4

(Old) Samples with displaced and tilted beam spot

Fully simulated and reconstructed samples have been produced with a more realistic collision. These test samples can be used to check the whole reconstruction in presence of a displaced and tilted beam spot. The samples were generated ans simulated using CMSSW 1.4.5 plus tags (V01-00-30 IOMC/EventVertexGenerators and V00-13-00 SimDataFormats/HepMCProduct) and reconstructed with CMSSW 1.5.4 (Thanks to Dave Mason for helping us to produce these samples).

Type Description Vtx Smearing cfg DBS link cff for beam spot Producer
RecoVertex/BeamSpotProducer/data/
SimpleGaussian position at (0,0,0), Z RMS is 5.3 cm, beam width 15 μm, no crossing angle cfg current MC production BeamSpotSimpleGaussian.cff
EarlyCollision displaced at (322,0,0) μm, Z RMS is 7.55 cm, beam width 31.7 μm, no crossing angle cfg cff BeamSpotEarlyCollision.cff
NominalCollision displaced at (500,0,0) μm, Z RMS is 7.55 cm, beam width 16.6 μm, XZ half-crossing beam angle 142x10-6 cfg cff BeamSpotNominalCollision.cff
NominalCollision1 displaced at (500,250,0) μm, Z RMS is 7.55 cm, beam width 16.6 μm, no crossing angle cfg cff BeamSpotNominalCollision1.cff
NominalCollision2 displaced at (500,250,0) μm, Z RMS is 7.55 cm, beam width 16.6 μm, XZ half-crossing beam angle 142x10-6 cfg cff BeamSpotNominalCollision2.cff
NominalCollision3 displaced at (0.1,0.025,0) cm, Z RMS is 7.55 cm, beam width 16.6 μm, no crossing angle cfg cff BeamSpotNominalCollision3.cff
NominalCollision4 displaced at (0.2,0.025,0) cm, Z RMS is 7.55 cm, beam width 16.6 μm, no crossing angle cfg cff BeamSpotNominalCollision4.cff

-- FranciscoYumiceva - 24 Sep 2008

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2008-09-25 - FranciscoYumiceva
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback