1 from __future__
import print_function
2 from PhysicsTools.Heppy.analyzers.DiLeptonAnalyzer
import DiLeptonAnalyzer
3 from PhysicsTools.Heppy.analyzers.AutoHandle
import AutoHandle
4 from PhysicsTools.Heppy.physicsobjects.DiObject
import DiMuon
5 from PhysicsTools.Heppy.physicsobjects.PhysicsObjects
import Muon
10 DiObjectClass = DiMuon
15 print(
'ZMuMuAnalyzer.declareHandles')
16 self.handles[
'diLeptons'] = AutoHandle(
18 'std::vector<cmg::DiObject<cmg::Muon,cmg::Muon>>' 20 self.handles[
'leptons'] = AutoHandle(
22 'std::vector<cmg::Muon>' 24 self.handles[
'otherLeptons'] = AutoHandle(
26 'std::vector<cmg::Electron>' 31 '''Build di-leptons, associate best vertex to both legs, 32 select di-leptons with a tight ID muon. 33 The tight ID selection is done so that dxy and dz can be computed 34 (the muon must not be standalone). 37 for index, dil
in enumerate(cmgDiLeptons):
38 pydil = self.__class__.DiObjectClass(dil)
39 pydil.leg1().associatedVertex = event.goodVertices[0]
40 pydil.leg2().associatedVertex = event.goodVertices[0]
41 diLeptons.append( pydil )
54 '''Tests vertex constraints, for mu and tau''' 55 return abs(lepton.dxy()) < 0.045
and \
56 abs(lepton.dz()) < 0.2
60 '''dbeta corrected pf isolation with all charged particles instead of 62 return muon.relIsoAllChargedDB05()<isocut
64 testLeg1Iso = testMuonIso
65 testLeg2Iso = testMuonIso
68 '''Tight muon selection, no isolation requirement''' 70 return muon.tightId()
and \
74 testLeg1ID = testMuonID
75 testLeg2ID = testMuonID
S & print(S &os, JobReport::InputFile const &f)
def buildLeptons(self, cmgLeptons, event)
Abs< T >::type abs(const T &t)
def testVertex(self, lepton)
def testMuonID(self, muon)
def testMuonIso(self, muon, isocut)
def buildDiLeptons(self, cmgDiLeptons, event)
def buildOtherLeptons(self, cmgLeptons, event)