TWiki> CMSPublic Web>SWGuide>SWGuideFastSimulation (revision 35)EditAttachPDF

Fast Simulation User Guide

We welcome all suggestions to improved the FastSim documentation.
Feel free to bug the people listed under SWGuideFastSimulation#Contacts.

Contacts

Links

Standard recipe for the generation and simulation of ttbar events

See SWGuideFastSimulationExamples

Recommended CMSSW releases

releas cylce use case recommended releases
CMSSW_4_2_X Summer11 campaign ≥ CMSSW_4_2_8_patch4
CMSSW_4_4_X Fall11 campaign ≥ CMSSW_4_4_3_patch1
CMSSW_5_2_X Summer12 campaign ≥ CMSSW_5_2_6
CMSSW_5_3_X recommended for analysis of 2012 data ≥ CMSSW_5_3_6
CMSSW_7_0_X CSA14 ≥ CMSSW_7_0_3
CMSSW_7_1_X - ≥ CMSSW_7_1_0
CMSSW_7_2_X - -
CMSSW_7_3_X - -
CMSSW_7_4_X start of run2 CMSSW_7_4_0
CMSSW_7_5_X development CMSSW_7_5_0_pre2 or later

Relevant cmsDriver options

The cmsDriver.py command is documented here (outdated) and here (incomplete) and in cmsDriver.py --help . The next table lists and explains the options relevant for FastSim.

Example cmsDriver.py commands for the fast simulation are available on SWGuideFastSimulationExamples.

GENFRAGMENT.py
(1st argument)
Define the "genfragment" that configures the event gen-content. For more info see below
--fast tells cmsDriver.py to use FastSim (default is FullSim). This option is in place since CMSSW_6_2_X. For the old syntax, see examples.
-s STEP1,STEP2,... note: in CMSSW_7_5_0_pre2 the step syntax changes, documentation is provided here: SWGuideFastSimulationSteps75X.

Comma separated sequence of steps. Each step itself is a sequence of algorithms for event generation (GEN), detector simulation (SIM), reconstruction (RECO), ... . The available steps and their definitions are listed here (outdated) and here (incomplete). Most purposes are covered by one of the following combinations of steps.

Commonly used combinations of steps :
  • -s GEN,SIM, run generation and detector simulation
  • -s GEN,SIM,RECO, the above + event reconstruction
  • -s GEN,SIM,RECO,HLT:GRun, the above + HLT
  • -s GEN,SIM,RECO,HLT:GRun,VALIDATION, the above + production of validation plots (DQM)
  • -s GEN,SIM,HLT:GRun, run generation, detector simulation and HLT
  • -s HARVESTING:validationHarvestingFS, "Harvest" validation plots, see examples for usage. Harvesting turns the complicated DQMio files into plain root files)
Note: for the old syntax, < CMSSW_6_2_X, see examples.

Selecting the HLT menu
The HLT menu is selected in the steps with the syntax HLT:<MENU>. Some examples for CMSSW_7_X:
  • -s GEN,SIM,RECO,HLT:GRun --conditions=auto:startup_GRun to use the development HTL menu
  • -s GEN,FASTSIM,HLT:2013 --conditions=auto:startup_2013 to use the frozen HLT menu "2013"
To find out which HLT menus are available for FastSim in your favourite release: each available HLT menu XXX has a corresponding file HLTrigger/Configuration/python/HLT_X_Famos_cff.py.
Note that, in the examples above, there is a correspondence between the HLT menu name and the last part of the --conditions option.
This correspondance is not obligatory, but usually it is recommended.
The HLT depends on the conditions for e.g. subdetector calibrations, channel mappings, geometry, and, at higher-level for e.g. jet energy corrections etc.
WARNING related to VALIDATION step

It is currently not possible to run the VALIDATION step in a standalone manner. Please run validation together with GEN,SIM and RECO steps.
--conditions=CONDITIONS Define the conditions, such as calibration, alignment and noise levels. See SWGuideFrontierConditions for available conditions.
(Missing: most common examples. syntax: what's before the colon what's after it what is the meaning of "startup" and why is the trigger menu specified there)
--pileup=PUSCENARIO define pileup scenario.

Situation since CMSSW_7_4_0_pre6: All pileup scenarios available for FullSim are automatically available for FastSim.When you specify a pileup option you will get 'DIGI-RECO-level' pileup mixing, which includes OOT pileup in the calorimeters and muon system.When you prepend the pileup option with GEN_ you will get 'GEN-level'-mixing, which includes no OOT pileup.
Pileup scenarios are defined in Configuration/StandardSequences/python/Mixing.py. For each available pileup option X there is a line
addMixingScenario("X","Y"), where Y points to the configuration file or provides parameters that define the pileup scenario.
GEN-mixing will run out of the box, minbias files are shipped with the release, but GEN-mixing will soon be deprecated.
To make DIGI-RECO mixing work, see SWGuideFastSimulationExamples#Recipes_for_DIGI_RECO_pileup_mix.
Situation before CMSSW_7_4_0_pre6: Following pileup scenarios are avialble
  • --pileup=NoPileUp no pileup
  • --pileup=FlatDist10_2011EarlyData_inTimeOnly, 7 TeV, coherent with Summer11 FullSim
  • --pileup=E7TeV_Fall2011_Reprocess_inTimeOnly, 7 TeV, coherent with Fall11 FullSim
  • --pileup=E7TeV_ProbDist_2011Data_inTimeOnly, 7 TeV, corresponds to the actual pileup profile in the full 2011 dataset
  • --pileup=2012_Startup_inTimeOnly, 8 TeV, coherent with Spring12 FullSim
  • --pileup=2012_Summer_inTimeOnly, 8 TeV, coherent with Summer12 FullSim
  • --pileup=CSA14_inTimeOnly, 13 TeV, coherent with FullSim option CSA14_50ns_PoissonOOT
Pileup scenarios are defined in Configuration/StandardSequences/python/Mixing.py. For each pileup option X available for FastSim there is a line
addMixingScenario("FS_X","Y"), where Y points to the configuration file or provides parameters that define the pileup scenario.
--eventcontent=EVENTCONTENT defines which information of the events will be written to the output file. see header of Configuration/EventContent/python/EventContent_cff.py for available options and their definition.
--datatier=DATATIER A flag to specify metadata in your output file. Not much to care about.
-n number of events to be produced/processed
--no_exec only produce the CMSSW configuration file, do not run it.
--filein=FILE read input files from FILE
examples
  • --filein=file:YourLHEFile.lhe --filetype=LHE when using lhe files as input
  • --filein=mcdb:ID for LHE files in mcdb, where ID corresponds to the article ID
  • --filein=file:YourEDMFile.root read gen information from existing EDM files ( see bug warning )
  • Note that when using lhe files as input, your genfragment must be configured to perform showering and hadronization, depending on how your lhe files were generated.See option GENFRAGMENT.py for more info about genfragments.
bug warning: reading from EDM files results in double vertex smearing, leading to a significant reduction of track reconstruction efficiencies. You can fix this as explained here TODO: how to read files from das
--filetype=FILETYPE use this option when using an input file that is not in EDM format, see option --filein for use cases
--geometry=GEOMETRY NOTE: This option has no effect on FastSim
--customise=PACKAGE.FUNCTION Apply function FUNCTION from package PACKAGE at the end of the simulation configuration. E.g. --customise=SLHCUpgradeSimulations.Configuration.postLS1Customs configures FastSim for run2 (after 2014) by applying the function postLS1Customs(process) in the directory SLHCUpgradeSimulations/Configuration/python
--magField=MAGFIELD Use magnetic field description MAGFIELD. The default description is the run1 description (before 2013). To load the run2 description (after 2014) use --magField=38T_PostLS1

How to configure the gen-level content: 'genfragments'

Note: this topic is not FastSim specific.

When cmsDriver is configured to include the GEN step, the first argument of the cmsDriver configures the GEN-content of the events. This first argument points to a configuration file that defines an object named generator. Some example of genfragments are:

Case 1: The genfragment of your choice is available in the CMSSW release of your choice

  • Check whether your genfragment is indeed available: you can do that e.g. on github. For e.g. CMSSW_7_4_0_pre5 you find all genfragments listed here. Adapt the link if you are interested in another link.
  • If it is not available, move to Case 2
  • If it is available, provide the filename of the genfragment to cmsDriver. E.g. say you'd like to use TTbarLepton_8TeV_TuneCUETP8M1_cfi.py, part of Configuration/Generator/python/ in CMSSW_7_4_0_pre5 do:
cmsDriver.py TTbarLepton_8TeV_TuneCUETP8M1_cfi.py <MORE OPTIONS>

Case 2: The genfragment of your choice is not available in the CMSSW release of your choice

Possibility 1: add the genfragment of your choice to Configuration/Generator inside your local area, e.g.:

# setup a local area
cmsrel CMSSW_7_4_0_pre5
cd CMSSW_7_4_0_pre5/src
cmsenv
# add the Configuration/Generator package to your local area
git cms-addpkg Configuration/Generator
# for the sake of this example: add a random genfragment to your local Configuration/Generator/python 
curl https://raw.githubusercontent.com/cms-sw/cmssw/CMSSW_7_2_0_pre1/Configuration/Generator/python/SingleElectronFlatPt5To100_cfi.py -o Configuration/Generator/python/mygun.py
# compile
scram b
# provide the filename of the genfragment as first argument to cmsDriver.py. If you like, you can strip the extension ==.py== from the filename.
cmsDriver.py mygun.py <MORE OPTIONS>

Possibility 2: add the genfragment of your choice to a package of your choice

# setup cmssw
cmsrel CMSSW_7_4_0_pre5
cd CMSSW_7_4_0_pre5/src
cmsenv
# create a package
mkdir MyPackage
cd MyPackage
mkedanlzr MyGun
# add a gen-fragment to your package and compile
curl https://raw.githubusercontent.com/cms-sw/cmssw/CMSSW_7_2_0_pre1/Configuration/Generator/python/SingleElectronFlatPt5To100_cfi.py -o MyGun/python/mygun.py
scram b
# specify the path relative to $CMSSW_BASE/src
cmsDriver.py MyPackage/MyGun/python/mygun.py <MORE OPTIONS>

==--

-- LukasVanelderen - 27 Mar 2014

Edit | Attach | Watch | Print version | History: r39 | r37 < r36 < r35 < r34 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r35 - 2015-04-21 - ColinBernet



 
    • 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-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback