Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:33:59

0001 from Validation.RecoTau.dataTypes.ValidateTausOnRealElectronsData_cff import *
0002 from Validation.RecoTau.dataTypes.ValidateTausOnRealData_cff import *
0003 from Validation.RecoTau.dataTypes.ValidateTausOnRealMuonsData_cff import *
0004 from Validation.RecoTau.RecoTauValidation_cff import *
0005 
0006 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0007 dqmInfoTauV = DQMEDAnalyzer(
0008     "DQMEventInfo",
0009     subSystemFolder = cms.untracked.string('RecoTauV')
0010     )
0011 
0012 
0013 produceDenomsData = cms.Sequence(
0014     produceDenominatorRealData+
0015     produceDenominatorRealElectronsData+
0016     produceDenominatorRealMuonsData
0017     )
0018 
0019 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForALLQCDDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
0020 TauValNumeratorAndDenominatorRealData.visit(seqModifier)
0021 
0022 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForALLEleDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoVT_TrkIdT_TrkIsoVT_SC4_Mass50_v*') ) ) )
0023 TauValNumeratorAndDenominatorRealElectronsData.visit(seqModifier)
0024 
0025 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForALLMuDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
0026 TauValNumeratorAndDenominatorRealMuonsData.visit(seqModifier)
0027 
0028 pfTauRunDQMValidation = cms.Sequence(
0029     TauValNumeratorAndDenominatorRealData+
0030     TauValNumeratorAndDenominatorRealElectronsData+
0031     TauValNumeratorAndDenominatorRealMuonsData+
0032     dqmInfoTauV
0033     )
0034 
0035 runTauEff = cms.Sequence(
0036     efficienciesRealData+
0037     efficienciesRealDataSummary+
0038     efficienciesRealElectronsData+
0039     efficienciesRealElectronsDataSummary+
0040     efficienciesRealMuonsData+
0041     efficienciesRealMuonsDataSummary+
0042     efficienciesTauValidationMiniAODRealData+
0043     efficienciesTauValidationMiniAODRealElectronsData+
0044     efficienciesTauValidationMiniAODRealMuonsData+
0045     normalizePlotsRealMuonsData
0046     )
0047 
0048 #----------------------------------------------------------------------------------------------------------------------------------------
0049 #                                                  Denominators according to dataset
0050 #----------------------------------------------------------------------------------------------------------------------------------------
0051 ## produceDenomsMu = cms.Sequence(
0052 ##     produceDenominatorRealData+
0053 ##     produceDenominatorRealMuonsData
0054 ##     )
0055 produceDenomsSingleMu = cms.Sequence(
0056     produceDenominatorRealData+
0057     produceDenominatorRealMuonsData
0058     )
0059 produceDenomsJet = cms.Sequence(produceDenominatorRealData)
0060 produceDenomsMultiJet = cms.Sequence(produceDenomsJet)
0061 
0062 produceDenomsDoubleElectron = cms.Sequence(produceDenominatorRealElectronsData)
0063 produceDenomsTauPlusX = cms.Sequence(produceDenomsDoubleElectron)
0064 
0065 #----------------------------------------------------------------------------------------------------------------------------------------
0066 #                                                  Main modules according to dataset
0067 #----------------------------------------------------------------------------------------------------------------------------------------
0068 proc.GeneralMuSequence = cms.Sequence( proc.TauValNumeratorAndDenominatorRealData * proc.TauValNumeratorAndDenominatorRealMuonsData )
0069 
0070 #Mu Dataset
0071 ## procAttributes = dir(proc) #Takes a snapshot of what there in the process
0072 ## helpers.cloneProcessingSnippet( proc, proc.GeneralMuSequence, 'AtMu') #clones the sequence inside the process with AtMu postfix
0073 ## seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForMuDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
0074 ## proc.GeneralMuSequenceAtMu.visit(seqModifier)
0075 ## #checks what's new in the process (the cloned sequences and modules in them)
0076 ## newProcAttributes = filter( lambda x: (x not in procAttributes) and (x.find('AtMu') != -1), dir(proc) )
0077 ## #spawns a local variable with the same name as the proc attribute, needed for future process.load
0078 ## for newAttr in newProcAttributes:
0079 ##     locals()[newAttr] = getattr(proc,newAttr)
0080  
0081 ## pfTauRunDQMValidationMu = cms.Sequence(
0082 ##     TauValNumeratorAndDenominatorRealDataAtMu+
0083 ##     TauValNumeratorAndDenominatorRealMuonsDataAtMu+
0084 ##     dqmInfoTauV
0085 ##     )
0086 
0087 #SingleMu Dataset
0088 procAttributes = dir(proc) #Takes a snapshot of what there in the process
0089 helpers.cloneProcessingSnippet( proc, proc.GeneralMuSequence, 'AtSingleMu') #clones the sequence inside the process with AtSingleMu postfix
0090 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForSingleMuDataset'), hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*') ) ) )
0091 proc.GeneralMuSequenceAtSingleMu.visit(seqModifier)
0092 #checks what's new in the process (the cloned sequences and modules in them)
0093 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('AtSingleMu') != -1)]
0094 #spawns a local variable with the same name as the proc attribute, needed for future process.load
0095 for newAttr in newProcAttributes:
0096     locals()[newAttr] = getattr(proc,newAttr)
0097 
0098 pfTauRunDQMValidationSingleMu = cms.Sequence(
0099     GeneralMuSequenceAtSingleMu+
0100     dqmInfoTauV
0101     )
0102 
0103 #Jet Dataset
0104 procAttributes = dir(proc) #Takes a snapshot of what there in the process
0105 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealData, 'AtJet') #clones the sequence inside the process with AtJet postfix
0106 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForJetDataset'), hltPaths = cms.vstring('HLT_Jet30_L1FastJet_v*') ) ) )
0107 proc.TauValNumeratorAndDenominatorRealDataAtJet.visit(seqModifier)
0108 #checks what's new in the process (the cloned sequences and modules in them)
0109 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('AtJet') != -1)]
0110 #spawns a local variable with the same name as the proc attribute, needed for future process.load
0111 for newAttr in newProcAttributes:
0112     locals()[newAttr] = getattr(proc,newAttr)
0113 
0114 pfTauRunDQMValidationJet = cms.Sequence(
0115     TauValNumeratorAndDenominatorRealDataAtJet+
0116     dqmInfoTauV
0117     )
0118 
0119 #MultiJet Dataset
0120 procAttributes = dir(proc) #Takes a snapshot of what there in the process
0121 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealData, 'AtMultiJet') #clones the sequence inside the process with AtMultiJet postfix
0122 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForMultiJetDataset'), hltPaths = cms.vstring('OUR_HLT_FALLBACK_PATH') ) ) )
0123 proc.TauValNumeratorAndDenominatorRealDataAtMultiJet.visit(seqModifier)
0124 #checks what's new in the process (the cloned sequences and modules in them)
0125 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('AtMultiJet') != -1)]
0126 #spawns a local variable with the same name as the proc attribute, needed for future process.load
0127 for newAttr in newProcAttributes:
0128     locals()[newAttr] = getattr(proc,newAttr)
0129 
0130 pfTauRunDQMValidationMultiJet = cms.Sequence(
0131     TauValNumeratorAndDenominatorRealDataAtMultiJet+
0132     dqmInfoTauV
0133     )
0134 
0135 #DoubleElectron Dataset
0136 procAttributes = dir(proc) #Takes a snapshot of what there in the process
0137 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealElectronsData, 'AtDoubleElectron') #clones the sequence inside the process with AtDoubleElectron postfix
0138 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForDoubleElectronDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoVT_TrkIdT_TrkIsoVT_SC4_Mass50_v*') ) ) ) 
0139 proc.TauValNumeratorAndDenominatorRealElectronsDataAtDoubleElectron.visit(seqModifier)
0140 #checks what's new in the process (the cloned sequences and modules in them)
0141 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('AtDoubleElectron') != -1)]
0142 #spawns a local variable with the same name as the proc attribute, needed for future process.load
0143 for newAttr in newProcAttributes:
0144     locals()[newAttr] = getattr(proc,newAttr)
0145 
0146 pfTauRunDQMValidationDoubleElectron = cms.Sequence(
0147     TauValNumeratorAndDenominatorRealElectronsDataAtDoubleElectron+
0148     dqmInfoTauV
0149     )
0150 
0151 #TauPlusX Dataset
0152 procAttributes = dir(proc) #Takes a snapshot of what there in the process
0153 helpers.cloneProcessingSnippet( proc, proc.TauValNumeratorAndDenominatorRealElectronsData, 'TauPlusX') #clones the sequence inside the process with TauPlusX postfix
0154 seqModifier = ApplyFunctionToSequence( lambda module: setTrigger( module, cms.PSet( hltDBKey = cms.string('TauTriggerForTauPlusXDataset'), hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoRhoT_TrkIdT_TrkIsoT_LooseIsoPFTau20_v*') ) ) )
0155 proc.TauValNumeratorAndDenominatorRealElectronsDataTauPlusX.visit(seqModifier)
0156 #checks what's new in the process (the cloned sequences and modules in them)
0157 newProcAttributes = [x for x in dir(proc) if (x not in procAttributes) and (x.find('TauPlusX') != -1)]
0158 #spawns a local variable with the same name as the proc attribute, needed for future process.load
0159 for newAttr in newProcAttributes:
0160     locals()[newAttr] = getattr(proc,newAttr)
0161 
0162 pfTauRunDQMValidationTauPlusX = cms.Sequence(
0163     TauValNumeratorAndDenominatorRealElectronsDataTauPlusX+
0164     dqmInfoTauV
0165     )
0166 
0167 #----------------------------------------------------------------------------------------------------------------------------------------
0168 #                                                      Efficiencies production according to dataset
0169 #----------------------------------------------------------------------------------------------------------------------------------------
0170 ## runTauEffMu = cms.Sequence(
0171 ##     efficienciesRealMuonsData+
0172 ##     efficienciesRealData+
0173 ##     normalizePlotsRealMuonsData
0174 ##     )
0175 runTauEffSingleMu =  cms.Sequence(
0176     efficienciesRealMuonsData+
0177     efficienciesRealData+
0178     normalizePlotsRealMuonsData
0179     )       
0180 
0181 runTauEffJet = cms.Sequence(TauEfficienciesRealData)
0182 runTauEffMutiJet = cms.Sequence(runTauEffJet)
0183 
0184 runTauEffDoubleElectron = cms.Sequence(produceDenominatorRealElectronsData)
0185 runTauEffTauPlusX = cms.Sequence(runTauEffDoubleElectron)
0186 
0187 ##Full sequences, including normalizations
0188 ## TauEfficienciesRealData+
0189 ## TauEfficienciesRealElectronsData+
0190 ## TauEfficienciesRealMuonsData
0191