1 from PhysicsTools.Heppy.analyzers.DiLeptonAnalyzer
import DiLeptonAnalyzer
2 from PhysicsTools.Heppy.analyzers.AutoHandle
import AutoHandle
3 from PhysicsTools.Heppy.physicsobjects.DiObject
import DiMuon
4 from PhysicsTools.Heppy.physicsobjects.PhysicsObjects
import Muon
14 print 'ZMuMuAnalyzer.declareHandles'
15 self.handles[
'diLeptons'] = AutoHandle(
17 'std::vector<cmg::DiObject<cmg::Muon,cmg::Muon>>'
19 self.handles[
'leptons'] = AutoHandle(
21 'std::vector<cmg::Muon>'
23 self.handles[
'otherLeptons'] = AutoHandle(
25 'std::vector<cmg::Electron>'
30 '''Build di-leptons, associate best vertex to both legs,
31 select di-leptons with a tight ID muon.
32 The tight ID selection is done so that dxy and dz can be computed
33 (the muon must not be standalone).
36 for index, dil
in enumerate(cmgDiLeptons):
37 pydil = self.__class__.DiObjectClass(dil)
38 pydil.leg1().associatedVertex = event.goodVertices[0]
39 pydil.leg2().associatedVertex = event.goodVertices[0]
40 diLeptons.append( pydil )
53 '''Tests vertex constraints, for mu and tau'''
54 return abs(lepton.dxy()) < 0.045
and \
55 abs(lepton.dz()) < 0.2
59 '''dbeta corrected pf isolation with all charged particles instead of
61 return muon.relIsoAllChargedDB05()<isocut
63 testLeg1Iso = testMuonIso
64 testLeg2Iso = testMuonIso
67 '''Tight muon selection, no isolation requirement'''
69 return muon.tightId()
and \
73 testLeg1ID = testMuonID
74 testLeg2ID = testMuonID
Abs< T >::type abs(const T &t)