CMS 3D CMS Logo

DigiAliases_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # This is an ugly hack (but better what was before) to record if the
4 # loadDigiAliases() was called with premixing or not. Unfortunately
5 # which alias to use depends on that. If we had a premixing Modifier,
6 # this hack would not be needed.
7 _loadDigiAliasesWasCalledPremix = None
8 
9 # This is another ugly hack to disable the loading of digi aliases
10 # "for usual mixing" (see
11 # Configuration.StandardSequences.Digi_PreMix_cff for the place which
12 # sets this variable to false). ProcessModifier can not be used there
13 # as there would be one from Digi_cff and another from Digi_Premix_cff
14 # and their running order is not specified. The need of this hack
15 # could also be fulfilled with a premixing Modifier, but we would
16 # actually need two of them: separate ones for premixing steps 1 and 2
17 # (this hack modifies step1 and the upper one modifies step2).
18 _enableDigiAliases = True
19 
21  if _loadDigiAliasesWasCalledPremix is None:
22  raise Exception("This function may be called only after loadDigiAliases() has been called")
23 
24  nopremix = not _loadDigiAliasesWasCalledPremix
25  process.generalTracks = cms.EDAlias(
26  **{"mix" if nopremix else "mixData" :
27  cms.VPSet(
28  cms.PSet(
29  fromProductInstance = cms.string('generalTracks'),
30  toProductInstance = cms.string(''),
31  type = cms.string('recoTracks')
32  ),
33  cms.PSet(
34  fromProductInstance = cms.string('generalTracks'),
35  toProductInstance = cms.string(''),
36  type = cms.string('recoTrackExtras')
37  ),
38  cms.PSet(
39  fromProductInstance = cms.string('generalTracks'),
40  toProductInstance = cms.string(''),
41  type = cms.string('TrackingRecHitsOwned')
42  )
43  )
44  }
45  )
46 
47 def loadDigiAliases(process, premix=False):
48  nopremix = not premix
49  global _loadDigiAliasesWasCalledPremix
50  _loadDigiAliasesWasCalledPremix = premix
51 
52  if not _enableDigiAliases:
53  return
54 
55  process.ecalPreshowerDigis = cms.EDAlias(
56  **{"simEcalPreshowerDigis" if nopremix else "DMEcalPreshowerDigis" :
57  cms.VPSet(
58  cms.PSet(
59  type = cms.string("ESDigiCollection")
60  )
61  )
62  }
63  )
64 
65  process.ecalDigis = cms.EDAlias(
66  **{"simEcalDigis" if nopremix else "DMEcalDigis" :
67  cms.VPSet(
68  cms.PSet(
69  type = cms.string("EBDigiCollection")
70  ),
71  cms.PSet(
72  type = cms.string("EEDigiCollection")
73  ),
74  cms.PSet(
75  type = cms.string("EBSrFlagsSorted"),
76  fromProductInstance = cms.string('ebSrFlags'),
77  toProductInstance = cms.string('')),
78  cms.PSet(
79  type = cms.string("EESrFlagsSorted"),
80  fromProductInstance = cms.string('eeSrFlags'),
81  toProductInstance = cms.string(''),
82  )
83  ),
84  "simEcalTriggerPrimitiveDigis" if nopremix else "DMEcalTriggerPrimitiveDigis" :
85  cms.VPSet(
86  cms.PSet(
87  type = cms.string("EcalTriggerPrimitiveDigisSorted"),
88  fromProductInstance = cms.string(""),
89  toProductInstance = cms.string("EcalTriggerPrimitives")
90  )
91  )
92  }
93  )
94 
95  process.hcalDigis = cms.EDAlias(
96  **{"simHcalDigis" if nopremix else "DMHcalDigis" :
97  cms.VPSet(
98  cms.PSet(type = cms.string("HBHEDataFramesSorted")),
99  cms.PSet(type = cms.string("HFDataFramesSorted")),
100  cms.PSet(type = cms.string("HODataFramesSorted")),
101  cms.PSet(
102  type = cms.string('QIE10DataFrameHcalDataFrameContainer'),
103  fromProductInstance = cms.string('HFQIE10DigiCollection'),
104  toProductInstance = cms.string('')
105  ),
106  cms.PSet(
107  type = cms.string('QIE11DataFrameHcalDataFrameContainer'),
108  fromProductInstance = cms.string('HBHEQIE11DigiCollection'),
109  toProductInstance = cms.string('')
110  )
111  )
112  }
113  )
114 
115  process.muonDTDigis = cms.EDAlias(
116  **{"simMuonDTDigis" if nopremix else "mixData" :
117  cms.VPSet(
118  cms.PSet(
119  type = cms.string("DTLayerIdDTDigiMuonDigiCollection")
120  ),
121  #cms.PSet(
122  # type = cms.string("DTLayerIdDTDigiSimLinkMuonDigiCollection")
123  # )
124  )
125  }
126  )
127 
128  process.muonRPCDigis = cms.EDAlias(
129  **{"simMuonRPCDigis" if nopremix else "mixData" :
130  cms.VPSet(
131  cms.PSet(
132  type = cms.string("RPCDetIdRPCDigiMuonDigiCollection")
133  ),
134  #cms.PSet(
135  # type = cms.string("RPCDigiSimLinkedmDetSetVector")
136  # )
137  )
138  }
139  )
140 
141  process.muonCSCDigis = cms.EDAlias(
142  **{"simMuonCSCDigis" if nopremix else "mixData" :
143  cms.VPSet(
144  cms.PSet(
145  type = cms.string("CSCDetIdCSCWireDigiMuonDigiCollection"),
146  fromProductInstance = cms.string("MuonCSCWireDigi" if nopremix else "MuonCSCWireDigisDM"),
147  toProductInstance = cms.string("MuonCSCWireDigi")),
148  cms.PSet(
149  type = cms.string("CSCDetIdCSCStripDigiMuonDigiCollection"),
150  fromProductInstance = cms.string("MuonCSCStripDigi" if nopremix else "MuonCSCStripDigisDM"),
151  toProductInstance = cms.string("MuonCSCStripDigi")),
152  #cms.PSet(
153  # type = cms.string('StripDigiSimLinkedmDetSetVector')
154  # ),
155  )
156  }
157  )
158 
160  process.caloStage1LegacyFormatDigis = cms.EDAlias(
161  **{ "simCaloStage1LegacyFormatDigis" :
162  cms.VPSet(
163  cms.PSet(type = cms.string("L1GctEmCands")),
164  cms.PSet(type = cms.string("L1GctEtHads")),
165  cms.PSet(type = cms.string("L1GctEtMisss")),
166  cms.PSet(type = cms.string("L1GctEtTotals")),
167  cms.PSet(type = cms.string("L1GctHFBitCountss")),
168  cms.PSet(type = cms.string("L1GctHFRingEtSumss")),
169  cms.PSet(type = cms.string("L1GctHtMisss")),
170  cms.PSet(type = cms.string("L1GctInternEtSums")),
171  cms.PSet(type = cms.string("L1GctInternHtMisss")),
172  cms.PSet(type = cms.string("L1GctInternJetDatas")),
173  cms.PSet(type = cms.string("L1GctJetCands")))})
174 
175  process.gctDigis = cms.EDAlias(
176  **{ "simGctDigis" :
177  cms.VPSet(
178  cms.PSet(type = cms.string("L1GctEmCands")),
179  cms.PSet(type = cms.string("L1GctEtHads")),
180  cms.PSet(type = cms.string("L1GctEtMisss")),
181  cms.PSet(type = cms.string("L1GctEtTotals")),
182  cms.PSet(type = cms.string("L1GctHFBitCountss")),
183  cms.PSet(type = cms.string("L1GctHFRingEtSumss")),
184  cms.PSet(type = cms.string("L1GctHtMisss")),
185  cms.PSet(type = cms.string("L1GctInternEtSums")),
186  cms.PSet(type = cms.string("L1GctInternHtMisss")),
187  cms.PSet(type = cms.string("L1GctInternJetDatas")),
188  cms.PSet(type = cms.string("L1GctJetCands")))})
189 
190  process.gtDigis = cms.EDAlias(
191  **{ "simGtDigis" :
192  cms.VPSet(
193  cms.PSet(type = cms.string("L1GlobalTriggerEvmReadoutRecord")),
194  cms.PSet(type = cms.string("L1GlobalTriggerObjectMapRecord")),
195  cms.PSet(type = cms.string("L1GlobalTriggerReadoutRecord"))),
196  "simGmtDigis" :
197  cms.VPSet(
198  cms.PSet(type = cms.string("L1MuGMTReadoutCollection")),
199  cms.PSet(type = cms.string("L1MuGMTCands")))
200  })
201 
202 
203  process.gmtDigis = cms.EDAlias (
204  simGmtDigis =
205  cms.VPSet(
206  cms.PSet(type = cms.string("L1MuGMTReadoutCollection")),
207  cms.PSet(type = cms.string("L1MuGMTCands"))
208  )
209  )
210 
def loadGeneralTracksAlias(process)
def loadDigiAliases(process, premix=False)
def loadTriggerDigiAliases(process)