CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 lumiQTWidget::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.

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

Definition at line 77 of file Particle.h.

ParticlePDG* Particle::Def ( ) const
inline

Definition at line 92 of file Particle.h.

ParticlePDG* Particle::Def ( ParticlePDG newProp)
inline

Definition at line 93 of file Particle.h.

double Particle::E ( ) const
inline

Definition at line 63 of file Particle.h.

double Particle::E ( double  val)
inline

Definition at line 64 of file Particle.h.

int Particle::Encoding ( ) const

Definition at line 67 of file Particle.cc.

References fParticleProperties, and ParticlePDG::GetPDG().

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.

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.

int Particle::GetFirstDaughterIndex ( )
inline

Definition at line 118 of file Particle.h.

int Particle::GetIndex ( )
inline

Definition at line 101 of file Particle.h.

int Particle::GetLastDaughterIndex ( )
inline

Definition at line 119 of file Particle.h.

static int Particle::GetLastIndex ( )
inlinestatic

Definition at line 102 of file Particle.h.

int Particle::GetLastInterNumber ( ) const
inline

Definition at line 129 of file Particle.h.

double Particle::GetLastInterTime ( ) const
inline

Definition at line 127 of file Particle.h.

const TLorentzVector& Particle::GetLastMotherDecayCoor ( ) const
inline

Definition at line 122 of file Particle.h.

const TLorentzVector& Particle::GetLastMotherDecayMom ( ) const
inline

Definition at line 124 of file Particle.h.

int Particle::GetLastMotherPdg ( ) const
inline

Definition at line 96 of file Particle.h.

int Particle::GetMother ( )
inline

Definition at line 107 of file Particle.h.

int Particle::GetNDaughters ( )
inline

Definition at line 112 of file Particle.h.

int Particle::GetPythiaStatusCode ( )
inline

Definition at line 111 of file Particle.h.

int Particle::GetType ( ) const
inline

Definition at line 133 of file Particle.h.

void Particle::IncInter ( )
inline

Definition at line 130 of file Particle.h.

static void Particle::InitIndexing ( )
inlinestatic

Definition at line 103 of file Particle.h.

TLorentzVector& Particle::Mom ( )
inline

Definition at line 69 of file Particle.h.

const TLorentzVector& Particle::Mom ( ) const
inline

Definition at line 70 of file Particle.h.

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

Definition at line 71 of file Particle.h.

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:24
TLorentzVector& Particle::Pos ( )
inline

Definition at line 66 of file Particle.h.

const TLorentzVector& Particle::Pos ( ) const
inline

Definition at line 67 of file Particle.h.

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

Definition at line 68 of file Particle.h.

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:24
double Particle::Px ( ) const
inline

Definition at line 57 of file Particle.h.

double Particle::Px ( double  val)
inline

Definition at line 58 of file Particle.h.

double Particle::Py ( ) const
inline

Definition at line 59 of file Particle.h.

double Particle::Py ( double  val)
inline

Definition at line 60 of file Particle.h.

double Particle::Pz ( ) const
inline

Definition at line 61 of file Particle.h.

double Particle::Pz ( double  val)
inline

Definition at line 62 of file Particle.h.

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

Definition at line 73 of file Particle.h.

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.

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.

void Particle::SetLastInterTime ( double  value)
inline

Definition at line 126 of file Particle.h.

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

Definition at line 121 of file Particle.h.

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

Definition at line 123 of file Particle.h.

void Particle::SetLastMotherPdg ( int  value)
inline

Definition at line 95 of file Particle.h.

void Particle::SetMother ( int  value)
inline

Definition at line 106 of file Particle.h.

void Particle::SetPythiaStatusCode ( int  code)
inline

Definition at line 110 of file Particle.h.

void Particle::SetType ( int  value)
inline

Definition at line 132 of file Particle.h.

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

Definition at line 80 of file Particle.h.

double Particle::T ( ) const
inline

Definition at line 55 of file Particle.h.

double Particle::T ( double  val)
inline

Definition at line 56 of file Particle.h.

double Particle::TableMass ( ) const

Definition at line 71 of file Particle.cc.

References fParticleProperties, and ParticlePDG::GetMass().

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.

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.

void Particle::TransformPosition ( const TRotation &  rotator)
inline

Definition at line 79 of file Particle.h.

double Particle::X ( ) const
inline

Definition at line 49 of file Particle.h.

double Particle::X ( double  val)
inline

Definition at line 50 of file Particle.h.

double Particle::Y ( ) const
inline

Definition at line 51 of file Particle.h.

double Particle::Y ( double  val)
inline

Definition at line 52 of file Particle.h.

double Particle::Z ( ) const
inline

Definition at line 53 of file Particle.h.

double Particle::Z ( double  val)
inline

Definition at line 54 of file Particle.h.

Member Data Documentation

bool Particle::fDecayed
protected

Definition at line 39 of file Particle.h.

int Particle::fFirstDaughterIndex
protected

Definition at line 36 of file Particle.h.

int Particle::fIndex
protected

Definition at line 33 of file Particle.h.

int Particle::fInteractionNumber
protected

Definition at line 29 of file Particle.h.

Referenced by Particle().

int Particle::fLastDaughterIndex
protected

Definition at line 37 of file Particle.h.

int Particle::fLastIndex
staticprotected

Definition at line 38 of file Particle.h.

double Particle::fLastInteractionTime
protected

Definition at line 28 of file Particle.h.

Referenced by Particle().

TLorentzVector Particle::fLastMotherDecayCoor
protected

Definition at line 25 of file Particle.h.

TLorentzVector Particle::fLastMotherDecayMom
protected

Definition at line 26 of file Particle.h.

int Particle::fLastMotherPdg
protected

Definition at line 31 of file Particle.h.

Referenced by Particle().

TLorentzVector Particle::fMomentum
protected

Definition at line 24 of file Particle.h.

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

int Particle::fMotherIndex
protected

Definition at line 34 of file Particle.h.

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

Definition at line 27 of file Particle.h.

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

TLorentzVector Particle::fPosition
protected

Definition at line 23 of file Particle.h.

int Particle::fPythiaStatusCode
protected

Definition at line 30 of file Particle.h.

int Particle::fType
protected

Definition at line 32 of file Particle.h.

Referenced by Particle().