CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DQMSequences_cfi.py
Go to the documentation of this file.
5 
6 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
7 dqmInfoTauV = DQMEDAnalyzer(
8  "DQMEventInfo",
9  subSystemFolder = cms.untracked.string('RecoTauV')
10  )
11 
12 
13 produceDenomsData = cms.Sequence(
14  produceDenominatorRealData+
15  produceDenominatorRealElectronsData+
16  produceDenominatorRealMuonsData
17  )
18 
19 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForALLQCDDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
20 TauValNumeratorAndDenominatorRealData.visit(seqModifier)
21 
22 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForALLEleDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoVT_TrkIdT_TrkIsoVT_SC4_Mass50_v*') ) ) )
23 TauValNumeratorAndDenominatorRealElectronsData.visit(seqModifier)
24 
25 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForALLMuDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
26 TauValNumeratorAndDenominatorRealMuonsData.visit(seqModifier)
27 
28 pfTauRunDQMValidation = cms.Sequence(
29  TauValNumeratorAndDenominatorRealData+
30  TauValNumeratorAndDenominatorRealElectronsData+
31  TauValNumeratorAndDenominatorRealMuonsData+
32  dqmInfoTauV
33  )
34 
35 runTauEff = cms.Sequence(
36  efficienciesRealData+
37  efficienciesRealDataSummary+
38  efficienciesRealElectronsData+
39  efficienciesRealElectronsDataSummary+
40  efficienciesRealMuonsData+
41  efficienciesRealMuonsDataSummary+
42  efficienciesTauValidationMiniAODRealData+
43  efficienciesTauValidationMiniAODRealElectronsData+
44  efficienciesTauValidationMiniAODRealMuonsData+
45  normalizePlotsRealMuonsData
46  )
47 
48 #----------------------------------------------------------------------------------------------------------------------------------------
49 # Denominators according to dataset
50 #----------------------------------------------------------------------------------------------------------------------------------------
51 ## produceDenomsMu = cms.Sequence(
52 ## produceDenominatorRealData+
53 ## produceDenominatorRealMuonsData
54 ## )
55 produceDenomsSingleMu = cms.Sequence(
56  produceDenominatorRealData+
57  produceDenominatorRealMuonsData
58  )
59 produceDenomsJet = cms.Sequence(produceDenominatorRealData)
60 produceDenomsMultiJet = cms.Sequence(produceDenomsJet)
61 
62 produceDenomsDoubleElectron = cms.Sequence(produceDenominatorRealElectronsData)
63 produceDenomsTauPlusX = cms.Sequence(produceDenomsDoubleElectron)
64 
65 #----------------------------------------------------------------------------------------------------------------------------------------
66 # Main modules according to dataset
67 #----------------------------------------------------------------------------------------------------------------------------------------
68 proc.GeneralMuSequence = cms.Sequence( proc.TauValNumeratorAndDenominatorRealData * proc.TauValNumeratorAndDenominatorRealMuonsData )
69 
70 #Mu Dataset
71 ## procAttributes = dir(proc) #Takes a snapshot of what there in the process
72 ## helpers.cloneProcessingSnippet( proc, proc.GeneralMuSequence, 'AtMu') #clones the sequence inside the process with AtMu postfix
73 ## seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForMuDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
74 ## proc.GeneralMuSequenceAtMu.visit(seqModifier)
75 ## #checks what's new in the process (the cloned sequences and modules in them)
76 ## newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('AtMu') != -1), dir(proc) )
77 ## #spawns a local variable with the same name as the proc attribute, needed for future process.load
78 ## for newAttr in newProcAttributes:
79 ## locals()[newAttr] = getattr(proc,newAttr)
80 
81 ## pfTauRunDQMValidationMu = cms.Sequence(
82 ## TauValNumeratorAndDenominatorRealDataAtMu+
83 ## TauValNumeratorAndDenominatorRealMuonsDataAtMu+
84 ## dqmInfoTauV
85 ## )
86 
87 #SingleMu Dataset
88 procAttributes = dir(proc) #Takes a snapshot of what there in the process
89 helpers.cloneProcessingSnippet( proc, proc.GeneralMuSequence, 'AtSingleMu') #clones the sequence inside the process with AtSingleMu postfix
90 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForSingleMuDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
91 proc.GeneralMuSequenceAtSingleMu.visit(seqModifier)
92 #checks what's new in the process (the cloned sequences and modules in them)
93 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('AtSingleMu') != -1)]
94 #spawns a local variable with the same name as the proc attribute, needed for future process.load
95 for newAttr in newProcAttributes:
96  locals()[newAttr] = getattr(proc,newAttr)
97 
98 pfTauRunDQMValidationSingleMu = cms.Sequence(
99  GeneralMuSequenceAtSingleMu+
100  dqmInfoTauV
101  )
102 
103 #Jet Dataset
104 procAttributes = dir(proc) #Takes a snapshot of what there in the process
105 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealData, 'AtJet') #clones the sequence inside the process with AtJet postfix
106 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForJetDataset'), hltPaths = cms.vstring('HLT_Jet30_L1FastJet_v*') ) ) )
107 proc.TauValNumeratorAndDenominatorRealDataAtJet.visit(seqModifier)
108 #checks what's new in the process (the cloned sequences and modules in them)
109 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('AtJet') != -1)]
110 #spawns a local variable with the same name as the proc attribute, needed for future process.load
111 for newAttr in newProcAttributes:
112  locals()[newAttr] = getattr(proc,newAttr)
113 
114 pfTauRunDQMValidationJet = cms.Sequence(
115  TauValNumeratorAndDenominatorRealDataAtJet+
116  dqmInfoTauV
117  )
118 
119 #MultiJet Dataset
120 procAttributes = dir(proc) #Takes a snapshot of what there in the process
121 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealData, 'AtMultiJet') #clones the sequence inside the process with AtMultiJet postfix
122 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForMultiJetDataset'), hltPaths = cms.vstring('OUR_HLT_FALLBACK_PATH') ) ) )
123 proc.TauValNumeratorAndDenominatorRealDataAtMultiJet.visit(seqModifier)
124 #checks what's new in the process (the cloned sequences and modules in them)
125 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('AtMultiJet') != -1)]
126 #spawns a local variable with the same name as the proc attribute, needed for future process.load
127 for newAttr in newProcAttributes:
128  locals()[newAttr] = getattr(proc,newAttr)
129 
130 pfTauRunDQMValidationMultiJet = cms.Sequence(
131  TauValNumeratorAndDenominatorRealDataAtMultiJet+
132  dqmInfoTauV
133  )
134 
135 #DoubleElectron Dataset
136 procAttributes = dir(proc) #Takes a snapshot of what there in the process
137 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealElectronsData, 'AtDoubleElectron') #clones the sequence inside the process with AtDoubleElectron postfix
138 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForDoubleElectronDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoVT_TrkIdT_TrkIsoVT_SC4_Mass50_v*') ) ) )
139 proc.TauValNumeratorAndDenominatorRealElectronsDataAtDoubleElectron.visit(seqModifier)
140 #checks what's new in the process (the cloned sequences and modules in them)
141 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('AtDoubleElectron') != -1)]
142 #spawns a local variable with the same name as the proc attribute, needed for future process.load
143 for newAttr in newProcAttributes:
144  locals()[newAttr] = getattr(proc,newAttr)
145 
146 pfTauRunDQMValidationDoubleElectron = cms.Sequence(
147  TauValNumeratorAndDenominatorRealElectronsDataAtDoubleElectron+
148  dqmInfoTauV
149  )
150 
151 #TauPlusX Dataset
152 procAttributes = dir(proc) #Takes a snapshot of what there in the process
153 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealElectronsData, 'TauPlusX') #clones the sequence inside the process with TauPlusX postfix
154 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForTauPlusXDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoRhoT_TrkIdT_TrkIsoT_LooseIsoPFTau20_v*') ) ) )
155 proc.TauValNumeratorAndDenominatorRealElectronsDataTauPlusX.visit(seqModifier)
156 #checks what's new in the process (the cloned sequences and modules in them)
157 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('TauPlusX') != -1)]
158 #spawns a local variable with the same name as the proc attribute, needed for future process.load
159 for newAttr in newProcAttributes:
160  locals()[newAttr] = getattr(proc,newAttr)
161 
162 pfTauRunDQMValidationTauPlusX = cms.Sequence(
163  TauValNumeratorAndDenominatorRealElectronsDataTauPlusX+
164  dqmInfoTauV
165  )
166 
167 #----------------------------------------------------------------------------------------------------------------------------------------
168 # Efficiencies production according to dataset
169 #----------------------------------------------------------------------------------------------------------------------------------------
170 ## runTauEffMu = cms.Sequence(
171 ## efficienciesRealMuonsData+
172 ## efficienciesRealData+
173 ## normalizePlotsRealMuonsData
174 ## )
175 runTauEffSingleMu = cms.Sequence(
176  efficienciesRealMuonsData+
177  efficienciesRealData+
178  normalizePlotsRealMuonsData
179  )
180 
181 runTauEffJet = cms.Sequence(TauEfficienciesRealData)
182 runTauEffMutiJet = cms.Sequence(runTauEffJet)
183 
184 runTauEffDoubleElectron = cms.Sequence(produceDenominatorRealElectronsData)
185 runTauEffTauPlusX = cms.Sequence(runTauEffDoubleElectron)
186 
187 ##Full sequences, including normalizations
188 ## TauEfficienciesRealData+
189 ## TauEfficienciesRealElectronsData+
190 ## TauEfficienciesRealMuonsData
191 
def cloneProcessingSnippet
Definition: helpers.py:257