CMS 3D CMS Logo

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 # Standard validation is not required anymore
29 pfTauRunDQMValidation = cms.Sequence(
30  #TauValNumeratorAndDenominatorRealData+
31  #TauValNumeratorAndDenominatorRealElectronsData+
32  #TauValNumeratorAndDenominatorRealMuonsData+
33  #dqmInfoTauV
34 )
35 
36 runTauEff = cms.Sequence(
37  #efficienciesRealData+
38  #efficienciesRealDataSummary+
39  #efficienciesRealElectronsData+
40  #efficienciesRealElectronsDataSummary+
41  #efficienciesRealMuonsData+
42  #efficienciesRealMuonsDataSummary+
43  efficienciesTauValidationMiniAODRealData
44  +efficienciesTauValidationMiniAODRealElectronsData
45  +efficienciesTauValidationMiniAODRealMuonsData
46  #normalizePlotsRealMuonsData
47 )
48 
49 #----------------------------------------------------------------------------------------------------------------------------------------
50 # Denominators according to dataset
51 #----------------------------------------------------------------------------------------------------------------------------------------
52 
56 produceDenomsSingleMu = cms.Sequence(
57  produceDenominatorRealData+
58  produceDenominatorRealMuonsData
59 )
60 produceDenomsJet = cms.Sequence(produceDenominatorRealData)
61 produceDenomsMultiJet = cms.Sequence(produceDenomsJet)
62 
63 produceDenomsDoubleElectron = cms.Sequence(produceDenominatorRealElectronsData)
64 produceDenomsTauPlusX = cms.Sequence(produceDenomsDoubleElectron)
65 
66 #----------------------------------------------------------------------------------------------------------------------------------------
67 # Main modules according to dataset
68 #----------------------------------------------------------------------------------------------------------------------------------------
69 
70 proc.GeneralMuSequence = cms.Sequence( proc.TauValNumeratorAndDenominatorRealData * proc.TauValNumeratorAndDenominatorRealMuonsData )
71 
72 #Mu Dataset
73 
82 
83 
88 
89 #SingleMu Dataset
90 procAttributes = dir(proc) #Takes a snapshot of what there in the process
91 helpers.cloneProcessingSnippet( proc, proc.GeneralMuSequence, 'AtSingleMu') #clones the sequence inside the process with AtSingleMu postfix
92 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForSingleMuDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
93 proc.GeneralMuSequenceAtSingleMu.visit(seqModifier)
94 #checks what's new in the process (the cloned sequences and modules in them)
95 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('AtSingleMu') != -1)]
96 #spawns a local variable with the same name as the proc attribute, needed for future process.load
97 for newAttr in newProcAttributes:
98  locals()[newAttr] = getattr(proc,newAttr)
99 
100 pfTauRunDQMValidationSingleMu = cms.Sequence(
101  GeneralMuSequenceAtSingleMu+
102  dqmInfoTauV
103 )
104 
105 #Jet Dataset
106 procAttributes = dir(proc) #Takes a snapshot of what there in the process
107 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealData, 'AtJet') #clones the sequence inside the process with AtJet postfix
108 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForJetDataset'), hltPaths = cms.vstring('HLT_Jet30_L1FastJet_v*') ) ) )
109 proc.TauValNumeratorAndDenominatorRealDataAtJet.visit(seqModifier)
110 #checks what's new in the process (the cloned sequences and modules in them)
111 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('AtJet') != -1)]
112 #spawns a local variable with the same name as the proc attribute, needed for future process.load
113 for newAttr in newProcAttributes:
114  locals()[newAttr] = getattr(proc,newAttr)
115 
116 pfTauRunDQMValidationJet = cms.Sequence(
117  TauValNumeratorAndDenominatorRealDataAtJet+
118  dqmInfoTauV
119 )
120 
121 #MultiJet Dataset
122 procAttributes = dir(proc) #Takes a snapshot of what there in the process
123 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealData, 'AtMultiJet') #clones the sequence inside the process with AtMultiJet postfix
124 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForMultiJetDataset'), hltPaths = cms.vstring('OUR_HLT_FALLBACK_PATH') ) ) )
125 proc.TauValNumeratorAndDenominatorRealDataAtMultiJet.visit(seqModifier)
126 #checks what's new in the process (the cloned sequences and modules in them)
127 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('AtMultiJet') != -1)]
128 #spawns a local variable with the same name as the proc attribute, needed for future process.load
129 for newAttr in newProcAttributes:
130  locals()[newAttr] = getattr(proc,newAttr)
131 
132 pfTauRunDQMValidationMultiJet = cms.Sequence(
133  TauValNumeratorAndDenominatorRealDataAtMultiJet+
134  dqmInfoTauV
135 )
136 
137 #DoubleElectron Dataset
138 procAttributes = dir(proc) #Takes a snapshot of what there in the process
139 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealElectronsData, 'AtDoubleElectron') #clones the sequence inside the process with AtDoubleElectron postfix
140 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForDoubleElectronDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoVT_TrkIdT_TrkIsoVT_SC4_Mass50_v*') ) ) )
141 proc.TauValNumeratorAndDenominatorRealElectronsDataAtDoubleElectron.visit(seqModifier)
142 #checks what's new in the process (the cloned sequences and modules in them)
143 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('AtDoubleElectron') != -1)]
144 #spawns a local variable with the same name as the proc attribute, needed for future process.load
145 for newAttr in newProcAttributes:
146  locals()[newAttr] = getattr(proc,newAttr)
147 
148 pfTauRunDQMValidationDoubleElectron = cms.Sequence(
149  TauValNumeratorAndDenominatorRealElectronsDataAtDoubleElectron+
150  dqmInfoTauV
151 )
152 
153 #TauPlusX Dataset
154 procAttributes = dir(proc) #Takes a snapshot of what there in the process
155 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealElectronsData, 'TauPlusX') #clones the sequence inside the process with TauPlusX postfix
156 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForTauPlusXDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoRhoT_TrkIdT_TrkIsoT_LooseIsoPFTau20_v*') ) ) )
157 proc.TauValNumeratorAndDenominatorRealElectronsDataTauPlusX.visit(seqModifier)
158 #checks what's new in the process (the cloned sequences and modules in them)
159 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('TauPlusX') != -1)]
160 #spawns a local variable with the same name as the proc attribute, needed for future process.load
161 for newAttr in newProcAttributes:
162  locals()[newAttr] = getattr(proc,newAttr)
163 
164 pfTauRunDQMValidationTauPlusX = cms.Sequence(
165  TauValNumeratorAndDenominatorRealElectronsDataTauPlusX+
166  dqmInfoTauV
167 )
168 
169 #----------------------------------------------------------------------------------------------------------------------------------------
170 # Efficiencies production according to dataset
171 #----------------------------------------------------------------------------------------------------------------------------------------
172 
177 runTauEffSingleMu = cms.Sequence(
178  #efficienciesRealMuonsData+
179  #efficienciesRealData+
180  #normalizePlotsRealMuonsData
181 )
182 
183 runTauEffJet = cms.Sequence(TauEfficienciesRealData)
184 runTauEffMutiJet = cms.Sequence(runTauEffJet)
185 
186 runTauEffDoubleElectron = cms.Sequence(produceDenominatorRealElectronsData)
187 runTauEffTauPlusX = cms.Sequence(runTauEffDoubleElectron)
188 
189 
def cloneProcessingSnippet(process, sequence, postfix, removePostfix="", noClones=[], addToTask=False, verbose=False)
Definition: helpers.py:263
def setTrigger(module, pset)