CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/Validation/RecoTau/python/DQMSequences_cfi.py

Go to the documentation of this file.
00001 from Validation.RecoTau.dataTypes.ValidateTausOnRealElectronsData_cff import *
00002 from Validation.RecoTau.dataTypes.ValidateTausOnRealData_cff import *
00003 from Validation.RecoTau.dataTypes.ValidateTausOnRealMuonsData_cff import *
00004 
00005 dqmInfoTauV = cms.EDAnalyzer(
00006     "DQMEventInfo",
00007     subSystemFolder = cms.untracked.string('RecoTauV')
00008     )
00009 
00010 
00011 produceDenoms = cms.Sequence(
00012     produceDenominatorRealData+
00013     produceDenominatorRealElectronsData+
00014     produceDenominatorRealMuonsData
00015     )
00016 
00017 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForALLQCDDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
00018 TauValNumeratorAndDenominatorRealData.visit(seqModifier)
00019 
00020 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForALLEleDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoVT_TrkIdT_TrkIsoVT_SC4_Mass50_v*') ) ) )
00021 TauValNumeratorAndDenominatorRealElectronsData.visit(seqModifier)
00022 
00023 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForALLMuDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
00024 TauValNumeratorAndDenominatorRealMuonsData.visit(seqModifier)
00025 
00026 pfTauRunDQMValidation = cms.Sequence(
00027     TauValNumeratorAndDenominatorRealData+
00028     TauValNumeratorAndDenominatorRealElectronsData+
00029     TauValNumeratorAndDenominatorRealMuonsData+
00030     dqmInfoTauV
00031     )
00032 
00033 runTauEff = cms.Sequence(
00034     efficienciesRealData+
00035     efficienciesRealElectronsData+
00036     efficienciesRealMuonsData+
00037     normalizePlotsRealMuonsData
00038     )
00039 
00040 #----------------------------------------------------------------------------------------------------------------------------------------
00041 #                                                  Denominators according to dataset
00042 #----------------------------------------------------------------------------------------------------------------------------------------
00043 ## produceDenomsMu = cms.Sequence(
00044 ##     produceDenominatorRealData+
00045 ##     produceDenominatorRealMuonsData
00046 ##     )
00047 produceDenomsSingleMu = cms.Sequence(
00048     produceDenominatorRealData+
00049     produceDenominatorRealMuonsData
00050     )
00051 produceDenomsJet = produceDenominatorRealData
00052 produceDenomsMultiJet = produceDenomsJet
00053 
00054 produceDenomsDoubleElectron = produceDenominatorRealElectronsData
00055 produceDenomsTauPlusX = produceDenomsDoubleElectron
00056 
00057 #----------------------------------------------------------------------------------------------------------------------------------------
00058 #                                                  Main modules according to dataset
00059 #----------------------------------------------------------------------------------------------------------------------------------------
00060 proc.GeneralMuSequence = cms.Sequence( proc.TauValNumeratorAndDenominatorRealData * proc.TauValNumeratorAndDenominatorRealMuonsData )
00061 
00062 #Mu Dataset
00063 ## procAttributes = dir(proc) #Takes a snapshot of what there in the process
00064 ## helpers.cloneProcessingSnippet( proc, proc.GeneralMuSequence, 'AtMu') #clones the sequence inside the process with AtMu postfix
00065 ## seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForMuDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
00066 ## proc.GeneralMuSequenceAtMu.visit(seqModifier)
00067 ## #checks what's new in the process (the cloned sequences and modules in them)
00068 ## newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('AtMu') != -1), dir(proc) )
00069 ## #spawns a local variable with the same name as the proc attribute, needed for future process.load
00070 ## for newAttr in newProcAttributes:
00071 ##     locals()[newAttr] = getattr(proc,newAttr)
00072  
00073 ## pfTauRunDQMValidationMu = cms.Sequence(
00074 ##     TauValNumeratorAndDenominatorRealDataAtMu+
00075 ##     TauValNumeratorAndDenominatorRealMuonsDataAtMu+
00076 ##     dqmInfoTauV
00077 ##     )
00078 
00079 #SingleMu Dataset
00080 procAttributes = dir(proc) #Takes a snapshot of what there in the process
00081 helpers.cloneProcessingSnippet( proc, proc.GeneralMuSequence, 'AtSingleMu') #clones the sequence inside the process with AtSingleMu postfix
00082 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForSingleMuDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
00083 proc.GeneralMuSequenceAtSingleMu.visit(seqModifier)
00084 #checks what's new in the process (the cloned sequences and modules in them)
00085 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('AtSingleMu') != -1), dir(proc) )
00086 #spawns a local variable with the same name as the proc attribute, needed for future process.load
00087 for newAttr in newProcAttributes:
00088     locals()[newAttr] = getattr(proc,newAttr)
00089 
00090 pfTauRunDQMValidationSingleMu = cms.Sequence(
00091     TauValNumeratorAndDenominatorRealDataAtSingleMu+
00092     TauValNumeratorAndDenominatorRealMuonsDataAtSingleMu+
00093     dqmInfoTauV
00094     )
00095 
00096 #Jet Dataset
00097 procAttributes = dir(proc) #Takes a snapshot of what there in the process
00098 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealData, 'AtJet') #clones the sequence inside the process with AtJet postfix
00099 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForJetDataset'), hltPaths = cms.vstring('HLT_Jet30_L1FastJet_v*') ) ) )
00100 proc.TauValNumeratorAndDenominatorRealDataAtJet.visit(seqModifier)
00101 #checks what's new in the process (the cloned sequences and modules in them)
00102 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('AtJet') != -1), dir(proc) )
00103 #spawns a local variable with the same name as the proc attribute, needed for future process.load
00104 for newAttr in newProcAttributes:
00105     locals()[newAttr] = getattr(proc,newAttr)
00106 
00107 pfTauRunDQMValidationJet = cms.Sequence(
00108     TauValNumeratorAndDenominatorRealDataAtJet+
00109     dqmInfoTauV
00110     )
00111 
00112 #MultiJet Dataset
00113 procAttributes = dir(proc) #Takes a snapshot of what there in the process
00114 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealData, 'AtMultiJet') #clones the sequence inside the process with AtMultiJet postfix
00115 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForMultiJetDataset'), hltPaths = cms.vstring('OUR_HLT_FALLBACK_PATH') ) ) )
00116 proc.TauValNumeratorAndDenominatorRealDataAtMultiJet.visit(seqModifier)
00117 #checks what's new in the process (the cloned sequences and modules in them)
00118 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('AtMultiJet') != -1), dir(proc) )
00119 #spawns a local variable with the same name as the proc attribute, needed for future process.load
00120 for newAttr in newProcAttributes:
00121     locals()[newAttr] = getattr(proc,newAttr)
00122 
00123 pfTauRunDQMValidationMultiJet = cms.Sequence(
00124     TauValNumeratorAndDenominatorRealDataAtMultiJet+
00125     dqmInfoTauV
00126     )
00127 
00128 #DoubleElectron Dataset
00129 procAttributes = dir(proc) #Takes a snapshot of what there in the process
00130 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealElectronsData, 'AtDoubleElectron') #clones the sequence inside the process with AtDoubleElectron postfix
00131 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForDoubleElectronDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoVT_TrkIdT_TrkIsoVT_SC4_Mass50_v*') ) ) ) 
00132 proc.TauValNumeratorAndDenominatorRealElectronsDataAtDoubleElectron.visit(seqModifier)
00133 #checks what's new in the process (the cloned sequences and modules in them)
00134 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('AtDoubleElectron') != -1), dir(proc) )
00135 #spawns a local variable with the same name as the proc attribute, needed for future process.load
00136 for newAttr in newProcAttributes:
00137     locals()[newAttr] = getattr(proc,newAttr)
00138 
00139 pfTauRunDQMValidationDoubleElectron = cms.Sequence(
00140     TauValNumeratorAndDenominatorRealElectronsDataAtDoubleElectron+
00141     dqmInfoTauV
00142     )
00143 
00144 #TauPlusX Dataset
00145 procAttributes = dir(proc) #Takes a snapshot of what there in the process
00146 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealElectronsData, 'TauPlusX') #clones the sequence inside the process with TauPlusX postfix
00147 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForTauPlusXDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoRhoT_TrkIdT_TrkIsoT_LooseIsoPFTau20_v*') ) ) )
00148 proc.TauValNumeratorAndDenominatorRealElectronsDataTauPlusX.visit(seqModifier)
00149 #checks what's new in the process (the cloned sequences and modules in them)
00150 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('TauPlusX') != -1), dir(proc) )
00151 #spawns a local variable with the same name as the proc attribute, needed for future process.load
00152 for newAttr in newProcAttributes:
00153     locals()[newAttr] = getattr(proc,newAttr)
00154 
00155 pfTauRunDQMValidationTauPlusX = cms.Sequence(
00156     TauValNumeratorAndDenominatorRealElectronsDataTauPlusX+
00157     dqmInfoTauV
00158     )
00159 
00160 #----------------------------------------------------------------------------------------------------------------------------------------
00161 #                                                      Efficiencies production according to dataset
00162 #----------------------------------------------------------------------------------------------------------------------------------------
00163 ## runTauEffMu = cms.Sequence(
00164 ##     efficienciesRealMuonsData+
00165 ##     efficienciesRealData+
00166 ##     normalizePlotsRealMuonsData
00167 ##     )
00168 runTauEffSingleMu =  cms.Sequence(
00169     efficienciesRealMuonsData+
00170     efficienciesRealData+
00171     normalizePlotsRealMuonsData
00172     )       
00173 
00174 runTauEffJet = TauEfficienciesRealData
00175 runTauEffMutiJet = runTauEffJet
00176 
00177 runTauEffDoubleElectron = produceDenominatorRealElectronsData
00178 runTauEffTauPlusX = runTauEffDoubleElectron
00179 
00180 ##Full sequences, including normalizations
00181 ## TauEfficienciesRealData+
00182 ## TauEfficienciesRealElectronsData+
00183 ## TauEfficienciesRealMuonsData
00184