PandaRoot
GFTrackCand Class Reference

Track candidate – a list of cluster indices. More...

#include <GFTrackCand.h>

Inheritance diagram for GFTrackCand:

Public Member Functions

 GFTrackCand ()
 
 ~GFTrackCand ()
 
 GFTrackCand (double curv, double dip, double inv, std::vector< unsigned int > detIDs, std::vector< unsigned int > hitIDs)
 Initializing constructor. More...
 
 GFTrackCand (double curv, double dip, double inv, std::vector< unsigned int > detIDs, std::vector< unsigned int > hitIDs, std::vector< double > rhos)
 
void getHit (unsigned int i, unsigned int &detId, unsigned int &hitId) const
 Get detector ID and cluster index (hitId) for hit number i. More...
 
void getHit (unsigned int i, unsigned int &detId, unsigned int &hitId, double &rho) const
 Get detector ID and cluster index (hitId) for hit number i with ordering parameter rho. More...
 
void getHitWithPlane (unsigned int i, unsigned int &detId, unsigned int &hitId, unsigned int &planeId) const
 Get detector ID and cluster index (hitId) for hit number i with plane id. More...
 
unsigned int getNHits () const
 
double getCurv () const
 
double getDip () const
 
bool inverted () const
 
std::vector< unsigned int > GetHitIDs (int detId=-1)
 
std::vector< unsigned int > GetDetIDs () const
 
std::vector< double > GetRhos () const
 
std::set< unsigned int > GetUniqueDetIDs () const
 
int getMcTrackId () const
 get the MCT track id, for MC simulations - def. value -1 More...
 
TVector3 getPosSeed () const
 get the seed value for track: pos More...
 
TVector3 getDirSeed () const
 get the seed value for track: direction More...
 
double getQoverPseed () const
 get the seed value for track: qoverp More...
 
TVector3 getPosError () const
 get the seed value for track: error on pos (standard deviation) More...
 
TVector3 getDirError () const
 get the seed value for track: error on direction (standard deviation) More...
 
int getPdgCode () const
 get the PDG code More...
 
void addHit (unsigned int detId, unsigned int hitId, double rho=0., unsigned int planeId=0)
 
void setCurv (double c)
 
void setDip (double d)
 
void setInverted (bool f=true)
 
void setMcTrackId (int i)
 set the MCT track id, for MC simulations More...
 
bool HitInTrack (unsigned int detId, unsigned int hitId)
 Test if hit already is part of this track candidate. More...
 
void setTrackSeed (const TVector3 &pos, const TVector3 &direction, const double qop)
 set the seed values for track: pos, direction, q/p More...
 
void setComplTrackSeed (const TVector3 &pos, const TVector3 &mom, const int pdgCode, TVector3 posError=TVector3(1.0, 1.0, 1.0), TVector3 dirError=TVector3(1.0, 1.0, 1.0))
 set the seed values for track: pos, momentum, pdgCode, pos error, momentum error (errors are optional and will be set to 1,1,1 if not given) More...
 
void setPdgCode (int pdgCode)
 set a particle hypothesis in form of a PDG code More...
 
void append (const GFTrackCand &)
 
void reset ()
 
void Print () const
 

Friends

bool operator== (const GFTrackCand &lhs, const GFTrackCand &rhs)
 

Detailed Description

Track candidate – a list of cluster indices.

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)

The main task of the GFTrackCand object is to store a list of indices to cluster objects. Each cluster in the Track is identified by it's detector ID and it's index in the corresponding TClonesArray. Also there is a ordering parameter rho, to order hits. Optionally, plane indices for the hits can be stored (most importantly for fitting with the GFDaf). This information is used by the RecoHitFactory to automatically load RecoHits into a Track. Through this it is possible to define Tracks over an arbitrary number of different detectors.

In addition GFTrackCand offers members to store starting values for the fit. However this information is not autmatically used in genfit!!! But a pointer to a GFTrackCand can be passed to the RKTrackRep to make use of this information.

See also
RecoHitFactory

Definition at line 55 of file GFTrackCand.h.

Constructor & Destructor Documentation

◆ GFTrackCand() [1/3]

GFTrackCand::GFTrackCand ( )

◆ ~GFTrackCand()

GFTrackCand::~GFTrackCand ( )

◆ GFTrackCand() [2/3]

GFTrackCand::GFTrackCand ( double  curv,
double  dip,
double  inv,
std::vector< unsigned int >  detIDs,
std::vector< unsigned int >  hitIDs 
)

Initializing constructor.

Parameters
curvCurvature from prefit. There is no stringent definition what this parameter means at the moment.
dipDip angle from prefit. There is no stringent definition what this parameter means at the moment.
invDummy paramter. Has been used to mark inverted tracks in the past.
detIDscollection of detector IDs. Each detector ID needs a corresponding GFRecoHitProducer. See RecoHitFactory for details.
hitIDscollection of hit indices.

◆ GFTrackCand() [3/3]

GFTrackCand::GFTrackCand ( double  curv,
double  dip,
double  inv,
std::vector< unsigned int >  detIDs,
std::vector< unsigned int >  hitIDs,
std::vector< double >  rhos 
)

Member Function Documentation

◆ addHit()

void GFTrackCand::addHit ( unsigned int  detId,
unsigned int  hitId,
double  rho = 0.,
unsigned int  planeId = 0 
)

Referenced by GFTrack::addHit(), and getPdgCode().

◆ append()

void GFTrackCand::append ( const GFTrackCand )

Referenced by setPdgCode().

◆ getCurv()

double GFTrackCand::getCurv ( ) const
inline

Definition at line 111 of file GFTrackCand.h.

111 { return fCurv; }

◆ GetDetIDs()

std::vector<unsigned int> GFTrackCand::GetDetIDs ( ) const
inline

Definition at line 115 of file GFTrackCand.h.

115 { return fDetId; }

◆ getDip()

double GFTrackCand::getDip ( ) const
inline

Definition at line 112 of file GFTrackCand.h.

112 { return fDip; }

◆ getDirError()

TVector3 GFTrackCand::getDirError ( ) const
inline

get the seed value for track: error on direction (standard deviation)

Definition at line 137 of file GFTrackCand.h.

137 { return fDirError; }

◆ getDirSeed()

TVector3 GFTrackCand::getDirSeed ( ) const
inline

get the seed value for track: direction

Definition at line 131 of file GFTrackCand.h.

131 { return fDirSeed; }

◆ getHit() [1/2]

void GFTrackCand::getHit ( unsigned int  i,
unsigned int &  detId,
unsigned int &  hitId 
) const
inline

Get detector ID and cluster index (hitId) for hit number i.

Definition at line 83 of file GFTrackCand.h.

References getNHits().

84  {
85  assert(i < getNHits());
86  detId = fDetId.at(i);
87  hitId = fHitId.at(i);
88  }
unsigned int i
Definition: P4_F32vec4.h:21
unsigned int getNHits() const
Definition: GFTrackCand.h:110

◆ getHit() [2/2]

void GFTrackCand::getHit ( unsigned int  i,
unsigned int &  detId,
unsigned int &  hitId,
double &  rho 
) const
inline

Get detector ID and cluster index (hitId) for hit number i with ordering parameter rho.

Definition at line 92 of file GFTrackCand.h.

References getNHits().

93  {
94  assert(i < getNHits());
95  detId = fDetId.at(i);
96  hitId = fHitId.at(i);
97  rho = fRho.at(i);
98  }
unsigned int i
Definition: P4_F32vec4.h:21
unsigned int getNHits() const
Definition: GFTrackCand.h:110

◆ GetHitIDs()

std::vector<unsigned int> GFTrackCand::GetHitIDs ( int  detId = -1)

Referenced by inverted().

◆ getHitWithPlane()

void GFTrackCand::getHitWithPlane ( unsigned int  i,
unsigned int &  detId,
unsigned int &  hitId,
unsigned int &  planeId 
) const
inline

Get detector ID and cluster index (hitId) for hit number i with plane id.

Definition at line 102 of file GFTrackCand.h.

References getNHits().

103  {
104  assert(i < getNHits());
105  detId = fDetId.at(i);
106  hitId = fHitId.at(i);
107  planeId = fPlaneId.at(i);
108  }
unsigned int i
Definition: P4_F32vec4.h:21
unsigned int getNHits() const
Definition: GFTrackCand.h:110

◆ getMcTrackId()

int GFTrackCand::getMcTrackId ( ) const
inline

get the MCT track id, for MC simulations - def. value -1

Definition at line 127 of file GFTrackCand.h.

127 { return fMcTrackId; }

◆ getNHits()

unsigned int GFTrackCand::getNHits ( ) const
inline

Definition at line 110 of file GFTrackCand.h.

Referenced by getHit(), and getHitWithPlane().

110 { return fDetId.size(); }

◆ getPdgCode()

int GFTrackCand::getPdgCode ( ) const
inline

get the PDG code

Definition at line 139 of file GFTrackCand.h.

References addHit().

139 { return fPdg; }

◆ getPosError()

TVector3 GFTrackCand::getPosError ( ) const
inline

get the seed value for track: error on pos (standard deviation)

Definition at line 135 of file GFTrackCand.h.

135 { return fPosError; }

◆ getPosSeed()

TVector3 GFTrackCand::getPosSeed ( ) const
inline

get the seed value for track: pos

Definition at line 129 of file GFTrackCand.h.

129 { return fPosSeed; }

◆ getQoverPseed()

double GFTrackCand::getQoverPseed ( ) const
inline

get the seed value for track: qoverp

Definition at line 133 of file GFTrackCand.h.

133 { return fQoverpSeed; }

◆ GetRhos()

std::vector<double> GFTrackCand::GetRhos ( ) const
inline

Definition at line 116 of file GFTrackCand.h.

116 { return fRho; }

◆ GetUniqueDetIDs()

std::set<unsigned int> GFTrackCand::GetUniqueDetIDs ( ) const
inline

Definition at line 117 of file GFTrackCand.h.

References i.

118  {
119  std::set<unsigned int> retVal;
120  for (unsigned int i = 0; i < fDetId.size(); ++i) {
121  retVal.insert(fDetId.at(i));
122  }
123  return retVal;
124  }
unsigned int i
Definition: P4_F32vec4.h:21

◆ HitInTrack()

bool GFTrackCand::HitInTrack ( unsigned int  detId,
unsigned int  hitId 
)

Test if hit already is part of this track candidate.

Referenced by setMcTrackId().

◆ inverted()

bool GFTrackCand::inverted ( ) const
inline

Definition at line 113 of file GFTrackCand.h.

References GetHitIDs().

113 { return fInv; }

◆ Print()

void GFTrackCand::Print ( ) const

Referenced by setPdgCode().

◆ reset()

void GFTrackCand::reset ( )

Referenced by setPdgCode().

◆ setComplTrackSeed()

void GFTrackCand::setComplTrackSeed ( const TVector3 &  pos,
const TVector3 &  mom,
const int  pdgCode,
TVector3  posError = TVector3(1.0, 1.0, 1.0),
TVector3  dirError = TVector3(1.0, 1.0, 1.0) 
)

set the seed values for track: pos, momentum, pdgCode, pos error, momentum error (errors are optional and will be set to 1,1,1 if not given)

Referenced by setTrackSeed().

◆ setCurv()

void GFTrackCand::setCurv ( double  c)
inline

Definition at line 142 of file GFTrackCand.h.

142 { fCurv = c; }

◆ setDip()

void GFTrackCand::setDip ( double  d)
inline

Definition at line 143 of file GFTrackCand.h.

143 { fDip = d; }

◆ setInverted()

void GFTrackCand::setInverted ( bool  f = true)
inline

Definition at line 144 of file GFTrackCand.h.

References f.

144 { fInv = f; }
float f
Definition: P4_F32vec4.h:20

◆ setMcTrackId()

void GFTrackCand::setMcTrackId ( int  i)
inline

set the MCT track id, for MC simulations

Definition at line 147 of file GFTrackCand.h.

References HitInTrack(), and i.

147 { fMcTrackId = i; }
unsigned int i
Definition: P4_F32vec4.h:21

◆ setPdgCode()

void GFTrackCand::setPdgCode ( int  pdgCode)
inline

set a particle hypothesis in form of a PDG code

Definition at line 164 of file GFTrackCand.h.

References append(), Print(), and reset().

164 { fPdg = pdgCode; }

◆ setTrackSeed()

void GFTrackCand::setTrackSeed ( const TVector3 &  pos,
const TVector3 &  direction,
const double  qop 
)
inline

set the seed values for track: pos, direction, q/p

Definition at line 153 of file GFTrackCand.h.

References setComplTrackSeed().

154  {
155  fPosSeed = pos;
156  fDirSeed = direction;
157  fQoverpSeed = qop;
158  }

Friends And Related Function Documentation

◆ operator==

bool operator== ( const GFTrackCand lhs,
const GFTrackCand rhs 
)
friend

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