Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:33:18

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