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 def loadGeneralTracksAlias(process):
10  if _loadDigiAliasesWasCalledPremix is None:
11  raise Exception("This function may be called only after loadDigiAliases() has been called")
12 
13  nopremix = not _loadDigiAliasesWasCalledPremix
14  process.generalTracks = cms.EDAlias(
15  **{"mix" if nopremix else "mixData" :
16  cms.VPSet(
17  cms.PSet(
18  fromProductInstance = cms.string('generalTracks'),
19  toProductInstance = cms.string(''),
20  type = cms.string('recoTracks')
21  ),
22  cms.PSet(
23  fromProductInstance = cms.string('generalTracks'),
24  toProductInstance = cms.string(''),
25  type = cms.string('recoTrackExtras')
26  ),
27  cms.PSet(
28  fromProductInstance = cms.string('generalTracks'),
29  toProductInstance = cms.string(''),
30  type = cms.string('TrackingRecHitsOwned')
31  )
32  )
33  }
34  )
35 
36 def loadDigiAliases(process, premix=False):
37  nopremix = not premix
38  global _loadDigiAliasesWasCalledPremix
39  _loadDigiAliasesWasCalledPremix = premix
40 
41  process.ecalPreshowerDigis = cms.EDAlias(
42  **{"simEcalPreshowerDigis" if nopremix else "DMEcalPreshowerDigis" :
43  cms.VPSet(
44  cms.PSet(
45  type = cms.string("ESDigiCollection")
46  )
47  )
48  }
49  )
50 
51  process.ecalDigis = cms.EDAlias(
52  **{"simEcalDigis" if nopremix else "DMEcalDigis" :
53  cms.VPSet(
54  cms.PSet(
55  type = cms.string("EBDigiCollection")
56  ),
57  cms.PSet(
58  type = cms.string("EEDigiCollection")
59  ),
60  cms.PSet(
61  type = cms.string("EBSrFlagsSorted"),
62  fromProductInstance = cms.string('ebSrFlags'),
63  toProductInstance = cms.string('')),
64  cms.PSet(
65  type = cms.string("EESrFlagsSorted"),
66  fromProductInstance = cms.string('eeSrFlags'),
67  toProductInstance = cms.string(''),
68  )
69  ),
70  "simEcalTriggerPrimitiveDigis" if nopremix else "DMEcalTriggerPrimitiveDigis" :
71  cms.VPSet(
72  cms.PSet(
73  type = cms.string("EcalTriggerPrimitiveDigisSorted"),
74  fromProductInstance = cms.string(""),
75  toProductInstance = cms.string("EcalTriggerPrimitives")
76  )
77  )
78  }
79  )
80 
81  process.hcalDigis = cms.EDAlias(
82  **{"simHcalDigis" if nopremix else "DMHcalDigis" :
83  cms.VPSet(
84  cms.PSet(type = cms.string("HBHEDataFramesSorted")),
85  cms.PSet(type = cms.string("HFDataFramesSorted")),
86  cms.PSet(type = cms.string("HODataFramesSorted")),
87  cms.PSet(
88  type = cms.string('QIE10DataFrameHcalDataFrameContainer'),
89  fromProductInstance = cms.string('HFQIE10DigiCollection'),
90  toProductInstance = cms.string('')
91  ),
92  cms.PSet(
93  type = cms.string('QIE11DataFrameHcalDataFrameContainer'),
94  fromProductInstance = cms.string('HBHEQIE11DigiCollection'),
95  toProductInstance = cms.string('')
96  )
97  )
98  }
99  )
100 
101  process.muonDTDigis = cms.EDAlias(
102  **{"simMuonDTDigis" if nopremix else "mixData" :
103  cms.VPSet(
104  cms.PSet(
105  type = cms.string("DTLayerIdDTDigiMuonDigiCollection")
106  ),
107  #cms.PSet(
108  # type = cms.string("DTLayerIdDTDigiSimLinkMuonDigiCollection")
109  # )
110  )
111  }
112  )
113 
114  process.muonRPCDigis = cms.EDAlias(
115  **{"simMuonRPCDigis" if nopremix else "mixData" :
116  cms.VPSet(
117  cms.PSet(
118  type = cms.string("RPCDetIdRPCDigiMuonDigiCollection")
119  ),
120  #cms.PSet(
121  # type = cms.string("RPCDigiSimLinkedmDetSetVector")
122  # )
123  )
124  }
125  )
126 
127  process.muonCSCDigis = cms.EDAlias(
128  **{"simMuonCSCDigis" if nopremix else "mixData" :
129  cms.VPSet(
130  cms.PSet(
131  type = cms.string("CSCDetIdCSCWireDigiMuonDigiCollection"),
132  fromProductInstance = cms.string("MuonCSCWireDigi" if nopremix else "MuonCSCWireDigisDM"),
133  toProductInstance = cms.string("MuonCSCWireDigi")),
134  cms.PSet(
135  type = cms.string("CSCDetIdCSCStripDigiMuonDigiCollection"),
136  fromProductInstance = cms.string("MuonCSCStripDigi" if nopremix else "MuonCSCStripDigisDM"),
137  toProductInstance = cms.string("MuonCSCStripDigi")),
138  #cms.PSet(
139  # type = cms.string('StripDigiSimLinkedmDetSetVector')
140  # ),
141  )
142  }
143  )
144 
146  process.caloStage1LegacyFormatDigis = cms.EDAlias(
147  **{ "simCaloStage1LegacyFormatDigis" :
148  cms.VPSet(
149  cms.PSet(type = cms.string("L1GctEmCands")),
150  cms.PSet(type = cms.string("L1GctEtHads")),
151  cms.PSet(type = cms.string("L1GctEtMisss")),
152  cms.PSet(type = cms.string("L1GctEtTotals")),
153  cms.PSet(type = cms.string("L1GctHFBitCountss")),
154  cms.PSet(type = cms.string("L1GctHFRingEtSumss")),
155  cms.PSet(type = cms.string("L1GctHtMisss")),
156  cms.PSet(type = cms.string("L1GctInternEtSums")),
157  cms.PSet(type = cms.string("L1GctInternHtMisss")),
158  cms.PSet(type = cms.string("L1GctInternJetDatas")),
159  cms.PSet(type = cms.string("L1GctJetCands")))})
160 
161  process.gctDigis = cms.EDAlias(
162  **{ "simGctDigis" :
163  cms.VPSet(
164  cms.PSet(type = cms.string("L1GctEmCands")),
165  cms.PSet(type = cms.string("L1GctEtHads")),
166  cms.PSet(type = cms.string("L1GctEtMisss")),
167  cms.PSet(type = cms.string("L1GctEtTotals")),
168  cms.PSet(type = cms.string("L1GctHFBitCountss")),
169  cms.PSet(type = cms.string("L1GctHFRingEtSumss")),
170  cms.PSet(type = cms.string("L1GctHtMisss")),
171  cms.PSet(type = cms.string("L1GctInternEtSums")),
172  cms.PSet(type = cms.string("L1GctInternHtMisss")),
173  cms.PSet(type = cms.string("L1GctInternJetDatas")),
174  cms.PSet(type = cms.string("L1GctJetCands")))})
175 
176  process.gtDigis = cms.EDAlias(
177  **{ "simGtDigis" :
178  cms.VPSet(
179  cms.PSet(type = cms.string("L1GlobalTriggerEvmReadoutRecord")),
180  cms.PSet(type = cms.string("L1GlobalTriggerObjectMapRecord")),
181  cms.PSet(type = cms.string("L1GlobalTriggerReadoutRecord"))),
182  "simGmtDigis" :
183  cms.VPSet(
184  cms.PSet(type = cms.string("L1MuGMTReadoutCollection")),
185  cms.PSet(type = cms.string("L1MuGMTCands")))
186  })
187 
188 
189  process.gmtDigis = cms.EDAlias (
190  simGmtDigis =
191  cms.VPSet(
192  cms.PSet(type = cms.string("L1MuGMTReadoutCollection")),
193  cms.PSet(type = cms.string("L1MuGMTCands"))
194  )
195  )
196 
def loadGeneralTracksAlias(process)
def loadDigiAliases(process, premix=False)
def loadTriggerDigiAliases(process)