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 | Private Attributes
ResonanceBuilder.Resonance Class Reference
Inheritance diagram for ResonanceBuilder.Resonance:

Public Member Functions

def __init__
 
def charge
 
def energy
 
def eta
 
def mass
 
def p4
 
def pdgId
 
def phi
 
def pt
 

Public Attributes

 leg1
 
 leg2
 

Private Attributes

 _charge
 
 _p4
 
 _pdgid
 
 _status
 

Detailed Description

Resonance decaying into 2 particles.

The interface of this class mimics the interface of the CMS Candidate class. 
In this way Resonance objects or CMS Candidate objects can be processed 
transparently. 

Definition at line 10 of file ResonanceBuilder.py.

Constructor & Destructor Documentation

def ResonanceBuilder.Resonance.__init__ (   self,
  leg1,
  leg2,
  pdgid,
  status = 3 
)
Parameters (stored as attributes):
leg1,2 : first and second leg.
pdgid  : pdg code of the resonance
status : status code of the resonance

Definition at line 18 of file ResonanceBuilder.py.

18 
19  def __init__(self, leg1, leg2, pdgid, status=3):
20  '''
21  Parameters (stored as attributes):
22  leg1,2 : first and second leg.
23  pdgid : pdg code of the resonance
24  status : status code of the resonance
25  '''
26  self.leg1 = leg1
27  self.leg2 = leg2
28  self._p4 = leg1.p4() + leg2.p4()
29  self._charge = leg1.charge() + leg2.charge()
30  self._pdgid = pdgid
31  self._status = status

Member Function Documentation

def ResonanceBuilder.Resonance.charge (   self)

Definition at line 50 of file ResonanceBuilder.py.

References ResonanceBuilder.Resonance._charge.

50 
51  def charge(self):
52  return self._charge
def ResonanceBuilder.Resonance.energy (   self)

Definition at line 38 of file ResonanceBuilder.py.

Referenced by Jet.Jet.rawEnergy().

38 
39  def energy(self):
40  return self._p4.energy()
def ResonanceBuilder.Resonance.eta (   self)

Definition at line 41 of file ResonanceBuilder.py.

Referenced by Particle.Particle.__str__(), Jet.Jet.jetID(), and Jet.Jet.puJetId().

41 
42  def eta(self):
43  return self._p4.eta()
def ResonanceBuilder.Resonance.mass (   self)

Definition at line 47 of file ResonanceBuilder.py.

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

47 
48  def mass(self):
49  return self._p4.mass()
def ResonanceBuilder.Resonance.p4 (   self)

Definition at line 32 of file ResonanceBuilder.py.

References ResonanceBuilder.Resonance._p4.

Referenced by Tau.Tau.dxy_approx(), Tau.Tau.dz(), and Lepton.Lepton.p4WithFSR().

32 
33  def p4(self):
34  return self._p4
def ResonanceBuilder.Resonance.pdgId (   self)

Definition at line 53 of file ResonanceBuilder.py.

References ResonanceBuilder.Resonance._pdgid.

Referenced by Particle.Particle.__str__().

53 
54  def pdgId(self):
55  return self._pdgid
56 
def ResonanceBuilder.Resonance.phi (   self)

Definition at line 44 of file ResonanceBuilder.py.

Referenced by Particle.Particle.__str__().

44 
45  def phi(self):
46  return self._p4.phi()
def ResonanceBuilder.Resonance.pt (   self)

Definition at line 35 of file ResonanceBuilder.py.

Referenced by Particle.Particle.__str__(), DiObject.DiMuon.__str__(), Photon.Photon.calScaledIsoValueExp(), Photon.Photon.calScaledIsoValueLin(), Photon.Photon.calScaledIsoValueQuadr(), Electron.Electron.mvaIDLoose(), Electron.Electron.mvaIDRun2(), Electron.Electron.mvaIDTight(), Electron.Electron.ptErr(), Lepton.Lepton.relIso(), Lepton.Lepton.relIsoFromEA(), Lepton.Lepton.relIsoR(), and Jet.Jet.setCorrP4().

35 
36  def pt(self):
37  return self._p4.pt()

Member Data Documentation

ResonanceBuilder.Resonance._charge
private

Definition at line 28 of file ResonanceBuilder.py.

Referenced by ResonanceBuilder.Resonance.charge().

ResonanceBuilder.Resonance._p4
private

Definition at line 27 of file ResonanceBuilder.py.

Referenced by ResonanceBuilder.Resonance.p4().

ResonanceBuilder.Resonance._pdgid
private

Definition at line 29 of file ResonanceBuilder.py.

Referenced by ResonanceBuilder.Resonance.pdgId().

ResonanceBuilder.Resonance._status
private

Definition at line 30 of file ResonanceBuilder.py.

ResonanceBuilder.Resonance.leg1

Definition at line 25 of file ResonanceBuilder.py.

Referenced by DiObject.DiObject.__str__(), and DiObject.DiObject.sumPt().

ResonanceBuilder.Resonance.leg2

Definition at line 26 of file ResonanceBuilder.py.

Referenced by DiObject.DiObject.__str__(), and DiObject.DiObject.sumPt().