def declareHandles(self): super(ttHSVAnalyzer, self).declareHandles() self.handles['ivf'] = AutoHandle( ('slimmedSecondaryVertices', ''), 'std::vector<reco::VertexCompositePtrCandidate>') self.mchandles['packedGen'] = AutoHandle( 'packedGenParticles', 'std::vector<pat::PackedGenParticle>')
def declareHandles(self): super(VVBuilder, self).declareHandles() self.handles['packed'] = AutoHandle( 'packedPFCandidates', 'std::vector<pat::PackedCandidate>') if self.cfg_comp.isMC: self.handles['packedGen'] = AutoHandle( 'packedGenParticles', 'std::vector<pat::PackedGenParticle>')
def declareHandles(self): super(ConversionsAnalyzer, self).declareHandles() self.handles['generalTracks'] = AutoHandle(('generalTracks', ''), 'vector<reco::Track>') self.handles['gedGsfElectrons'] = AutoHandle( ('gedGsfElectrons', ''), 'vector<reco::GsfElectron>')
def declareHandles(self): super(L1TriggerAnalyzer, self).declareHandles() if (self.cfg_ana, 'label'): label = self.cfg_ana.label else: label = 'l1extraParticles' self.handles['EmIsolated'] = AutoHandle( (label, 'Isolated'), 'std::vector<l1extra::L1EmParticle>') self.handles['EmNonIsolated'] = AutoHandle( (label, 'NonIsolated'), 'std::vector<l1extra::L1EmParticle>') self.handles['MET'] = AutoHandle( (label, 'MET'), 'std::vector<l1extra::L1EtMissParticle>') self.handles['MHT'] = AutoHandle( (label, 'MHT'), 'std::vector<l1extra::L1EtMissParticle>') self.handles['HFRings'] = AutoHandle((label, ''), 'std::vector<l1extra::L1HFRings>') self.handles['CentralJet'] = AutoHandle( (label, 'Central'), 'std::vector<l1extra::L1JetParticle>') self.handles['ForwardJet'] = AutoHandle( (label, 'Forward'), 'std::vector<l1extra::L1JetParticle>') self.handles['IsoTau'] = AutoHandle( (label, 'IsoTau'), 'std::vector<l1extra::L1JetParticle>') self.handles['Tau'] = AutoHandle((label, 'Tau'), 'std::vector<l1extra::L1JetParticle>') self.handles['Muon'] = AutoHandle( (label, ''), 'std::vector<l1extra::L1MuonParticle>')
def declareHandles(self): super(GenHFHadronMatcher, self).declareHandles() #self.genJetsSrc = "slimmedGenJets" self.keys_b = [ "genBHadIndex", "genBHadJetIndex", "genBHadFlavour", "genBHadFromTopWeakDecay", #"genBHadLeptonViaTau" ] self.keys_c = [ "genCHadIndex", "genCHadJetIndex", "genCHadFlavour", "genCHadFromTopWeakDecay", #"genCHadLeptonViaTau", "genCHadBHadronId", ] for x in self.keys_b: self.handles[x] = AutoHandle(("matchGenBHadron", x, "EX"), "std::vector<int>") for x in self.keys_c: self.handles[x] = AutoHandle(("matchGenCHadron", x, "EX"), "std::vector<int>") self.handles['genBHadJetIndex'] = AutoHandle( ("matchGenBHadron", "genBHadJetIndex", "EX"), "std::vector<int>") self.handles['ttbarCategory'] = AutoHandle( ("categorizeGenTtbar", "genTtbarId", "EX"), "int") self.genJetMinPt = 20 self.genJetMaxEta = 2.4
def declareHandles(self): super(JetAnalyzer, self).declareHandles() self.handles['jets'] = AutoHandle( self.cfg_ana.jetCol, 'std::vector<pat::Jet>' ) self.handles['genJet'] = AutoHandle( self.cfg_ana.genJetCol, 'vector<reco::GenJet>' ) self.shiftJER = self.cfg_ana.shiftJER if hasattr(self.cfg_ana, 'shiftJER') else 0 self.addJERShifts = self.cfg_ana.addJERShifts if hasattr(self.cfg_ana, 'addJERShifts') else 0 self.handles['rho'] = AutoHandle( self.cfg_ana.rho, 'double' )
def declareHandles(self): super(DYJetsFakeAnalyzer, self).declareHandles() self.mchandles['genInfo'] = AutoHandle(('generator','',''), 'GenEventInfoProduct' ) self.mchandles['genJets'] = AutoHandle('slimmedGenJets', 'std::vector<reco::GenJet>') self.handles['jets'] = AutoHandle('slimmedJets', 'std::vector<pat::Jet>')
def declareHandles(self): super(AdditionalBTag, self).declareHandles() #self.handles['btagnew'] = AutoHandle( ("combinedInclusiveSecondaryVertexV2BJetTags","","EX"), "edm::AssociationVector<edm::RefToBaseProd<reco::Jet>,vector<float>,edm::RefToBase<reco::Jet>,unsigned int,edm::helper::AssociationIdenticalKeyReference>") #self.handles['btagcsv'] = AutoHandle( ("combinedSecondaryVertexBJetTags","","EX"), "edm::AssociationVector<edm::RefToBaseProd<reco::Jet>,vector<float>,edm::RefToBase<reco::Jet>,unsigned int,edm::helper::AssociationIdenticalKeyReference>") self.handles['btagSoftEl'] = AutoHandle(( "softPFElectronBJetTags", "", "EX" ), "edm::AssociationVector<edm::RefToBaseProd<reco::Jet>,vector<float>,edm::RefToBase<reco::Jet>,unsigned int,edm::helper::AssociationIdenticalKeyReference>" ) self.handles['btagSoftMu'] = AutoHandle(( "softPFMuonBJetTags", "", "EX" ), "edm::AssociationVector<edm::RefToBaseProd<reco::Jet>,vector<float>,edm::RefToBase<reco::Jet>,unsigned int,edm::helper::AssociationIdenticalKeyReference>" ) self.bdtVars = [ "Jet_CSV", "Jet_CSVIVF", "Jet_JP", "Jet_JBP", "Jet_SoftMu", "Jet_SoftEl" ] reader = ROOT.TMVA.Reader() self.Jet_CSV = array.array('f', [0]) self.Jet_CSVIVF = array.array('f', [0]) self.Jet_JP = array.array('f', [0]) self.Jet_JBP = array.array('f', [0]) self.Jet_SoftMu = array.array('f', [0]) self.Jet_SoftEl = array.array('f', [0]) for var in self.bdtVars: reader.AddVariable(var, getattr(self, var)) #https://github.com/cms-data/RecoBTag-Combined/blob/master/CombinedMVAV2_13_07_2015.weights.xml.gz self.weightfile = os.environ[ 'CMSSW_BASE'] + "/src/VHbbAnalysis/Heppy/data/btag/CombinedMVAV2_13_07_2015.weights.xml" print "booking BDT from {0}".format(self.weightfile) reader.BookMVA("bdt", self.weightfile) self.reader = reader
def declareHandles(self): super(XZZGenLep, self).declareHandles() #leptons self.handles['muons'] = AutoHandle(self.cfg_ana.muons, "std::vector<pat::Muon>") self.handles['electrons'] = AutoHandle(self.cfg_ana.electrons, "std::vector<pat::Electron>") # packedCandidates self.handles['packedCandidates'] = AutoHandle( self.cfg_ana.packedCandidates, 'std::vector<pat::PackedCandidate>') #rho for muons self.handles['rhoMu'] = AutoHandle(self.cfg_ana.rhoMuon, 'double') #rho for electrons self.handles['rhoEle'] = AutoHandle(self.cfg_ana.rhoElectron, 'double') # effective area self.ele_effectiveAreas = getattr(self.cfg_ana, 'ele_effectiveAreas', "Spring15_25ns_v1") self.mu_effectiveAreas = getattr(self.cfg_ana, 'mu_effectiveAreas', "Spring15_25ns_v1") self.miniIsolationPUCorr = self.cfg_ana.miniIsolationPUCorr if self.miniIsolationPUCorr == "weights": self.IsolationComputer = heppy.IsolationComputer(0.4) else: self.IsolationComputer = heppy.IsolationComputer()
def declareHandles(self): super(HNLSignalReweighter, self).declareHandles() self.mchandles['genp_pruned'] = AutoHandle( ('prunedGenParticles', '', 'PAT'), 'std::vector<reco::GenParticle>') self.mchandles['lhe'] = AutoHandle('externalLHEProducer', 'LHEEventProduct')
def declareHandles(self): super(MT2Analyzer, self).declareHandles() #genJets self.handles['genJets'] = AutoHandle('slimmedGenJets', 'std::vector<reco::GenJet>') self.handles['met'] = AutoHandle(self.cfg_ana.metCollection, 'std::vector<pat::MET>')
def declareHandles(self): super(TriggerMatchAnalyzer, self).declareHandles() self.handles['TriggerBits'] = AutoHandle(('TriggerResults', '', 'HLT'), 'edm::TriggerResults') self.handles['TriggerObjects'] = AutoHandle( ('selectedPatTrigger', '', self.processName), 'std::vector<pat::TriggerObjectStandAlone>')
def declareHandles(self): super(L1GenAnalyzer, self).declareHandles() self.handles['L1muons'] = AutoHandle( ('gmtStage2Digis', 'Muon'), 'BXVector<l1t::Muon>' ) self.mchandles['prunedGenParticles'] = AutoHandle( 'prunedGenParticles', 'std::vector<reco::GenParticle>' ) self.mchandles['packedGenParticles'] = AutoHandle( 'packedGenParticles', 'std::vector<pat::PackedGenParticle>' ) self.mchandles['genInfo'] = AutoHandle( 'generator', 'GenEventInfoProduct' ) self.handles['jets'] = AutoHandle( 'slimmedJets', 'std::vector<pat::Jet>' )
def declareHandles(self): super(METAnalyzer, self).declareHandles() self.handles['met'] = AutoHandle( self.cfg_ana.metCollection, 'std::vector<pat::MET>' ) self.handles['nopumet'] = AutoHandle( self.cfg_ana.noPUMetCollection, 'std::vector<pat::MET>' ) self.handles['cmgCand'] = AutoHandle( self.cfg_ana.candidates, self.cfg_ana.candidatesTypes ) self.handles['vertices'] = AutoHandle( "offlineSlimmedPrimaryVertices", 'std::vector<reco::Vertex>', fallbackLabel="offlinePrimaryVertices" ) self.mchandles['packedGen'] = AutoHandle( 'packedGenParticles', 'std::vector<pat::PackedGenParticle>' )
def declareHandles(self): super(TriggerBitAnalyzer, self).declareHandles() fallback = ('TriggerResults', '', self.fallbackName) if self.fallbackName else None prescaleFallback = ( 'patTrigger', '', self.prescaleFallbackName) if self.prescaleFallbackName else None self.handles['TriggerResults'] = AutoHandle( ('TriggerResults', '', self.processName), 'edm::TriggerResults', fallbackLabel=fallback) if self.saveIsUnprescaled: self.handles["TriggerPrescales"] = AutoHandle( ('patTrigger', '', self.prescaleProcessName), 'pat::PackedTriggerPrescales', fallbackLabel=prescaleFallback) if self.checkL1prescale: self.handles["TriggerPrescales_l1min"] = AutoHandle( ('patTrigger', 'l1min', self.prescaleProcessName), 'pat::PackedTriggerPrescales', fallbackLabel=(('patTrigger', 'l1min', self.prescaleFallbackName) if self.prescaleFallbackName else None)) self.handles["TriggerPrescales_l1max"] = AutoHandle( ('patTrigger', 'l1max', self.prescaleProcessName), 'pat::PackedTriggerPrescales', fallbackLabel=(('patTrigger', 'l1max', self.prescaleFallbackName) if self.prescaleFallbackName else None))
def declareHandles(self): super(SimTrackReader, self).declareHandles() self.handles['SimTrack'] = AutoHandle(self.cfg_ana.SimTrack, 'std::vector<SimTrack>') if hasattr(self.cfg_ana, 'SimVertex'): self.handles['SimVertex'] = AutoHandle(self.cfg_ana.SimVertex, 'std::vector<SimVertex>')
def declareHandles(self): super(LeptonSelector, self).declareHandles() self.handles['electrons'] = AutoHandle('slimmedElectrons', 'std::vector<pat::Electron>') self.handles['muons'] = AutoHandle('slimmedMuons', 'std::vector<pat::Muon>')
def declareHandles(self): super(susyParameterScanAnalyzer, self).declareHandles() #mc information self.mchandles['genParticles'] = AutoHandle( 'prunedGenParticles', 'std::vector<reco::GenParticle>' ) if self.cfg_ana.doLHE: self.mchandles['lhe'] = AutoHandle( 'source', 'LHEEventProduct', mayFail = True, lazy = False )
def declareHandles(self): super(HTTGenAnalyzer, self).declareHandles() self.mchandles['genInfo'] = AutoHandle(('generator','',''), 'GenEventInfoProduct' ) self.mchandles['genJets'] = AutoHandle('slimmedGenJets', 'std::vector<reco::GenJet>') self.mchandles['genParticles'] = AutoHandle('prunedGenParticles', 'std::vector<reco::GenParticle') self.handles['jets'] = AutoHandle(self.cfg_ana.jetCol, 'std::vector<pat::Jet>')
def declareHandles(self): super(GeneratorAnalyzer, self).declareHandles() #mc information self.mchandles['genParticles'] = AutoHandle( 'prunedGenParticles', 'std::vector<reco::GenParticle>' ) if self.doPDFWeights: self.mchandles['pdfstuff'] = AutoHandle( 'generator', 'GenEventInfoProduct' )
def declareHandles(self): super(TauIsoAnalyzer, self).declareHandles() self.handles['taus'] = AutoHandle('slimmedTaus', 'std::vector<pat::Tau>') self.handles['pu'] = AutoHandle('slimmedAddPileupInfo', 'std::vector<PileupSummaryInfo>') self.handles['gen'] = AutoHandle('prunedGenParticles', 'std::vector<reco::GenParticle>') self.handles['gen_jets'] = AutoHandle('slimmedGenJets', 'vector<reco::GenJet>>') self.handles['pf_candidates'] = AutoHandle('packedPFCandidates', 'vector<pat::PackedCandidate>>')
def declareHandles(self): super(LeptonIDOverloader, self).declareHandles() self.handles['packed'] = AutoHandle( 'packedPFCandidates', 'std::vector<pat::PackedCandidate>') self.handles['lostTracks'] = AutoHandle( 'lostTracks', 'std::vector<pat::PackedCandidate>') self.handles['electrons'] = AutoHandle('slimmedElectrons', 'std::vector<pat::Electron>')
def declareHandles(self): super(EventInterpretationBase, self).declareHandles() self.handles['packed'] = AutoHandle( 'packedPFCandidates', 'std::vector<pat::PackedCandidate>' ) self.handles['rho'] = AutoHandle( self.cfg_ana.rho, 'double' ) if self.attachBTag or self.doSkim: self.handles['jets'] = AutoHandle( self.cfg_ana.standardJets, 'std::vector<pat::Jet>' ) self.handles['fatjets'] = AutoHandle( self.cfg_ana.fatJets, 'std::vector<pat::Jet>' ) self.handles['subjets'] = AutoHandle( (self.cfg_ana.subJets,'SubJets'), 'std::vector<pat::Jet>' )
def declareHandles(self): super(H2TauTauEventSorter, self).declareHandles() self.mchandles['genParticles'] = AutoHandle( 'genParticlesStatus3', 'std::vector<reco::GenParticle>') self.embhandles['generatorWeight'] = AutoHandle( ('generator', 'weight'), 'double')
def declareHandles(self): super(TauFRTreeProducer, self).declareHandles() if self.cfg_comp.isMC: self.mchandles['genJets'] = AutoHandle( 'slimmedGenJets', 'std::vector<reco::GenJet>') # self.handles['puppi_met'] = AutoHandle('slimmedMETsPuppi', 'std::vector<pat::MET>') self.handles['pfmet'] = AutoHandle('slimmedMETs', 'std::vector<pat::MET>')
def declareHandles(self): super(GeneratorAnalyzer, self).declareHandles() self.mchandles['genParticles'] = AutoHandle( 'prunedGenParticles', 'std::vector<reco::GenParticle>') if self.makeLHEweights: self.mchandles['LHEweights'] = AutoHandle('source', 'LHEEventProduct', mayFail=True, lazy=False)
def declareHandles(self): super(HNLGenTreeAnalyzer, self).declareHandles() self.mchandles['genp_pruned'] = AutoHandle( ('prunedGenParticles', '', 'PAT'), 'std::vector<reco::GenParticle>') self.mchandles['genp_packed'] = AutoHandle( ('packedGenParticles', '', 'PAT'), 'std::vector<pat::PackedGenParticle>')
def declareHandles(self): super(XZZLHEWeightAnalyzer, self).declareHandles() self.mchandles['GenInfo'] = AutoHandle(('generator', '', ''), 'GenEventInfoProduct') self.mchandles['LHEweights'] = AutoHandle('externalLHEProducer', 'LHEEventProduct', mayFail=True, fallbackLabel='source', lazy=False)
def declareHandles(self): super(TauTreeProducer, self).declareHandles() self.mchandles['genJets'] = AutoHandle('slimmedGenJets', 'std::vector<reco::GenJet>') self.handles['puppi_met'] = AutoHandle('pfMetPuppi', 'std::vector<reco::PFMET>') self.handles['pfmet'] = AutoHandle('slimmedMETs', 'std::vector<pat::MET>')
def declareHandles(self): super(JetAnalyzer, self).declareHandles() self.handles['jets'] = AutoHandle(self.cfg_ana.jetCol, 'std::vector<pat::Jet>') if self.cfg_comp.isMC: self.mchandles['genParticles'] = AutoHandle('packedGenParticles', 'std::vector<pat::PackedGenParticle>') self.mchandles['genJets'] = AutoHandle('slimmedGenJets', 'std::vector<reco::GenJet>')