CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/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     GeneralMuSequenceAtSingleMu+
00092     dqmInfoTauV
00093     )
00094 
00095 #Jet Dataset
00096 procAttributes = dir(proc) #Takes a snapshot of what there in the process
00097 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealData, 'AtJet') #clones the sequence inside the process with AtJet postfix
00098 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForJetDataset'), hltPaths = cms.vstring('HLT_Jet30_L1FastJet_v*') ) ) )
00099 proc.TauValNumeratorAndDenominatorRealDataAtJet.visit(seqModifier)
00100 #checks what's new in the process (the cloned sequences and modules in them)
00101 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('AtJet') != -1), dir(proc) )
00102 #spawns a local variable with the same name as the proc attribute, needed for future process.load
00103 for newAttr in newProcAttributes:
00104     locals()[newAttr] = getattr(proc,newAttr)
00105 
00106 pfTauRunDQMValidationJet = cms.Sequence(
00107     TauValNumeratorAndDenominatorRealDataAtJet+
00108     dqmInfoTauV
00109     )
00110 
00111 #MultiJet Dataset
00112 procAttributes = dir(proc) #Takes a snapshot of what there in the process
00113 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealData, 'AtMultiJet') #clones the sequence inside the process with AtMultiJet postfix
00114 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForMultiJetDataset'), hltPaths = cms.vstring('OUR_HLT_FALLBACK_PATH') ) ) )
00115 proc.TauValNumeratorAndDenominatorRealDataAtMultiJet.visit(seqModifier)
00116 #checks what's new in the process (the cloned sequences and modules in them)
00117 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('AtMultiJet') != -1), dir(proc) )
00118 #spawns a local variable with the same name as the proc attribute, needed for future process.load
00119 for newAttr in newProcAttributes:
00120     locals()[newAttr] = getattr(proc,newAttr)
00121 
00122 pfTauRunDQMValidationMultiJet = cms.Sequence(
00123     TauValNumeratorAndDenominatorRealDataAtMultiJet+
00124     dqmInfoTauV
00125     )
00126 
00127 #DoubleElectron Dataset
00128 procAttributes = dir(proc) #Takes a snapshot of what there in the process
00129 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealElectronsData, 'AtDoubleElectron') #clones the sequence inside the process with AtDoubleElectron postfix
00130 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForDoubleElectronDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoVT_TrkIdT_TrkIsoVT_SC4_Mass50_v*') ) ) ) 
00131 proc.TauValNumeratorAndDenominatorRealElectronsDataAtDoubleElectron.visit(seqModifier)
00132 #checks what's new in the process (the cloned sequences and modules in them)
00133 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('AtDoubleElectron') != -1), dir(proc) )
00134 #spawns a local variable with the same name as the proc attribute, needed for future process.load
00135 for newAttr in newProcAttributes:
00136     locals()[newAttr] = getattr(proc,newAttr)
00137 
00138 pfTauRunDQMValidationDoubleElectron = cms.Sequence(
00139     TauValNumeratorAndDenominatorRealElectronsDataAtDoubleElectron+
00140     dqmInfoTauV
00141     )
00142 
00143 #TauPlusX Dataset
00144 procAttributes = dir(proc) #Takes a snapshot of what there in the process
00145 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealElectronsData, 'TauPlusX') #clones the sequence inside the process with TauPlusX postfix
00146 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForTauPlusXDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoRhoT_TrkIdT_TrkIsoT_LooseIsoPFTau20_v*') ) ) )
00147 proc.TauValNumeratorAndDenominatorRealElectronsDataTauPlusX.visit(seqModifier)
00148 #checks what's new in the process (the cloned sequences and modules in them)
00149 newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('TauPlusX') != -1), dir(proc) )
00150 #spawns a local variable with the same name as the proc attribute, needed for future process.load
00151 for newAttr in newProcAttributes:
00152     locals()[newAttr] = getattr(proc,newAttr)
00153 
00154 pfTauRunDQMValidationTauPlusX = cms.Sequence(
00155     TauValNumeratorAndDenominatorRealElectronsDataTauPlusX+
00156     dqmInfoTauV
00157     )
00158 
00159 #----------------------------------------------------------------------------------------------------------------------------------------
00160 #                                                      Efficiencies production according to dataset
00161 #----------------------------------------------------------------------------------------------------------------------------------------
00162 ## runTauEffMu = cms.Sequence(
00163 ##     efficienciesRealMuonsData+
00164 ##     efficienciesRealData+
00165 ##     normalizePlotsRealMuonsData
00166 ##     )
00167 runTauEffSingleMu =  cms.Sequence(
00168     efficienciesRealMuonsData+
00169     efficienciesRealData+
00170     normalizePlotsRealMuonsData
00171     )       
00172 
00173 runTauEffJet = TauEfficienciesRealData
00174 runTauEffMutiJet = runTauEffJet
00175 
00176 runTauEffDoubleElectron = produceDenominatorRealElectronsData
00177 runTauEffTauPlusX = runTauEffDoubleElectron
00178 
00179 ##Full sequences, including normalizations
00180 ## TauEfficienciesRealData+
00181 ## TauEfficienciesRealElectronsData+
00182 ## TauEfficienciesRealMuonsData
00183