LDMX Software
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ldmx::TruthTrack Class Reference

Public Member Functions

 TruthTrack ()=default
 default constructor
 
void Print () const
 Use the vertex position of the SimParticle to extract (x, y, z, px, py, pz, q) and create a track seed.
 
void setTrackID (int trackid)
 Use the scoring plane hit at the target to extract (x, y, z, px, py, pz) and create a track seed.
 
int getTrackID () const
 
void setPdgID (int pdgID)
 
int getPdgID () const
 
void setNhits (int nHits)
 
int getNhits () const
 
int q () const
 
void setPerigeeParameters (const std::vector< double > &par)
 
std::vector< double > getPerigeeParameters () const
 
void setPerigeeLocation (const std::vector< double > &perigee)
 
void setPerigeeLocation (const double &x, const double &y, const double &z)
 
void setMomentum (const double &px, const double &py, const double &pz)
 
void setPosition (const double &x, const double &y, const double &z)
 
std::vector< double > getPerigeeLocation () const
 
double getPerigeeX () const
 
double getPerigeeY () const
 
double getPerigeeZ () const
 
std::vector< double > getMomentum () const
 
std::vector< double > getPosition () const
 
double getD0 () const
 
double getZ0 () const
 
double getPhi () const
 
double getTheta () const
 
double getQoP () const
 
double getT () const
 

Private Member Functions

 ClassDef (TruthTrack, 2)
 Class declaration needed by the ROOT dictionary.
 

Private Attributes

std::vector< double > perigee_pars_ {0., 0., 0., 0., 0., 0.}
 
std::vector< double > perigee_ {0., 0., 0.}
 
std::vector< double > momentum_ {0., 0., 0.}
 
std::vector< double > position_ {0., 0., 0.}
 
int nHits_ {0}
 
int trackID_ {-1}
 
int pdgID_ {0}
 

Friends

std::ostream & operator<< (std::ostream &output, const TruthTrack &trk)
 

Detailed Description

Definition at line 9 of file TruthTrack.h.

Member Function Documentation

◆ getD0()

double ldmx::TruthTrack::getD0 ( ) const
inline

Definition at line 142 of file TruthTrack.h.

142{ return perigee_pars_[0]; };

◆ getMomentum()

std::vector< double > ldmx::TruthTrack::getMomentum ( ) const
inline

Definition at line 137 of file TruthTrack.h.

137{ return momentum_; };

◆ getNhits()

int ldmx::TruthTrack::getNhits ( ) const
inline

Definition at line 99 of file TruthTrack.h.

99{ return nHits_; }

◆ getPdgID()

int ldmx::TruthTrack::getPdgID ( ) const
inline

Definition at line 96 of file TruthTrack.h.

96{ return pdgID_; };

◆ getPerigeeLocation()

std::vector< double > ldmx::TruthTrack::getPerigeeLocation ( ) const
inline

Definition at line 132 of file TruthTrack.h.

132{ return perigee_; };

◆ getPerigeeParameters()

std::vector< double > ldmx::TruthTrack::getPerigeeParameters ( ) const
inline

Definition at line 108 of file TruthTrack.h.

108{ return perigee_pars_; }

◆ getPerigeeX()

double ldmx::TruthTrack::getPerigeeX ( ) const
inline

Definition at line 133 of file TruthTrack.h.

133{ return perigee_[0]; };

◆ getPerigeeY()

double ldmx::TruthTrack::getPerigeeY ( ) const
inline

Definition at line 134 of file TruthTrack.h.

134{ return perigee_[1]; };

◆ getPerigeeZ()

double ldmx::TruthTrack::getPerigeeZ ( ) const
inline

Definition at line 135 of file TruthTrack.h.

135{ return perigee_[2]; };

◆ getPhi()

double ldmx::TruthTrack::getPhi ( ) const
inline

Definition at line 144 of file TruthTrack.h.

144{ return perigee_pars_[2]; };

◆ getPosition()

std::vector< double > ldmx::TruthTrack::getPosition ( ) const
inline

Definition at line 138 of file TruthTrack.h.

138{ return position_; };

◆ getQoP()

double ldmx::TruthTrack::getQoP ( ) const
inline

Definition at line 146 of file TruthTrack.h.

146{ return perigee_pars_[4]; };

◆ getT()

double ldmx::TruthTrack::getT ( ) const
inline

Definition at line 147 of file TruthTrack.h.

147{ return perigee_pars_[5]; };

◆ getTheta()

double ldmx::TruthTrack::getTheta ( ) const
inline

Definition at line 145 of file TruthTrack.h.

145{ return perigee_pars_[3]; };

◆ getTrackID()

int ldmx::TruthTrack::getTrackID ( ) const
inline

Definition at line 93 of file TruthTrack.h.

93{ return trackID_; };

◆ getZ0()

double ldmx::TruthTrack::getZ0 ( ) const
inline

Definition at line 143 of file TruthTrack.h.

143{ return perigee_pars_[1]; };

◆ Print()

void ldmx::TruthTrack::Print ( ) const
inline

Use the vertex position of the SimParticle to extract (x, y, z, px, py, pz, q) and create a track seed.

Parameters
particleThe SimParticle to make a seed from.

Definition at line 26 of file TruthTrack.h.

26{};

◆ q()

int ldmx::TruthTrack::q ( ) const
inline

Definition at line 102 of file TruthTrack.h.

102{ return perigee_pars_[4] > 0 ? 1 : -1; }

◆ setMomentum()

void ldmx::TruthTrack::setMomentum ( const double &  px,
const double &  py,
const double &  pz 
)
inline

Definition at line 120 of file TruthTrack.h.

120 {
121 momentum_[0] = px;
122 momentum_[1] = py;
123 momentum_[2] = pz;
124 }

◆ setNhits()

void ldmx::TruthTrack::setNhits ( int  nHits)
inline

Definition at line 98 of file TruthTrack.h.

98{ nHits_ = nHits; };

◆ setPdgID()

void ldmx::TruthTrack::setPdgID ( int  pdgID)
inline

Definition at line 95 of file TruthTrack.h.

95{ pdgID_ = pdgID; };

◆ setPerigeeLocation() [1/2]

void ldmx::TruthTrack::setPerigeeLocation ( const double &  x,
const double &  y,
const double &  z 
)
inline

Definition at line 114 of file TruthTrack.h.

114 {
115 perigee_[0] = x;
116 perigee_[1] = y;
117 perigee_[2] = z;
118 }

◆ setPerigeeLocation() [2/2]

void ldmx::TruthTrack::setPerigeeLocation ( const std::vector< double > &  perigee)
inline

Definition at line 110 of file TruthTrack.h.

110 {
111 perigee_ = perigee;
112 }

◆ setPerigeeParameters()

void ldmx::TruthTrack::setPerigeeParameters ( const std::vector< double > &  par)
inline

Definition at line 105 of file TruthTrack.h.

105 {
106 perigee_pars_ = par;
107 }

◆ setPosition()

void ldmx::TruthTrack::setPosition ( const double &  x,
const double &  y,
const double &  z 
)
inline

Definition at line 126 of file TruthTrack.h.

126 {
127 position_[0] = x;
128 position_[1] = y;
129 position_[2] = z;
130 }

◆ setTrackID()

void ldmx::TruthTrack::setTrackID ( int  trackid)
inline

Use the scoring plane hit at the target to extract (x, y, z, px, py, pz) and create a track seed.

In this case, the SimParticle is used to extract the charge of the particle.

Parameters
particleThe SimParticle to extract the charge from.
hitThe SimTrackerHit used to create the seed. Create a truth track from the given position, momentum and charge.
posThe position at which the particle was created.
pThe momentum of the particle at the point of creation.
chargeThe charge of the particle.

Definition at line 92 of file TruthTrack.h.

92{ trackID_ = trackid; };

Member Data Documentation

◆ momentum_

std::vector<double> ldmx::TruthTrack::momentum_ {0., 0., 0.}
private

Definition at line 160 of file TruthTrack.h.

160{0., 0., 0.};

◆ nHits_

int ldmx::TruthTrack::nHits_ {0}
private

Definition at line 166 of file TruthTrack.h.

166{0};

◆ pdgID_

int ldmx::TruthTrack::pdgID_ {0}
private

Definition at line 172 of file TruthTrack.h.

172{0};

◆ perigee_

std::vector<double> ldmx::TruthTrack::perigee_ {0., 0., 0.}
private

Definition at line 157 of file TruthTrack.h.

157{0., 0., 0.};

◆ perigee_pars_

std::vector<double> ldmx::TruthTrack::perigee_pars_ {0., 0., 0., 0., 0., 0.}
private

Definition at line 154 of file TruthTrack.h.

154{0., 0., 0., 0., 0., 0.};

◆ position_

std::vector<double> ldmx::TruthTrack::position_ {0., 0., 0.}
private

Definition at line 163 of file TruthTrack.h.

163{0., 0., 0.};

◆ trackID_

int ldmx::TruthTrack::trackID_ {-1}
private

Definition at line 169 of file TruthTrack.h.

169{-1};

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