CMS 3D CMS Logo

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__ (self, leg1, leg2, pdgid, status=3)
 
def charge (self)
 
def energy (self)
 
def eta (self)
 
def mass (self)
 
def p4 (self)
 
def pdgId (self)
 
def phi (self)
 
def pt (self)
 

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

Member Function Documentation

def ResonanceBuilder.Resonance.charge (   self)

Definition at line 50 of file ResonanceBuilder.py.

References ResonanceBuilder.Resonance._charge.

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

Definition at line 38 of file ResonanceBuilder.py.

Referenced by Jet.Jet.rawEnergy().

38  def energy(self):
39  return self._p4.energy()
40 
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  def eta(self):
42  return self._p4.eta()
43 
def ResonanceBuilder.Resonance.mass (   self)

Definition at line 47 of file ResonanceBuilder.py.

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

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

Definition at line 53 of file ResonanceBuilder.py.

References ResonanceBuilder.Resonance._pdgid.

Referenced by Particle.Particle.__str__().

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

Definition at line 44 of file ResonanceBuilder.py.

Referenced by Particle.Particle.__str__(), and ntupleDataFormat.Track.phiPull().

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

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().