Home
MC Generation, Simulation and Reconstruction
Step 1: Generating MC event swith PYTHIA
To produce python files which generate, simulate and reconstruct we use the cmsDriver.py procedure. The generation phase uses special pythia card files to produce a python file which can be run with cmsRun. You can find a large list of example cards in the directory Configuration/GenProduction/python.
1) Use cmsDriver.py to make a executable python file
Use the following commands:
cmsDriver.py "your card file's name" -s GEN,SIM \
--conditions auto:mc \
--datatier GEN-SIM \
--eventcontent RAWSIM \
--beamspot Realistic7TeV2011Collision \
--no_exec
You will need to include the following line of code anywhere after the Configuration.StandardSequences.Services_cff is loaded:
process.RandomNumberGeneratorService.generator.initialSeed = cms.untracked.uint32(##RANDOMSEED##)
where you replace ##RANDOMSEED## with a random number. For those of you used to running on CRAB, this was done automatically, but for running locally it must be done by hand.
*N.B. The --beamspot tag is for the 7TeV 2011 collisions, there is probably a new thing named: Realistic8TeV2012Collision, but I'm not sure.
After you do that you will get some messages and then a new file will be produced in the directory you're working with with "the name of your Pythia card file".py. Inside this file you will find a place to:
a) Change the numbers of events (this can be done at the cmsDriver.py stage, but I don't see the reason why)
b) Edit the PYTHIA information
c) Chage the output file name and location
2) Running a generation job with cmsRun
I suggest you do all three and run a small job (100 evts) using the command:
cmsRun "your file's name".py
The next step does the digitization and is also the step to add pile up.
Go on to step 2: Simulating and digitizing MC events
Christopher Edward Justus
Last modified: Tue May 18 14:15:15 PDT 2010