PandaRoot
PndMCTrackInfo Class Reference

#include <PndMCTrackInfo.h>

Inheritance diagram for PndMCTrackInfo:

Classes

class  h
 

Public Member Functions

 PndMCTrackInfo ()
 
virtual ~PndMCTrackInfo ()
 
void Print (std::ostream &out=std::cout)
 
std::vector< int > GetDaughters ()
 
TVector3 GetDecayVertex () const
 
Double_t GetDecayTime () const
 
Int_t GetStage () const
 
std::vector< int > GetPIDMothers () const
 
std::vector< int > GetPIDDaughters () const
 
int GetPID () const
 
Int_t GetNHits (TString branchName)
 
int GetMVDPoints () const
 
int GetSTTPoints () const
 
int GetGEMPoints () const
 
int GetFTSPoints () const
 
int GetTotalPoints () const
 
int GetTypeCount (int type)
 
TVector2 GetDeltaMomentum (int type)
 
PndPidProbability GetPidProbability (int type)
 
void SetPID (int pid)
 
void AddDaughter (FairLink doughter)
 
void AddPIDDaughter (int pid)
 
void SetPIDMothers (std::vector< int > pid)
 
void SetDecayVertex (TVector3 vertex)
 
void SetDecayTime (Double_t time)
 
void SetRecoMomentum (int branchType, TVector3 value)
 
void SetDeltaMomentum (int branchType, double pt, double pl)
 
void SetPidProbability (int branchType, PndPidProbability &value)
 
void FillPoints ()
 
void FillTypeCounts ()
 

Friends

std::ostream & operator<< (std::ostream &out, PndMCTrackInfo &track)
 

Detailed Description

Definition at line 35 of file PndMCTrackInfo.h.

Constructor & Destructor Documentation

◆ PndMCTrackInfo()

PndMCTrackInfo::PndMCTrackInfo ( )

Default constructor

◆ ~PndMCTrackInfo()

virtual PndMCTrackInfo::~PndMCTrackInfo ( )
virtual

Destructor

Member Function Documentation

◆ AddDaughter()

void PndMCTrackInfo::AddDaughter ( FairLink  doughter)

Referenced by SetPID().

◆ AddPIDDaughter()

void PndMCTrackInfo::AddPIDDaughter ( int  pid)
inline

Definition at line 136 of file PndMCTrackInfo.h.

136 { fPIDDaughters.push_back(pid); }

◆ FillPoints()

void PndMCTrackInfo::FillPoints ( )

Referenced by SetPidProbability().

◆ FillTypeCounts()

void PndMCTrackInfo::FillTypeCounts ( )

Referenced by SetPidProbability().

◆ GetDaughters()

std::vector<int> PndMCTrackInfo::GetDaughters ( )

Accessors Returns which daughters belong to the MC track (as indices to the MCTrack TClonesArray)

◆ GetDecayTime()

Double_t PndMCTrackInfo::GetDecayTime ( ) const
inline

Definition at line 60 of file PndMCTrackInfo.h.

60 { return fDecayTime; }

◆ GetDecayVertex()

TVector3 PndMCTrackInfo::GetDecayVertex ( ) const
inline

Definition at line 59 of file PndMCTrackInfo.h.

59 { return fDecayVertex; }

◆ GetDeltaMomentum()

TVector2 PndMCTrackInfo::GetDeltaMomentum ( int  type)
inline

Returns the momentum difference for pt, pz for a reconstruction type (branch)

Definition at line 111 of file PndMCTrackInfo.h.

112  {
113  TVector2 result;
114  if (fMomentumDifference.count(type) > 0) {
115  return fMomentumDifference[type];
116  }
117  return result;
118  }

◆ GetFTSPoints()

int PndMCTrackInfo::GetFTSPoints ( ) const
inline

Definition at line 93 of file PndMCTrackInfo.h.

93 { return fFTSPoints; }

◆ GetGEMPoints()

int PndMCTrackInfo::GetGEMPoints ( ) const
inline

Definition at line 92 of file PndMCTrackInfo.h.

92 { return fGEMPoints; }

◆ GetMVDPoints()

int PndMCTrackInfo::GetMVDPoints ( ) const
inline

Definition at line 90 of file PndMCTrackInfo.h.

90 { return fMVDPoints; }

◆ GetNHits()

Int_t PndMCTrackInfo::GetNHits ( TString  branchName)

Returns the number of hits for this MC track for a given branchName

Parameters
branchname

Referenced by GetPID().

◆ GetPID()

int PndMCTrackInfo::GetPID ( ) const
inline

Returns the PID of the particle

Definition at line 82 of file PndMCTrackInfo.h.

References GetNHits().

82 { return fPID; }

◆ GetPIDDaughters()

std::vector<int> PndMCTrackInfo::GetPIDDaughters ( ) const
inline

Returns the PID of all direct daughter particles

Definition at line 77 of file PndMCTrackInfo.h.

77 { return fPIDDaughters; }

◆ GetPIDMothers()

std::vector<int> PndMCTrackInfo::GetPIDMothers ( ) const
inline

Returns the PID of the mother particles. The first entry in the vector is the primary particle, the second the first daughter and so on

Definition at line 72 of file PndMCTrackInfo.h.

72 { return fPIDMothers; }

◆ GetPidProbability()

PndPidProbability PndMCTrackInfo::GetPidProbability ( int  type)
inline

Returns the PID probabilites for a pid type (branch)

Parameters
typebranch index

Definition at line 124 of file PndMCTrackInfo.h.

125  {
126  PndPidProbability result;
127  if (fPidProb.count(type) > 0) {
128  return fPidProb[type];
129  }
130  return result;
131  }

◆ GetStage()

Int_t PndMCTrackInfo::GetStage ( ) const
inline

Returns which generation of daughter particles this particle is compared to its primary particle (final particle of event generator)

Definition at line 66 of file PndMCTrackInfo.h.

66 { return fStage; }

◆ GetSTTPoints()

int PndMCTrackInfo::GetSTTPoints ( ) const
inline

Definition at line 91 of file PndMCTrackInfo.h.

91 { return fSTTPoints; }

◆ GetTotalPoints()

int PndMCTrackInfo::GetTotalPoints ( ) const
inline

Definition at line 94 of file PndMCTrackInfo.h.

94 { return fTotalPoints; }

◆ GetTypeCount()

int PndMCTrackInfo::GetTypeCount ( int  type)
inline

Returns how often a link to a type (branch) is in the list of FairLinks

Definition at line 99 of file PndMCTrackInfo.h.

100  {
101  if (fTypeCount.count(type) > 0) {
102  return fTypeCount[type];
103  } else {
104  return -1;
105  }
106  };

◆ Print()

void PndMCTrackInfo::Print ( std::ostream &  out = std::cout)

Output to screen

◆ SetDecayTime()

void PndMCTrackInfo::SetDecayTime ( Double_t  time)
inline

Definition at line 143 of file PndMCTrackInfo.h.

143 { fDecayTime = time; }

◆ SetDecayVertex()

void PndMCTrackInfo::SetDecayVertex ( TVector3  vertex)
inline

Definition at line 142 of file PndMCTrackInfo.h.

142 { fDecayVertex = vertex; }

◆ SetDeltaMomentum()

void PndMCTrackInfo::SetDeltaMomentum ( int  branchType,
double  pt,
double  pl 
)
inline

Definition at line 145 of file PndMCTrackInfo.h.

145 { fMomentumDifference[branchType] = TVector2(pt, pl); }; // mc momentum - reco momentum

◆ SetPID()

void PndMCTrackInfo::SetPID ( int  pid)
inline

Definition at line 134 of file PndMCTrackInfo.h.

References AddDaughter().

134 { fPID = pid; }

◆ SetPIDMothers()

void PndMCTrackInfo::SetPIDMothers ( std::vector< int >  pid)
inline

Definition at line 137 of file PndMCTrackInfo.h.

138  {
139  fPIDMothers = pid;
140  fStage = fPIDMothers.size();
141  }

◆ SetPidProbability()

void PndMCTrackInfo::SetPidProbability ( int  branchType,
PndPidProbability value 
)
inline

Definition at line 146 of file PndMCTrackInfo.h.

References FillPoints(), and FillTypeCounts().

146 { fPidProb[branchType] = value; }

◆ SetRecoMomentum()

void PndMCTrackInfo::SetRecoMomentum ( int  branchType,
TVector3  value 
)
inline

Definition at line 144 of file PndMCTrackInfo.h.

144 { fMomentumReco[branchType] = value; } // branchType typeID of branch containing the reconstructed track

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
PndMCTrackInfo track 
)
friend

Definition at line 47 of file PndMCTrackInfo.h.

48  {
49  track.Print(out);
50  return out;
51  }
void Print(std::ostream &out=std::cout)

The documentation for this class was generated from the following file: