We describe a recipe that works on the lxplus cluster, using CMSSW_3_1_0_pre11, following the generic instructions given in
CMS.ProdCfgFileGuide21X.
Make a directory for the Starter Kit and create a new project area. (You might want to consider creating this directory in your scratch0 directory, since your assigned space on lxplus is limited):
mkdir MyQuarkonia
cd MyQuarkonia
scramv1 list CMSSW #provides you with a list of currently installed CMSSW versions
scramv1 project CMSSW CMSSW_3_1_0_pre11
cd CMSSW_3_1_0_pre11/src
cmsenv
Check out the generation config files from the CVS repository:
cvs co Configuration/CMS.GenProduction
In case you have already a config file (or have modified a file in this directory) compile it:
cp /PATH/TO/YOUR/CFG/YOUR-CONFIG-FILENAME_cff.py ./Configuration/CMS.GenProduction/python
scramv1 b
The cmsDriver.py utility (which you can use once you've setup your CMSSW session with the command "cmsenv") can be used to generate a full configuration (python) script that uses your generation fragment, and adds code to do the individual steps from the generation up to the digitization and HLT emission (clearly, depending on how far you want to go in your simulation, you can only use a subset of the tags following the -s option). Go into the directory in which you want to do your generation and the subsequent analysis. E.g. you could checkout the code for the analyzer you want to use lateron (e.g. cvs co HeavyFlavorAnalysis/Onia2MuMu) and work in the subdirectory /test or /scripts. Now you are ready to create the generation and simulation configuration script:
cmsDriver.py Configuration/CMS.GenProduction/python/PYTHIA6_JPsi_10TeV_cff.py \
-s GEN:ProductionFilterSequence,SIM,DIGI,L1,DIGI2RAW,HLT \
--eventcontent RAWSIM \
--datatier GEN-SIM-RAW \
--conditions FrontierConditions_CMS.GlobalTag,STARTUP31X_V1::All \
-n 5000 \
--no_exec
Note that for versions 34X onwards the snippet "GEN:ProductionFilterSequence" should be replaced by "GEN" only. (See also
Updates on cmsDriver.py and
Updates on Generation for releases of 34X onwards). This will produce a file called "PYTHIA6_JPsi_10TeV_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_HLT_STARTUP31X.py" that will generate 5000 events. For an explanation of all the option of the "cmsDriver.py" command, consult
ComposeFullSimConfig; for explanations concerning the language used in the simulation config file, consult
WalkThroughCfg.
Check now if the cuts on the generator level are to your satisfaction. In order to use this script with version 31X change the lines
process.source = cms.Source("PythiaSource",
comEnergy = cms.untracked.double(10000.0),
process.ProductionFilterSequence = cms.Sequence(process.oniafilter*process.mumugenfilter)
to
process.source = cms.Source("EmptySource")
process.generator = cms.EDFilter("Pythia6GeneratorFilter",
comEnergy = cms.double(10000.0),
process.ProductionFilterSequence = cms.Sequence(process.generator*process.oniafilter*process.mumugenfilter)
and then start the simulation with the command
cmsRun PYTHIA6_JPsi_10TeV_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_HLT_STARTUP31X.py
The second step is to do the reconstruction. The corresponding configuration file can again be created using the cmsDriver.py utility. Note that HLT and RECO cannot be run at the same time (software conflicts) and, hence, two steps are necessary.
cmsDriver.py Configuration/CMS.GenProduction/python/PYTHIA6_JPsi_10TeV_cff.py \
-s RAW2DIGI,RECO \
--filein file:PYTHIA6_JPsi_10TeV_cff_py_GEN_SIM_DIGI_L1_DIGI2RAW_HLT.root \
--eventcontent RECOSIM \
--datatier GEN-SIM-RECO \
--conditions FrontierConditions_CMS.GlobalTag,STARTUP31X_V1::All \
-n -1 \
--no_exec
This will create a second configuration file, called "PYTHIA6_JPsi_10TeV_cff_py_RAW2DIGI_RECO_STARTUP31X.py". The reconstruction can be achieved by executing the script via the command
cmsRun PYTHIA6_JPsi_10TeV_cff_py_RAW2DIGI_RECO_STARTUP31X.py
Its output is a root file with name "PYTHIA6_JPsi_10TeV_cff_py_RAW2DIGI_RECO.root". Due to the fact that only a small fraction of the initially generated 5000 events fell into the detector's acceptance (muons must be within |eta| < 2.4 and have pT > 2.5
GeV/c), the number of reconstructed events in this sample is (only) 34. Its output can be inspected in a root session using a TBrowser. The TTree "Events" contains a lot of RECO objects of which the branch "recoMuons_muons__RECO" is of interest to us. It contains the muon objects "recoMuons_muons__RECO.obj" that contain the info about the individual muons. Clicking on the muons' methods, like charge, eta, pT, IsCaloMuon, ... you can plot the distribution of the fully reconstructed muons. "size" is a variable that shows how many muons were reconstructed in each event that passed the generator filter cuts. The fact that there are events with up to 4 reconstructed muons shows that not only the muons of the J/psi give rise to reconstructed muons. Together with charmonium we simulated the underlying event that on one hand contains further muons (e.g. from pion, kaon, open charm decays) or contributes to reconstructing fake muons due to the larger hit multiplicites.
After these two steps (generation/detector simulation and reconstruction) you are ready to further process the events with a given analyzer. The usage of the individual analyzer of the B-physics group can be found in the section
Analysis software.