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 23 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 124 of file PndMCTrackInfo.h.

124 { 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 48 of file PndMCTrackInfo.h.

48 { return fDecayTime; }

◆ GetDecayVertex()

TVector3 PndMCTrackInfo::GetDecayVertex ( ) const
inline

Definition at line 47 of file PndMCTrackInfo.h.

47 { return fDecayVertex; }

◆ GetDeltaMomentum()

TVector2 PndMCTrackInfo::GetDeltaMomentum ( int  type)
inline

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

Definition at line 99 of file PndMCTrackInfo.h.

100  {
101  TVector2 result;
102  if (fMomentumDifference.count(type) > 0) {
103  return fMomentumDifference[type];
104  }
105  return result;
106  }

◆ GetFTSPoints()

int PndMCTrackInfo::GetFTSPoints ( ) const
inline

Definition at line 81 of file PndMCTrackInfo.h.

81 { return fFTSPoints; }

◆ GetGEMPoints()

int PndMCTrackInfo::GetGEMPoints ( ) const
inline

Definition at line 80 of file PndMCTrackInfo.h.

80 { return fGEMPoints; }

◆ GetMVDPoints()

int PndMCTrackInfo::GetMVDPoints ( ) const
inline

Definition at line 78 of file PndMCTrackInfo.h.

78 { 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 70 of file PndMCTrackInfo.h.

References GetNHits().

70 { return fPID; }

◆ GetPIDDaughters()

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

Returns the PID of all direct daughter particles

Definition at line 65 of file PndMCTrackInfo.h.

65 { 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 60 of file PndMCTrackInfo.h.

60 { return fPIDMothers; }

◆ GetPidProbability()

PndPidProbability PndMCTrackInfo::GetPidProbability ( int  type)
inline

Returns the PID probabilites for a pid type (branch)

Parameters
typebranch index

Definition at line 112 of file PndMCTrackInfo.h.

113  {
114  PndPidProbability result;
115  if (fPidProb.count(type) > 0) {
116  return fPidProb[type];
117  }
118  return result;
119  }

◆ 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 54 of file PndMCTrackInfo.h.

54 { return fStage; }

◆ GetSTTPoints()

int PndMCTrackInfo::GetSTTPoints ( ) const
inline

Definition at line 79 of file PndMCTrackInfo.h.

79 { return fSTTPoints; }

◆ GetTotalPoints()

int PndMCTrackInfo::GetTotalPoints ( ) const
inline

Definition at line 82 of file PndMCTrackInfo.h.

82 { 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 87 of file PndMCTrackInfo.h.

88  {
89  if (fTypeCount.count(type) > 0) {
90  return fTypeCount[type];
91  } else {
92  return -1;
93  }
94  };

◆ Print()

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

Output to screen

◆ SetDecayTime()

void PndMCTrackInfo::SetDecayTime ( Double_t  time)
inline

Definition at line 131 of file PndMCTrackInfo.h.

131 { fDecayTime = time; }

◆ SetDecayVertex()

void PndMCTrackInfo::SetDecayVertex ( TVector3  vertex)
inline

Definition at line 130 of file PndMCTrackInfo.h.

130 { fDecayVertex = vertex; }

◆ SetDeltaMomentum()

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

Definition at line 133 of file PndMCTrackInfo.h.

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

◆ SetPID()

void PndMCTrackInfo::SetPID ( int  pid)
inline

Definition at line 122 of file PndMCTrackInfo.h.

References AddDaughter().

122 { fPID = pid; }

◆ SetPIDMothers()

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

Definition at line 125 of file PndMCTrackInfo.h.

126  {
127  fPIDMothers = pid;
128  fStage = fPIDMothers.size();
129  }

◆ SetPidProbability()

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

Definition at line 134 of file PndMCTrackInfo.h.

References FillPoints(), and FillTypeCounts().

134 { fPidProb[branchType] = value; }

◆ SetRecoMomentum()

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

Definition at line 132 of file PndMCTrackInfo.h.

132 { 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 35 of file PndMCTrackInfo.h.

36  {
37  track.Print(out);
38  return out;
39  }
void Print(std::ostream &out=std::cout)

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