test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
DiObject.DiObject Class Reference
Inheritance diagram for DiObject.DiObject:
DiObject.DiElectron DiObject.DiMuon DiObject.DiTau DiObject.MuonElectron DiObject.TauElectron DiObject.TauMuon DiObject.TauTau

Public Member Functions

def __init__
 
def __str__
 
def sumPt
 

Public Attributes

 diobject
 
 leg1DeltaR
 
 leg1Gen
 
 leg2DeltaR
 
 leg2Gen
 

Detailed Description

Generic di-object class, to handle di-objects from the EDM file

Definition at line 8 of file DiObject.py.

Constructor & Destructor Documentation

def DiObject.DiObject.__init__ (   self,
  diobject 
)
diobject is the di-object read from the edm file

Definition at line 12 of file DiObject.py.

12 
13  def __init__(self, diobject):
14  '''diobject is the di-object read from the edm file'''
15  self.diobject = diobject
16  self.leg1Gen = None
17  self.leg2Gen = None
18  self.leg1DeltaR = -1
19  self.leg2DeltaR = -1
20  super(DiObject, self).__init__(diobject)

Member Function Documentation

def DiObject.DiObject.__str__ (   self)

Definition at line 25 of file DiObject.py.

References join(), ResonanceBuilder.Resonance.leg1, DiObject.DiMuon.leg1(), ZMuMuRochCorAnalyzer.DiMuon.leg1(), DiObject.DiElectron.leg1(), DiObject.TauMuon.leg1(), DiObject.TauElectron.leg1(), DiObject.MuonElectron.leg1(), DiObject.TauTau.leg1(), ResonanceBuilder.Resonance.leg2, DiObject.DiMuon.leg2(), ZMuMuRochCorAnalyzer.DiMuon.leg2(), DiObject.DiElectron.leg2(), DiObject.TauMuon.leg2(), DiObject.TauElectron.leg2(), DiObject.MuonElectron.leg2(), DiObject.TauTau.leg2(), reco::MuonIsolation.sumPt, DiObject.DiObject.sumPt(), PileupJetIdentifier.sumPt(), and MBUEandQCDValidation.sumPt.

25 
26  def __str__(self):
27  header = '{cls}: mvis={mvis}, mT={mt}, sumpT={sumpt}'.format(
28  cls = self.__class__.__name__,
29  mvis = self.diobject.mass(),
30  mt = self.diobject.mTLeg2(),
31  sumpt = self.sumPt() )
32  return '\n'.join( [header,
33  '\t'+str(self.leg1()),
34  '\t'+str(self.leg2())] )
35 
36 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def DiObject.DiObject.sumPt (   self)
pt_leg1 + pt_leg2, e.g. used for finding the best DiTau.

Definition at line 21 of file DiObject.py.

References ResonanceBuilder.Resonance.leg1, DiObject.DiMuon.leg1(), ZMuMuRochCorAnalyzer.DiMuon.leg1(), DiObject.DiElectron.leg1(), DiObject.TauMuon.leg1(), DiObject.TauElectron.leg1(), DiObject.MuonElectron.leg1(), DiObject.TauTau.leg1(), ResonanceBuilder.Resonance.leg2, DiObject.DiMuon.leg2(), ZMuMuRochCorAnalyzer.DiMuon.leg2(), DiObject.DiElectron.leg2(), DiObject.TauMuon.leg2(), DiObject.TauElectron.leg2(), DiObject.MuonElectron.leg2(), DiObject.TauTau.leg2(), and EnergyCorrector.pt.

Referenced by DiObject.DiObject.__str__(), DiObject.DiMuon.__str__(), and DiObject.DiElectron.__str__().

21 
22  def sumPt(self):
23  '''pt_leg1 + pt_leg2, e.g. used for finding the best DiTau.'''
24  return self.leg1().pt() + self.leg2().pt()

Member Data Documentation

DiObject.DiObject.diobject

Definition at line 14 of file DiObject.py.

DiObject.DiObject.leg1DeltaR

Definition at line 17 of file DiObject.py.

DiObject.DiObject.leg1Gen

Definition at line 15 of file DiObject.py.

DiObject.DiObject.leg2DeltaR

Definition at line 18 of file DiObject.py.

DiObject.DiObject.leg2Gen

Definition at line 16 of file DiObject.py.