CMS 3D CMS Logo

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