CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
Particle Class Reference

#include <Particle.h>

Classes

class  Particle
 

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 21 of file Particle.h.

Constructor & Destructor Documentation

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:30
int fFirstDaughterIndex
Definition: Particle.h:36
int fLastMotherPdg
Definition: Particle.h:31
ParticlePDG * fParticleProperties
Definition: Particle.h:27
int fIndex
Definition: Particle.h:33
int fLastDaughterIndex
Definition: Particle.h:37
int fNDaughters
Definition: Particle.h:35
double fLastInteractionTime
Definition: Particle.h:28
int fMotherIndex
Definition: Particle.h:34
int fType
Definition: Particle.h:32
int fInteractionNumber
Definition: Particle.h:29
bool fDecayed
Definition: Particle.h:39
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:30
int fFirstDaughterIndex
Definition: Particle.h:36
ParticlePDG * fParticleProperties
Definition: Particle.h:27
int fIndex
Definition: Particle.h:33
int fLastDaughterIndex
Definition: Particle.h:37
int fNDaughters
Definition: Particle.h:35
double fLastInteractionTime
Definition: Particle.h:28
TLorentzVector fMomentum
Definition: Particle.h:24
int fMotherIndex
Definition: Particle.h:34
int fType
Definition: Particle.h:32
int fInteractionNumber
Definition: Particle.h:29
TLorentzVector fPosition
Definition: Particle.h:23
bool fDecayed
Definition: Particle.h:39
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, gen::n, and protons_cff::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:30
int fFirstDaughterIndex
Definition: Particle.h:36
int fLastMotherPdg
Definition: Particle.h:31
ParticlePDG * fParticleProperties
Definition: Particle.h:27
int fIndex
Definition: Particle.h:33
int fLastDaughterIndex
Definition: Particle.h:37
int fNDaughters
Definition: Particle.h:35
double fLastInteractionTime
Definition: Particle.h:28
TLorentzVector fMomentum
Definition: Particle.h:24
int fMotherIndex
Definition: Particle.h:34
int fType
Definition: Particle.h:32
int fInteractionNumber
Definition: Particle.h:29
TLorentzVector fPosition
Definition: Particle.h:23
TLorentzVector fLastMotherDecayCoor
Definition: Particle.h:25
TLorentzVector fLastMotherDecayMom
Definition: Particle.h:26
bool fDecayed
Definition: Particle.h:39

Member Function Documentation

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

Definition at line 76 of file Particle.h.

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

Definition at line 77 of file Particle.h.

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

Definition at line 92 of file Particle.h.

References fParticleProperties.

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

Definition at line 93 of file Particle.h.

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

Definition at line 63 of file Particle.h.

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

Definition at line 64 of file Particle.h.

References heppy_batch::val.

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

Definition at line 67 of file Particle.cc.

References fParticleProperties, and ParticlePDG::GetPDG().

Referenced by Shift().

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

Definition at line 75 of file Particle.cc.

References fMomentum.

Referenced by Shift().

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:24
bool Particle::GetDecayed ( ) const
inline

Definition at line 74 of file Particle.h.

References fDecayed.

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

Definition at line 118 of file Particle.h.

References fFirstDaughterIndex.

118 {return fFirstDaughterIndex;}
int fFirstDaughterIndex
Definition: Particle.h:36
int Particle::GetIndex ( )
inline

Definition at line 101 of file Particle.h.

References fIndex.

101 {return fIndex;}
int fIndex
Definition: Particle.h:33
int Particle::GetLastDaughterIndex ( )
inline

Definition at line 119 of file Particle.h.

References fLastDaughterIndex.

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

Definition at line 102 of file Particle.h.

References fLastIndex.

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

Definition at line 129 of file Particle.h.

References fInteractionNumber.

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

Definition at line 127 of file Particle.h.

References fLastInteractionTime.

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

Definition at line 122 of file Particle.h.

References fLastMotherDecayCoor.

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

Definition at line 124 of file Particle.h.

References fLastMotherDecayMom.

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

Definition at line 96 of file Particle.h.

References fLastMotherPdg.

96 {return fLastMotherPdg;}
int fLastMotherPdg
Definition: Particle.h:31
int Particle::GetMother ( )
inline

Definition at line 107 of file Particle.h.

References fMotherIndex.

107 {return fMotherIndex;}
int fMotherIndex
Definition: Particle.h:34
int Particle::GetNDaughters ( )
inline

Definition at line 112 of file Particle.h.

112  {
114  return 0;
115  else
117  }
int fFirstDaughterIndex
Definition: Particle.h:36
int fLastDaughterIndex
Definition: Particle.h:37
int Particle::GetPythiaStatusCode ( )
inline

Definition at line 111 of file Particle.h.

References fPythiaStatusCode.

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

Definition at line 133 of file Particle.h.

References fType, S(), and T().

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

Definition at line 130 of file Particle.h.

References fInteractionNumber.

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

Definition at line 103 of file Particle.h.

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

103  {
104  fLastIndex = -1;
105  }
static int fLastIndex
Definition: Particle.h:38
TLorentzVector& Particle::Mom ( )
inline

Definition at line 69 of file Particle.h.

References fMomentum.

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

Definition at line 70 of file Particle.h.

References fMomentum.

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

Definition at line 71 of file Particle.h.

References heppy_batch::val.

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

Definition at line 87 of file Particle.cc.

References fMomentum, and Pi.

Referenced by Shift().

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

Definition at line 66 of file Particle.h.

References fPosition.

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

Definition at line 67 of file Particle.h.

References fPosition.

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

Definition at line 68 of file Particle.h.

References heppy_batch::val.

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

Definition at line 95 of file Particle.cc.

References fMomentum.

Referenced by Shift().

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

Definition at line 57 of file Particle.h.

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

Definition at line 58 of file Particle.h.

References heppy_batch::val.

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

Definition at line 59 of file Particle.h.

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

Definition at line 60 of file Particle.h.

References heppy_batch::val.

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

Definition at line 61 of file Particle.h.

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

Definition at line 62 of file Particle.h.

References heppy_batch::val.

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

Definition at line 81 of file Particle.cc.

References fMomentum.

Referenced by Shift().

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:24
void Particle::SetDecayed ( )
inline

Definition at line 73 of file Particle.h.

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

Definition at line 108 of file Particle.h.

int Particle::SetIndex ( )
inline

Definition at line 100 of file Particle.h.

References fIndex, and fLastIndex.

100 {fIndex = ++fLastIndex; return fIndex;}
int fIndex
Definition: Particle.h:33
static int fLastIndex
Definition: Particle.h:38
void Particle::SetLastDaughterIndex ( int  index)
inline

Definition at line 109 of file Particle.h.

void Particle::SetLastInterNumber ( int  value)
inline

Definition at line 128 of file Particle.h.

References relativeConstraints::value.

void Particle::SetLastInterTime ( double  value)
inline

Definition at line 126 of file Particle.h.

References relativeConstraints::value.

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

Definition at line 121 of file Particle.h.

References heppy_batch::val.

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

Definition at line 123 of file Particle.h.

References heppy_batch::val.

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

Definition at line 95 of file Particle.h.

References relativeConstraints::value.

void Particle::SetMother ( int  value)
inline

Definition at line 106 of file Particle.h.

References relativeConstraints::value.

void Particle::SetPythiaStatusCode ( int  code)
inline

Definition at line 110 of file Particle.h.

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

Definition at line 132 of file Particle.h.

References relativeConstraints::value.

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

Definition at line 80 of file Particle.h.

References Encoding(), Eta(), Phi(), Pt(), Rapidity(), TableMass(), and Theta().

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

Definition at line 55 of file Particle.h.

Referenced by GetType().

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

Definition at line 56 of file Particle.h.

References heppy_batch::val.

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

Definition at line 71 of file Particle.cc.

References fParticleProperties, and ParticlePDG::GetMass().

Referenced by Shift().

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

Definition at line 91 of file Particle.cc.

References fMomentum, and Pi.

Referenced by Shift().

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

Definition at line 78 of file Particle.h.

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

Definition at line 79 of file Particle.h.

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

Definition at line 49 of file Particle.h.

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

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

Definition at line 50 of file Particle.h.

References heppy_batch::val.

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

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

Definition at line 51 of file Particle.h.

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

Definition at line 52 of file Particle.h.

References heppy_batch::val.

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

Definition at line 53 of file Particle.h.

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

Definition at line 54 of file Particle.h.

References heppy_batch::val.

54 {fPosition.SetZ(val); return val;}
TLorentzVector fPosition
Definition: Particle.h:23

Member Data Documentation

bool Particle::fDecayed
protected

Definition at line 39 of file Particle.h.

Referenced by GetDecayed().

int Particle::fFirstDaughterIndex
protected

Definition at line 36 of file Particle.h.

Referenced by GetFirstDaughterIndex().

int Particle::fIndex
protected

Definition at line 33 of file Particle.h.

Referenced by GetIndex(), and SetIndex().

int Particle::fInteractionNumber
protected

Definition at line 29 of file Particle.h.

Referenced by GetLastInterNumber(), IncInter(), and Particle().

int Particle::fLastDaughterIndex
protected

Definition at line 37 of file Particle.h.

Referenced by GetLastDaughterIndex().

int Particle::fLastIndex
staticprotected

Definition at line 38 of file Particle.h.

Referenced by GetLastIndex(), and SetIndex().

double Particle::fLastInteractionTime
protected

Definition at line 28 of file Particle.h.

Referenced by GetLastInterTime(), and Particle().

TLorentzVector Particle::fLastMotherDecayCoor
protected

Definition at line 25 of file Particle.h.

Referenced by GetLastMotherDecayCoor().

TLorentzVector Particle::fLastMotherDecayMom
protected

Definition at line 26 of file Particle.h.

Referenced by GetLastMotherDecayMom().

int Particle::fLastMotherPdg
protected

Definition at line 31 of file Particle.h.

Referenced by GetLastMotherPdg(), and Particle().

TLorentzVector Particle::fMomentum
protected

Definition at line 24 of file Particle.h.

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

int Particle::fMotherIndex
protected

Definition at line 34 of file Particle.h.

Referenced by GetMother().

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

Definition at line 27 of file Particle.h.

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

TLorentzVector Particle::fPosition
protected

Definition at line 23 of file Particle.h.

Referenced by Pos().

int Particle::fPythiaStatusCode
protected

Definition at line 30 of file Particle.h.

Referenced by GetPythiaStatusCode().

int Particle::fType
protected

Definition at line 32 of file Particle.h.

Referenced by GetType(), and Particle().