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