CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
Particle Class Reference

#include <Particle.h>

Public Member Functions

void Boost (const TVector3 &val)
 
void Boost (const TLorentzVector &val)
 
ParticlePDGDef () const
 
ParticlePDGDef (ParticlePDG *newProp)
 
double E () const
 
double E (double val)
 
int Encoding () const
 
double Eta () const
 
bool GetDecayed () const
 
int GetFirstDaughterIndex ()
 
int GetIndex ()
 
int GetLastDaughterIndex ()
 
int GetLastInterNumber () const
 
double GetLastInterTime () const
 
const TLorentzVector & GetLastMotherDecayCoor () const
 
const TLorentzVector & GetLastMotherDecayMom () const
 
int GetLastMotherPdg () const
 
int GetMother ()
 
int GetNDaughters ()
 
int GetPythiaStatusCode ()
 
int GetType () const
 
void IncInter ()
 
TLorentzVector & Mom ()
 
const TLorentzVector & Mom () const
 
TLorentzVector & Mom (const TLorentzVector &val)
 
 Particle (ParticlePDG *pdg=0)
 
 Particle (ParticlePDG *pdg, const TLorentzVector &pos, const TLorentzVector &mom, double lastInterTime=0., int lastInterNum=0, int type=0)
 
 Particle (ParticlePDG *pdg, const TLorentzVector &pos, const TLorentzVector &mom, double lastInterTime, int lastInterNum, int type, int motherPdg, const TLorentzVector &motherPos, const TLorentzVector &motherMom)
 
double Phi () const
 
TLorentzVector & Pos ()
 
const TLorentzVector & Pos () const
 
TLorentzVector & Pos (const TLorentzVector &val)
 
double Pt () const
 
double Px () const
 
double Px (double val)
 
double Py () const
 
double Py (double val)
 
double Pz () const
 
double Pz (double val)
 
double Rapidity () const
 
void SetDecayed ()
 
void SetFirstDaughterIndex (int index)
 
int SetIndex ()
 
void SetLastDaughterIndex (int index)
 
void SetLastInterNumber (int value)
 
void SetLastInterTime (double value)
 
TLorentzVector & SetLastMotherDecayCoor (const TLorentzVector &val)
 
TLorentzVector & SetLastMotherDecayMom (const TLorentzVector &val)
 
void SetLastMotherPdg (int value)
 
void SetMother (int value)
 
void SetPythiaStatusCode (int code)
 
void SetType (int value)
 
void Shift (const TVector3 &val)
 
double T () const
 
double T (double val)
 
double TableMass () const
 
double Theta () const
 
void TransformMomentum (const TRotation &rotator)
 
void TransformPosition (const TRotation &rotator)
 
double X () const
 
double X (double val)
 
double Y () const
 
double Y (double val)
 
double Z () const
 
double Z (double val)
 

Static Public Member Functions

static int GetLastIndex ()
 
static void InitIndexing ()
 

Protected Attributes

bool fDecayed
 
int fFirstDaughterIndex
 
int fIndex
 
int fInteractionNumber
 
int fLastDaughterIndex
 
double fLastInteractionTime
 
TLorentzVector fLastMotherDecayCoor
 
TLorentzVector fLastMotherDecayMom
 
int fLastMotherPdg
 
TLorentzVector fMomentum
 
int fMotherIndex
 
int fNDaughters
 
ParticlePDGfParticleProperties
 
TLorentzVector fPosition
 
int fPythiaStatusCode
 
int fType
 

Static Protected Attributes

static int fLastIndex
 

Detailed Description

Definition at line 23 of file Particle.h.

Constructor & Destructor Documentation

Particle::Particle ( ParticlePDG pdg = 0)

Definition at line 13 of file Particle.cc.

14  : fParticleProperties(prop),
18  fLastMotherPdg(0),
19  fType(0),
20  fIndex(-1),
21  fMotherIndex(-1),
22  fNDaughters(0),
25  fDecayed(kFALSE)
26 {}
int fPythiaStatusCode
Definition: Particle.h:32
int fFirstDaughterIndex
Definition: Particle.h:38
int fLastMotherPdg
Definition: Particle.h:33
ParticlePDG * fParticleProperties
Definition: Particle.h:29
int fIndex
Definition: Particle.h:35
int fLastDaughterIndex
Definition: Particle.h:39
int fNDaughters
Definition: Particle.h:37
double fLastInteractionTime
Definition: Particle.h:30
int fMotherIndex
Definition: Particle.h:36
int fType
Definition: Particle.h:34
int fInteractionNumber
Definition: Particle.h:31
bool fDecayed
Definition: Particle.h:41
Particle::Particle ( ParticlePDG pdg,
const TLorentzVector &  pos,
const TLorentzVector &  mom,
double  lastInterTime = 0.,
int  lastInterNum = 0,
int  type = 0 
)

Definition at line 28 of file Particle.cc.

References fInteractionNumber, fLastInteractionTime, fParticleProperties, and fType.

30  : fPosition(pos),
31  fMomentum(mom),
33  fIndex(-1),
34  fMotherIndex(-1),
35  fNDaughters(0),
38  fDecayed(kFALSE)
39 {
41  fInteractionNumber = lin;
42  fParticleProperties = prop;
43  fType = type;
44 }
type
Definition: HCALResponse.h:21
int fPythiaStatusCode
Definition: Particle.h:32
int fFirstDaughterIndex
Definition: Particle.h:38
ParticlePDG * fParticleProperties
Definition: Particle.h:29
int fIndex
Definition: Particle.h:35
int fLastDaughterIndex
Definition: Particle.h:39
int fNDaughters
Definition: Particle.h:37
double fLastInteractionTime
Definition: Particle.h:30
TLorentzVector fMomentum
Definition: Particle.h:26
int fMotherIndex
Definition: Particle.h:36
int fType
Definition: Particle.h:34
int fInteractionNumber
Definition: Particle.h:31
TLorentzVector fPosition
Definition: Particle.h:25
bool fDecayed
Definition: Particle.h:41
Particle::Particle ( ParticlePDG pdg,
const TLorentzVector &  pos,
const TLorentzVector &  mom,
double  lastInterTime,
int  lastInterNum,
int  type,
int  motherPdg,
const TLorentzVector &  motherPos,
const TLorentzVector &  motherMom 
)

Definition at line 46 of file Particle.cc.

References fInteractionNumber, fLastInteractionTime, fLastMotherPdg, fParticleProperties, fType, n, and edmStreamStallGrapher::t.

49  : fPosition(pos), fMomentum(mom),
51  fLastMotherDecayMom(mMom),
53  fIndex(-1),
54  fMotherIndex(-1),
55  fNDaughters(0),
58  fDecayed(kFALSE)
59 {
60  fParticleProperties = prop;
63  fType = ty;
64  fLastMotherPdg = motherPdg;
65 }
int fPythiaStatusCode
Definition: Particle.h:32
int fFirstDaughterIndex
Definition: Particle.h:38
int fLastMotherPdg
Definition: Particle.h:33
ParticlePDG * fParticleProperties
Definition: Particle.h:29
int fIndex
Definition: Particle.h:35
int fLastDaughterIndex
Definition: Particle.h:39
int fNDaughters
Definition: Particle.h:37
double fLastInteractionTime
Definition: Particle.h:30
TLorentzVector fMomentum
Definition: Particle.h:26
int fMotherIndex
Definition: Particle.h:36
int fType
Definition: Particle.h:34
int fInteractionNumber
Definition: Particle.h:31
TLorentzVector fPosition
Definition: Particle.h:25
TLorentzVector fLastMotherDecayCoor
Definition: Particle.h:27
TLorentzVector fLastMotherDecayMom
Definition: Particle.h:28
bool fDecayed
Definition: Particle.h:41

Member Function Documentation

void Particle::Boost ( const TVector3 &  val)
inline

Definition at line 78 of file Particle.h.

78 {fMomentum.Boost(val);}
TLorentzVector fMomentum
Definition: Particle.h:26
void Particle::Boost ( const TLorentzVector &  val)
inline

Definition at line 79 of file Particle.h.

79 {fMomentum.Boost(val.BoostVector());}
TLorentzVector fMomentum
Definition: Particle.h:26
ParticlePDG* Particle::Def ( ) const
inline

Definition at line 94 of file Particle.h.

Referenced by Decay(), and GetDecayTime().

94 {return fParticleProperties;}
ParticlePDG * fParticleProperties
Definition: Particle.h:29
ParticlePDG* Particle::Def ( ParticlePDG newProp)
inline

Definition at line 95 of file Particle.h.

95 {return fParticleProperties = newProp;}
ParticlePDG * fParticleProperties
Definition: Particle.h:29
double Particle::E ( ) const
inline

Definition at line 65 of file Particle.h.

Referenced by Rivet::CMS_2011_I930319::analyze(), Rivet::MC_LES_HOUCHES_SYSTEMATICS_CMS::analyze(), and GetDecayTime().

65 {return fMomentum.E();}
TLorentzVector fMomentum
Definition: Particle.h:26
double Particle::E ( double  val)
inline

Definition at line 66 of file Particle.h.

66 {fMomentum.SetE(val); return val;}
TLorentzVector fMomentum
Definition: Particle.h:26
int Particle::Encoding ( ) const

Definition at line 67 of file Particle.cc.

References fParticleProperties, and ParticlePDG::GetPDG().

Referenced by Decay().

67  {
68  return fParticleProperties->GetPDG();
69 }
int GetPDG()
Definition: ParticlePDG.h:67
ParticlePDG * fParticleProperties
Definition: Particle.h:29
double Particle::Eta ( ) const

Definition at line 75 of file Particle.cc.

References fMomentum.

75  {
76  if(fMomentum.P() != fMomentum.Pz())
77  return 0.5 * TMath::Log((fMomentum.P() + fMomentum.Pz()) / (fMomentum.P()-fMomentum.Pz()));
78  else return 1.e30;
79 }
TLorentzVector fMomentum
Definition: Particle.h:26
bool Particle::GetDecayed ( ) const
inline

Definition at line 76 of file Particle.h.

76 {return fDecayed;}
bool fDecayed
Definition: Particle.h:41
int Particle::GetFirstDaughterIndex ( )
inline

Definition at line 120 of file Particle.h.

120 {return fFirstDaughterIndex;}
int fFirstDaughterIndex
Definition: Particle.h:38
int Particle::GetIndex ( )
inline

Definition at line 103 of file Particle.h.

Referenced by Decay().

103 {return fIndex;}
int fIndex
Definition: Particle.h:35
int Particle::GetLastDaughterIndex ( )
inline

Definition at line 121 of file Particle.h.

121 {return fLastDaughterIndex;}
int fLastDaughterIndex
Definition: Particle.h:39
static int Particle::GetLastIndex ( )
inlinestatic

Definition at line 104 of file Particle.h.

104 {return fLastIndex;}
static int fLastIndex
Definition: Particle.h:40
int Particle::GetLastInterNumber ( ) const
inline

Definition at line 131 of file Particle.h.

131 {return fInteractionNumber;}
int fInteractionNumber
Definition: Particle.h:31
double Particle::GetLastInterTime ( ) const
inline

Definition at line 129 of file Particle.h.

129 {return fLastInteractionTime;}
double fLastInteractionTime
Definition: Particle.h:30
const TLorentzVector& Particle::GetLastMotherDecayCoor ( ) const
inline

Definition at line 124 of file Particle.h.

124 {return fLastMotherDecayCoor;}
TLorentzVector fLastMotherDecayCoor
Definition: Particle.h:27
const TLorentzVector& Particle::GetLastMotherDecayMom ( ) const
inline

Definition at line 126 of file Particle.h.

126 {return fLastMotherDecayMom;}
TLorentzVector fLastMotherDecayMom
Definition: Particle.h:28
int Particle::GetLastMotherPdg ( ) const
inline

Definition at line 98 of file Particle.h.

98 {return fLastMotherPdg;}
int fLastMotherPdg
Definition: Particle.h:33
int Particle::GetMother ( )
inline

Definition at line 109 of file Particle.h.

109 {return fMotherIndex;}
int fMotherIndex
Definition: Particle.h:36
int Particle::GetNDaughters ( )
inline

Definition at line 114 of file Particle.h.

114  {
116  return 0;
117  else
119  }
int fFirstDaughterIndex
Definition: Particle.h:38
int fLastDaughterIndex
Definition: Particle.h:39
int Particle::GetPythiaStatusCode ( )
inline

Definition at line 113 of file Particle.h.

Referenced by Decay().

113 {return fPythiaStatusCode;}
int fPythiaStatusCode
Definition: Particle.h:32
int Particle::GetType ( ) const
inline

Definition at line 135 of file Particle.h.

Referenced by Decay().

135 {return fType;}
int fType
Definition: Particle.h:34
void Particle::IncInter ( )
inline

Definition at line 132 of file Particle.h.

int fInteractionNumber
Definition: Particle.h:31
static void Particle::InitIndexing ( )
inlinestatic

Definition at line 105 of file Particle.h.

Referenced by gen::Hydjet2Hadronizer::generatePartonsAndHadronize().

105  {
106  fLastIndex = -1;
107  }
static int fLastIndex
Definition: Particle.h:40
TLorentzVector& Particle::Mom ( )
inline

Definition at line 71 of file Particle.h.

Referenced by Decay().

71 {return fMomentum;}
TLorentzVector fMomentum
Definition: Particle.h:26
const TLorentzVector& Particle::Mom ( ) const
inline

Definition at line 72 of file Particle.h.

72 {return fMomentum;}
TLorentzVector fMomentum
Definition: Particle.h:26
TLorentzVector& Particle::Mom ( const TLorentzVector &  val)
inline

Definition at line 73 of file Particle.h.

73 {return fMomentum = val;}
TLorentzVector fMomentum
Definition: Particle.h:26
double Particle::Phi ( ) const

Definition at line 87 of file Particle.cc.

References fMomentum, and Pi.

87  {
88  return TMath::Pi()+TMath::ATan2(-fMomentum.Py(), -fMomentum.Px());
89 }
const double Pi
TLorentzVector fMomentum
Definition: Particle.h:26
TLorentzVector& Particle::Pos ( )
inline

Definition at line 68 of file Particle.h.

Referenced by Decay().

68 {return fPosition;}
TLorentzVector fPosition
Definition: Particle.h:25
const TLorentzVector& Particle::Pos ( ) const
inline

Definition at line 69 of file Particle.h.

69 {return fPosition;}
TLorentzVector fPosition
Definition: Particle.h:25
TLorentzVector& Particle::Pos ( const TLorentzVector &  val)
inline

Definition at line 70 of file Particle.h.

70 {return fPosition = val;}
TLorentzVector fPosition
Definition: Particle.h:25
double Particle::Pt ( ) const

Definition at line 95 of file Particle.cc.

References fMomentum.

95  {
96  return TMath::Sqrt(fMomentum.Px() * fMomentum.Px() + fMomentum.Py() * fMomentum.Py());
97 }
TLorentzVector fMomentum
Definition: Particle.h:26
double Particle::Px ( ) const
inline

Definition at line 59 of file Particle.h.

59 {return fMomentum.Px();}
TLorentzVector fMomentum
Definition: Particle.h:26
double Particle::Px ( double  val)
inline

Definition at line 60 of file Particle.h.

60 {fMomentum.SetPx(val); return val;}
TLorentzVector fMomentum
Definition: Particle.h:26
double Particle::Py ( ) const
inline

Definition at line 61 of file Particle.h.

61 {return fMomentum.Py();}
TLorentzVector fMomentum
Definition: Particle.h:26
double Particle::Py ( double  val)
inline

Definition at line 62 of file Particle.h.

62 {fMomentum.SetPy(val); return val;}
TLorentzVector fMomentum
Definition: Particle.h:26
double Particle::Pz ( ) const
inline

Definition at line 63 of file Particle.h.

63 {return fMomentum.Pz();}
TLorentzVector fMomentum
Definition: Particle.h:26
double Particle::Pz ( double  val)
inline

Definition at line 64 of file Particle.h.

64 {fMomentum.SetPz(val); return val;}
TLorentzVector fMomentum
Definition: Particle.h:26
double Particle::Rapidity ( ) const

Definition at line 81 of file Particle.cc.

References fMomentum.

81  {
82  if (fMomentum.E() != fMomentum.Pz())
83  return 0.5 * TMath::Log((fMomentum.E() + fMomentum.Pz()) / (fMomentum.E() - fMomentum.Pz()));
84  else return 1.e30;
85 }
TLorentzVector fMomentum
Definition: Particle.h:26
void Particle::SetDecayed ( )
inline

Definition at line 75 of file Particle.h.

Referenced by gen::Hydjet2Hadronizer::generatePartonsAndHadronize().

75 {fDecayed = kTRUE;}
bool fDecayed
Definition: Particle.h:41
void Particle::SetFirstDaughterIndex ( int  index)
inline

Definition at line 110 of file Particle.h.

References cmsHarvester::index.

Referenced by Decay(), and gen::Hydjet2Hadronizer::generatePartonsAndHadronize().

int fFirstDaughterIndex
Definition: Particle.h:38
int Particle::SetIndex ( )
inline

Definition at line 102 of file Particle.h.

Referenced by Decay(), and gen::Hydjet2Hadronizer::generatePartonsAndHadronize().

102 {fIndex = ++fLastIndex; return fIndex;}
int fIndex
Definition: Particle.h:35
static int fLastIndex
Definition: Particle.h:40
void Particle::SetLastDaughterIndex ( int  index)
inline

Definition at line 111 of file Particle.h.

References cmsHarvester::index.

Referenced by Decay(), and gen::Hydjet2Hadronizer::generatePartonsAndHadronize().

int fLastDaughterIndex
Definition: Particle.h:39
void Particle::SetLastInterNumber ( int  value)
inline

Definition at line 130 of file Particle.h.

References relativeConstraints::value.

void Particle::SetLastInterTime ( double  value)
inline

Definition at line 128 of file Particle.h.

References relativeConstraints::value.

TLorentzVector& Particle::SetLastMotherDecayCoor ( const TLorentzVector &  val)
inline

Definition at line 123 of file Particle.h.

Referenced by Decay().

123 {return fLastMotherDecayCoor = val;}
TLorentzVector fLastMotherDecayCoor
Definition: Particle.h:27
TLorentzVector& Particle::SetLastMotherDecayMom ( const TLorentzVector &  val)
inline

Definition at line 125 of file Particle.h.

Referenced by Decay().

125 {return fLastMotherDecayMom = val;}
TLorentzVector fLastMotherDecayMom
Definition: Particle.h:28
void Particle::SetLastMotherPdg ( int  value)
inline

Definition at line 97 of file Particle.h.

References relativeConstraints::value.

Referenced by Decay().

void Particle::SetMother ( int  value)
inline
void Particle::SetPythiaStatusCode ( int  code)
inline

Definition at line 112 of file Particle.h.

Referenced by Decay(), and gen::Hydjet2Hadronizer::generatePartonsAndHadronize().

112 {fPythiaStatusCode = code;}
int fPythiaStatusCode
Definition: Particle.h:32
void Particle::SetType ( int  value)
inline

Definition at line 134 of file Particle.h.

References relativeConstraints::value.

Referenced by Decay().

134 {fType = value;}
int fType
Definition: Particle.h:34
void Particle::Shift ( const TVector3 &  val)
inline

Definition at line 82 of file Particle.h.

82 {fPosition += TLorentzVector(val, 0.);}
TLorentzVector fPosition
Definition: Particle.h:25
double Particle::T ( ) const
inline

Definition at line 57 of file Particle.h.

57 {return fPosition.T();}
TLorentzVector fPosition
Definition: Particle.h:25
double Particle::T ( double  val)
inline

Definition at line 58 of file Particle.h.

58 {fPosition.SetT(val); return val;}
TLorentzVector fPosition
Definition: Particle.h:25
double Particle::TableMass ( ) const

Definition at line 71 of file Particle.cc.

References fParticleProperties, and ParticlePDG::GetMass().

Referenced by Decay().

71  {
72  return fParticleProperties->GetMass();
73 }
ParticlePDG * fParticleProperties
Definition: Particle.h:29
double GetMass()
Definition: ParticlePDG.h:68
double Particle::Theta ( ) const

Definition at line 91 of file Particle.cc.

References fMomentum, and Pi.

91  {
92  return !fMomentum.Pz() ? TMath::Pi() / 2 : TMath::ACos(fMomentum.Pz() / fMomentum.P());
93 }
const double Pi
TLorentzVector fMomentum
Definition: Particle.h:26
void Particle::TransformMomentum ( const TRotation &  rotator)
inline

Definition at line 80 of file Particle.h.

80 {fMomentum *= rotator;}
TLorentzVector fMomentum
Definition: Particle.h:26
void Particle::TransformPosition ( const TRotation &  rotator)
inline

Definition at line 81 of file Particle.h.

81 {fPosition *= rotator;}
TLorentzVector fPosition
Definition: Particle.h:25
double Particle::X ( ) const
inline

Definition at line 51 of file Particle.h.

Referenced by svgfig.Curve.Sample::__repr__().

51 {return fPosition.X();}
TLorentzVector fPosition
Definition: Particle.h:25
double Particle::X ( double  val)
inline

Definition at line 52 of file Particle.h.

Referenced by svgfig.Curve.Sample::__repr__().

52 {fPosition.SetX(val); return val;}
TLorentzVector fPosition
Definition: Particle.h:25
double Particle::Y ( ) const
inline

Definition at line 53 of file Particle.h.

53 {return fPosition.Y();}
TLorentzVector fPosition
Definition: Particle.h:25
double Particle::Y ( double  val)
inline

Definition at line 54 of file Particle.h.

54 {fPosition.SetY(val); return val;}
TLorentzVector fPosition
Definition: Particle.h:25
double Particle::Z ( ) const
inline

Definition at line 55 of file Particle.h.

55 {return fPosition.Z();}
TLorentzVector fPosition
Definition: Particle.h:25
double Particle::Z ( double  val)
inline

Definition at line 56 of file Particle.h.

56 {fPosition.SetZ(val); return val;}
TLorentzVector fPosition
Definition: Particle.h:25

Member Data Documentation

bool Particle::fDecayed
protected

Definition at line 41 of file Particle.h.

int Particle::fFirstDaughterIndex
protected

Definition at line 38 of file Particle.h.

int Particle::fIndex
protected

Definition at line 35 of file Particle.h.

int Particle::fInteractionNumber
protected

Definition at line 31 of file Particle.h.

Referenced by Particle().

int Particle::fLastDaughterIndex
protected

Definition at line 39 of file Particle.h.

int Particle::fLastIndex
staticprotected

Definition at line 40 of file Particle.h.

double Particle::fLastInteractionTime
protected

Definition at line 30 of file Particle.h.

Referenced by Particle().

TLorentzVector Particle::fLastMotherDecayCoor
protected

Definition at line 27 of file Particle.h.

TLorentzVector Particle::fLastMotherDecayMom
protected

Definition at line 28 of file Particle.h.

int Particle::fLastMotherPdg
protected

Definition at line 33 of file Particle.h.

Referenced by Particle().

TLorentzVector Particle::fMomentum
protected

Definition at line 26 of file Particle.h.

Referenced by Eta(), Phi(), Pt(), Rapidity(), and Theta().

int Particle::fMotherIndex
protected

Definition at line 36 of file Particle.h.

int Particle::fNDaughters
protected
ParticlePDG* Particle::fParticleProperties
protected

Definition at line 29 of file Particle.h.

Referenced by Encoding(), Particle(), and TableMass().

TLorentzVector Particle::fPosition
protected

Definition at line 25 of file Particle.h.

int Particle::fPythiaStatusCode
protected

Definition at line 32 of file Particle.h.

int Particle::fType
protected

Definition at line 34 of file Particle.h.

Referenced by Particle().