CMS 3D CMS Logo

SimMuon_EventContent_cff.py
Go to the documentation of this file.
1 # The following comments couldn't be translated into the new config version:
2 
3 #save digis
4 
5 #save digis sim link and trigger infos
6 
7 import FWCore.ParameterSet.Config as cms
8 
9 # Used to make conditional changes for different running scenarios
10 
11 #Full Event content with DIGI
12 SimMuonFEVTDEBUG = cms.PSet(
13  outputCommands = cms.untracked.vstring('keep *_simMuonCSCDigis_*_*',
14  'keep *_simMuonDTDigis_*_*',
15  'keep *_simMuonRPCDigis_*_*')
16 )
17 #RAW content
18 SimMuonRAW = cms.PSet(
19  outputCommands = cms.untracked.vstring('keep StripDigiSimLinkedmDetSetVector_simMuonCSCDigis_*_*',
20  'keep CSCDetIdCSCComparatorDigiMuonDigiCollection_simMuonCSCDigis_*_*',
21  'keep DTLayerIdDTDigiSimLinkMuonDigiCollection_simMuonDTDigis_*_*',
22  'keep RPCDigiSimLinkedmDetSetVector_simMuonRPCDigis_*_*')
23 )
24 # Add extra collections if running in Run 2. Not sure why but these
25 # collections were added to pretty much all event content in the old
26 # customisation function.
27 from Configuration.Eras.Modifier_run2_common_cff import run2_common
28 run2_common.toModify( SimMuonRAW.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_simMuonCSCDigis_*_*') )
29 run2_common.toModify( SimMuonRAW.outputCommands, func=lambda outputCommands: outputCommands.append('keep *_simMuonRPCDigis_*_*') )
30 
31 # The merged SimDigi collections have mixData label, drop the signal-only ones
32 # Eventually (if/when we switch muon premixing to use SimHits) this whole customization
33 # can be removed as the collection names become the standard ones
34 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
35 premix_stage2.toModify(SimMuonFEVTDEBUG, outputCommands = [
36  'keep CSCDetIdCSCComparatorDigiMuonDigiCollection_mixData_*_*',
37  'keep CSCDetIdCSCStripDigiMuonDigiCollection_mixData_*_*',
38  'keep CSCDetIdCSCWireDigiMuonDigiCollection_mixData_*_*',
39  'keep DTLayerIdDTDigiMuonDigiCollection_mixData_*_*',
40  'keep RPCDetIdRPCDigiMuonDigiCollection_mixData_*_*',
41 ])
42 # Almost same (without DT) for SimMuonRAW following the run2_common customization
43 premix_stage2.toModify(SimMuonRAW, outputCommands = [
44  'keep *_mixData_MuonCSCStripDigiSimLinks_*',
45  'keep DTLayerIdDTDigiSimLinkMuonDigiCollection_mixData_*_*',
46  'keep *_mixData_RPCDigiSimLink_*',
47 ])
48 (run2_common & premix_stage2).toModify(SimMuonRAW, outputCommands = SimMuonRAW.outputCommands + [
49  'drop *_simMuonCSCDigis_*_*',
50  'drop *_simMuonRPCDigis_*_*',
51  'keep *_mixData_MuonCSCWireDigiSimLinks_*',
52  'keep CSCDetIdCSCComparatorDigiMuonDigiCollection_mixData_*_*',
53  'keep CSCDetIdCSCStripDigiMuonDigiCollection_mixData_*_*',
54  'keep CSCDetIdCSCWireDigiMuonDigiCollection_mixData_*_*',
55  'keep RPCDetIdRPCDigiMuonDigiCollection_mixData_*_*',
56 ])
57 
58 #RECO content
59 SimMuonRECO = cms.PSet(
60  outputCommands = cms.untracked.vstring('keep StripDigiSimLinkedmDetSetVector_simMuonCSCDigis_*_*',
61  'keep DTLayerIdDTDigiSimLinkMuonDigiCollection_simMuonDTDigis_*_*',
62  'keep RPCDigiSimLinkedmDetSetVector_simMuonRPCDigis_*_*')
63 )
64 # The merged DigiSimLink collections have mixData label, drop the signal-only ones
65 premix_stage2.toModify(SimMuonRECO, outputCommands = [
66  'keep *_mixData_MuonCSCStripDigiSimLinks_*',
67  'keep *_mixData_MuonCSCWireDigiSimLinks_*',
68  'keep *_mixData_RPCDigiSimLink_*',
69  'keep DTLayerIdDTDigiSimLinkMuonDigiCollection_mixData_*_*',
70 ])
71 
72 #AOD content
73 SimMuonAOD = cms.PSet(
74  outputCommands = cms.untracked.vstring(
75  # Sim matching information
76  'keep *_muonSimClassifier_*_*'
77  )
78 )
79 SimMuonRECO.outputCommands.extend(SimMuonAOD.outputCommands)
80 
81 # Event content for premixing library
82 SimMuonPREMIX = cms.PSet(
83  outputCommands = cms.untracked.vstring(
84  'keep *_simMuonDTDigis_*_*',
85  'keep *_simMuonCSCDigis_*_*',
86  'keep *_simMuonCscTriggerPrimitiveDigis_*_*',
87  'keep *_simMuonRPCDigis_*_*',
88  )
89 )
90 
91 from Configuration.Eras.Modifier_run2_GEM_2017_cff import run2_GEM_2017
92 run2_GEM_2017.toModify( SimMuonFEVTDEBUG, outputCommands = SimMuonFEVTDEBUG.outputCommands + ['keep *_simMuonGEMDigis_*_*',
93  'keep *_simMuonGEMPadDigis_*_*',
94  'keep *_simMuonGEMPadDigiClusters_*_*'] )
95 run2_GEM_2017.toModify( SimMuonRAW, outputCommands = SimMuonRAW.outputCommands + ['keep StripDigiSimLinkedmDetSetVector_simMuonGEMDigis_*_*'] )
96 run2_GEM_2017.toModify( SimMuonRECO, outputCommands = SimMuonRECO.outputCommands + ['keep StripDigiSimLinkedmDetSetVector_simMuonGEMDigis_*_*'] )
97 run2_GEM_2017.toModify( SimMuonPREMIX, outputCommands = SimMuonPREMIX.outputCommands + ['keep *_simMuonGEMDigis_*_*',
98  'keep *_*_GEMDigiSimLink_*',
99  'keep *_*_GEMStripDigiSimLink_*'] )
100 
101 
102 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
103 run3_GEM.toModify( SimMuonFEVTDEBUG, outputCommands = SimMuonFEVTDEBUG.outputCommands + ['keep *_simMuonGEMDigis_*_*',
104  'keep *_simMuonGEMPadDigis_*_*',
105  'keep *_simMuonGEMPadDigiClusters_*_*'] )
106 run3_GEM.toModify( SimMuonRAW, outputCommands = SimMuonRAW.outputCommands + ['keep StripDigiSimLinkedmDetSetVector_simMuonGEMDigis_*_*'] )
107 run3_GEM.toModify( SimMuonRECO, outputCommands = SimMuonRECO.outputCommands + ['keep StripDigiSimLinkedmDetSetVector_simMuonGEMDigis_*_*'] )
108 run3_GEM.toModify( SimMuonPREMIX, outputCommands = SimMuonPREMIX.outputCommands + ['keep *_simMuonGEMDigis_*_*',
109  'keep *_*_GEMDigiSimLink_*',
110  'keep *_*_GEMStripDigiSimLink_*'] )
111 
112 from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
113 phase2_muon.toModify( SimMuonFEVTDEBUG, outputCommands = SimMuonFEVTDEBUG.outputCommands + ['keep *_simMuonME0PseudoDigis_*_*',
114  'keep *_simMuonME0PseudoReDigis_*_*',
115  'keep *_simMuonME0Digis_*_*',
116  'keep *_simMuonME0PadDigis_*_*',
117  'keep *_simMuonME0PadDigiClusters_*_*'] )
118 phase2_muon.toModify( SimMuonRAW, outputCommands = SimMuonRAW.outputCommands + ['keep StripDigiSimLinkedmDetSetVector_simMuonME0Digis_*_*'] )
119 phase2_muon.toModify( SimMuonRECO, outputCommands = SimMuonRECO.outputCommands + ['keep StripDigiSimLinkedmDetSetVector_simMuonME0Digis_*_*'] )
120 phase2_muon.toModify( SimMuonPREMIX, outputCommands = SimMuonPREMIX.outputCommands + ['keep *_simMuonME0Digis_*_*',
121  'keep *_mix_g4SimHitsMuonME0Hits_*',
122  'keep *_*_ME0DigiSimLink_*',
123  'keep *_*_ME0StripDigiSimLink_*'] )
124 
125 
126 # For phase2 premixing switch the sim digi collections to the ones including pileup
127 (premix_stage2 & phase2_muon).toModify(SimMuonFEVTDEBUG, outputCommands = SimMuonFEVTDEBUG.outputCommands + [
128  'drop *_simMuonGEMDigis_*_*',
129  'keep GEMDetIdGEMDigiMuonDigiCollection_mixData_*_*',
130  'drop *_simMuonME0Digis_*_*',
131  'keep ME0DetIdME0DigiMuonDigiCollection_mixData_*_*',
132 ])