Belle II Software  release-05-02-19
TOPtrack Class Reference

Class to hold reconstructed track, interface to fortran. More...

#include <TOPtrack.h>

Collaboration diagram for TOPtrack:

Public Member Functions

 TOPtrack ()
 Default constructor.
 
 TOPtrack (double x, double y, double z, double Px, double Py, double Pz, double Tlen, int Q, int pdg=0)
 Constructor with track parameters. More...
 
 TOPtrack (const Track *track, const Const::ChargedStable &chargedStable=Const::pion)
 Constructor from mdst track - isValid() must be checked before using the object. More...
 
 TOPtrack (const Track *track, int moduleID, const Const::ChargedStable &chargedStable=Const::pion)
 Constructor from mdst track - isValid() must be checked before using the object. More...
 
bool isValid () const
 Check if track is properly defined. More...
 
const TVector3 & getPosition () const
 Return spatial position. More...
 
const TVector3 & getMomentum () const
 Return momentum vector. More...
 
double getX () const
 Return position component. More...
 
double getY () const
 Return position component. More...
 
double getZ () const
 Return position component. More...
 
double getPx () const
 Return momentum component. More...
 
double getPy () const
 Return momentum component. More...
 
double getPz () const
 Return momentum component. More...
 
double getTrackLength () const
 Return track length from IP to current position. More...
 
double getTOF (double mass) const
 Return time-of-flight from IP to current position for given particle mass. More...
 
double getTOF (const Const::ChargedStable &particle) const
 Return time-of-flight from IP to current position for given charged stable. More...
 
void setTrackLength (double tof, double mass)
 Set track length from time-of-flight and particle mass. More...
 
void setTrackLength (double tof, const Const::ChargedStable &particle)
 Set track length from time-of-flight and given charged stable. More...
 
double getP () const
 Return momentum magnitude. More...
 
double getTheta () const
 Return momentum polar angle. More...
 
double getPhi () const
 Return momentum azimuthal angle. More...
 
int getPDGcode () const
 Return PDG code. More...
 
int getCharge () const
 Return charge. More...
 
int getHypID () const
 Return internal particle code. More...
 
int getModuleID () const
 Return module ID. More...
 
bool atTop () const
 Check if toTop() was already called. More...
 
const TrackgetTrack () const
 Return mdst track if this track is constructed from it. More...
 
const ExtHitgetExtHit () const
 Return extrapolated hit (track entrance to the bar) if this track is constructed from mdst track. More...
 
const MCParticlegetMCParticle () const
 Return MC particle assigned to this track (if any) More...
 
const TOPBarHitgetBarHit () const
 Return bar hit of MC particle assigned to this track (if any) More...
 
int toTop ()
 Propagate track to TOP counter (assuming uniform B field along z) More...
 
void smear (double sig_x, double sig_z, double sig_theta, double sig_phi)
 Smear track. More...
 
void dump () const
 Print track parameters to std output.
 

Private Member Functions

int findModule ()
 Finds moduleID the track is crossing. More...
 

Private Attributes

bool m_valid = false
 true for properly defined track
 
TVector3 m_position
 position vector
 
TVector3 m_momentum
 momentum vector
 
double m_trackLength = 0
 track length from IP to point
 
int m_charge = 0
 charge
 
int m_pdg = 0
 PDG code (optional)
 
bool m_atTop = false
 true, if toTop() called
 
int m_moduleID = 0
 module ID or 0
 
const Trackm_track = 0
 pointer to mdst track or NULL
 
const ExtHitm_extHit = 0
 pointer to extrapolated hit or NULL
 
const MCParticlem_mcParticle = 0
 pointer to MC particle or NULL
 
const TOPBarHitm_barHit = 0
 pointer to bar hit or NULL
 

Detailed Description

Class to hold reconstructed track, interface to fortran.

Input to TOPreco.

Definition at line 42 of file TOPtrack.h.

Constructor & Destructor Documentation

◆ TOPtrack() [1/3]

TOPtrack ( double  x,
double  y,
double  z,
double  Px,
double  Py,
double  Pz,
double  Tlen,
int  Q,
int  pdg = 0 
)

Constructor with track parameters.

Parameters
xtrack spatial position x
ytrack spatial position y
ztrack spatial position z
Pxtrack momentum component x
Pytrack momentum component y
Pztrack momentum component z
Tlentrack length from IP
Qtrack charge
pdgPDG code (optional)

Definition at line 41 of file TOPtrack.cc.

43  :
44  m_valid(true), m_position(x, y, z), m_momentum(px, py, pz),
45  m_trackLength(Tlen), m_charge(Q), m_pdg(pdg),
46  m_atTop(false), m_moduleID(0),
47  m_track(0), m_extHit(0), m_mcParticle(0), m_barHit(0)
48  {
50  }

◆ TOPtrack() [2/3]

TOPtrack ( const Track track,
const Const::ChargedStable chargedStable = Const::pion 
)
explicit

Constructor from mdst track - isValid() must be checked before using the object.

Parameters
trackmdst track pointer
chargedStablehypothesis used in mdst track extrapolation (default: pion)

Definition at line 53 of file TOPtrack.cc.

◆ TOPtrack() [3/3]

TOPtrack ( const Track track,
int  moduleID,
const Const::ChargedStable chargedStable = Const::pion 
)

Constructor from mdst track - isValid() must be checked before using the object.

Parameters
trackmdst track pointer
moduleIDmodule (=slot) ID
chargedStablehypothesis used in mdst track extrapolation (default: pion)

Definition at line 112 of file TOPtrack.cc.

Member Function Documentation

◆ atTop()

bool atTop ( ) const
inline

Check if toTop() was already called.

Returns
true or false

Definition at line 223 of file TOPtrack.h.

228 {return m_extHit;}

◆ findModule()

int findModule ( )
private

Finds moduleID the track is crossing.

Returns
module ID, if track hits the bar, otherwise 0

Definition at line 248 of file TOPtrack.cc.

◆ getBarHit()

const TOPBarHit* getBarHit ( ) const
inline

Return bar hit of MC particle assigned to this track (if any)

Returns
bar hit pointer or NULL

Definition at line 248 of file TOPtrack.h.

◆ getCharge()

int getCharge ( ) const
inline

Return charge.

Returns
charge

Definition at line 205 of file TOPtrack.h.

◆ getExtHit()

const ExtHit* getExtHit ( ) const
inline

Return extrapolated hit (track entrance to the bar) if this track is constructed from mdst track.

Returns
extrapolated hit pointer or NULL

Definition at line 236 of file TOPtrack.h.

◆ getHypID()

int getHypID ( ) const

Return internal particle code.

Returns
internal particle code: 1=e, 2=mu, 3=pi, 4=K, 5=p, 6=d, 0=unknown

Definition at line 177 of file TOPtrack.cc.

◆ getMCParticle()

const MCParticle* getMCParticle ( ) const
inline

Return MC particle assigned to this track (if any)

Returns
MC particle pointer or NULL

Definition at line 242 of file TOPtrack.h.

◆ getModuleID()

int getModuleID ( ) const
inline

Return module ID.

Returns
module ID, if track hits the bar, otherwise 0

Definition at line 217 of file TOPtrack.h.

◆ getMomentum()

const TVector3& getMomentum ( ) const
inline

Return momentum vector.

Returns
momentum vector

Definition at line 99 of file TOPtrack.h.

◆ getP()

double getP ( ) const
inline

Return momentum magnitude.

Returns
momentum

Definition at line 181 of file TOPtrack.h.

◆ getPDGcode()

int getPDGcode ( ) const
inline

Return PDG code.

Returns
PDG code

Definition at line 199 of file TOPtrack.h.

◆ getPhi()

double getPhi ( ) const
inline

Return momentum azimuthal angle.

Returns
momentum azimuthal angle

Definition at line 193 of file TOPtrack.h.

◆ getPosition()

const TVector3& getPosition ( ) const
inline

Return spatial position.

Returns
position

Definition at line 93 of file TOPtrack.h.

◆ getPx()

double getPx ( ) const
inline

Return momentum component.

Returns
momentum component x

Definition at line 123 of file TOPtrack.h.

◆ getPy()

double getPy ( ) const
inline

Return momentum component.

Returns
momentum component y

Definition at line 129 of file TOPtrack.h.

◆ getPz()

double getPz ( ) const
inline

Return momentum component.

Returns
momentum component z

Definition at line 135 of file TOPtrack.h.

◆ getTheta()

double getTheta ( ) const
inline

Return momentum polar angle.

Returns
momentum polar angle

Definition at line 187 of file TOPtrack.h.

◆ getTOF() [1/2]

double getTOF ( const Const::ChargedStable particle) const
inline

Return time-of-flight from IP to current position for given charged stable.

Parameters
particlecharged stable particle
Returns
time-of-flight

Definition at line 155 of file TOPtrack.h.

◆ getTOF() [2/2]

double getTOF ( double  mass) const

Return time-of-flight from IP to current position for given particle mass.

Parameters
massparticle mass
Returns
time-of-flight

Definition at line 163 of file TOPtrack.cc.

◆ getTrack()

const Track* getTrack ( ) const
inline

Return mdst track if this track is constructed from it.

Returns
mdst track pointer or NULL

Definition at line 229 of file TOPtrack.h.

◆ getTrackLength()

double getTrackLength ( ) const
inline

Return track length from IP to current position.

Returns
track length from IP

Definition at line 141 of file TOPtrack.h.

◆ getX()

double getX ( ) const
inline

Return position component.

Returns
spatial position x

Definition at line 105 of file TOPtrack.h.

◆ getY()

double getY ( ) const
inline

Return position component.

Returns
spatial position y

Definition at line 111 of file TOPtrack.h.

◆ getZ()

double getZ ( ) const
inline

Return position component.

Returns
spatial position z

Definition at line 117 of file TOPtrack.h.

◆ isValid()

bool isValid ( ) const
inline

Check if track is properly defined.

Returns
true if properly defined

Definition at line 87 of file TOPtrack.h.

◆ setTrackLength() [1/2]

void setTrackLength ( double  tof,
const Const::ChargedStable particle 
)
inline

Set track length from time-of-flight and given charged stable.

Parameters
toftime-of-flight
particlecharged stable particle

Definition at line 172 of file TOPtrack.h.

◆ setTrackLength() [2/2]

void setTrackLength ( double  tof,
double  mass 
)

Set track length from time-of-flight and particle mass.

Parameters
toftime-of-flight
massparticle mass

Definition at line 170 of file TOPtrack.cc.

◆ smear()

void smear ( double  sig_x,
double  sig_z,
double  sig_theta,
double  sig_phi 
)

Smear track.

Parameters
sig_xsigma in x
sig_zsigma in z
sig_thetasigma in theta
sig_phisigma in phi

Definition at line 209 of file TOPtrack.cc.

◆ toTop()

int toTop ( )

Propagate track to TOP counter (assuming uniform B field along z)

Returns
module ID, if track hits the bar, otherwise 0

Definition at line 186 of file TOPtrack.cc.


The documentation for this class was generated from the following files:
Belle2::TOP::TOPtrack::findModule
int findModule()
Finds moduleID the track is crossing.
Definition: TOPtrack.cc:248
Belle2::TOP::TOPtrack::m_valid
bool m_valid
true for properly defined track
Definition: TOPtrack.h:278
Belle2::TOP::TOPtrack::m_barHit
const TOPBarHit * m_barHit
pointer to bar hit or NULL
Definition: TOPtrack.h:289
Belle2::TOP::TOPtrack::m_atTop
bool m_atTop
true, if toTop() called
Definition: TOPtrack.h:284
Belle2::TOP::TOPtrack::m_momentum
TVector3 m_momentum
momentum vector
Definition: TOPtrack.h:280
Belle2::TOP::TOPtrack::m_mcParticle
const MCParticle * m_mcParticle
pointer to MC particle or NULL
Definition: TOPtrack.h:288
Belle2::TOP::TOPtrack::m_pdg
int m_pdg
PDG code (optional)
Definition: TOPtrack.h:283
Belle2::TOP::TOPtrack::m_position
TVector3 m_position
position vector
Definition: TOPtrack.h:279
Belle2::TOP::TOPtrack::m_charge
int m_charge
charge
Definition: TOPtrack.h:282
Belle2::TOP::TOPtrack::m_track
const Track * m_track
pointer to mdst track or NULL
Definition: TOPtrack.h:286
Belle2::TOP::TOPtrack::m_trackLength
double m_trackLength
track length from IP to point
Definition: TOPtrack.h:281
Belle2::TOP::TOPtrack::m_extHit
const ExtHit * m_extHit
pointer to extrapolated hit or NULL
Definition: TOPtrack.h:287
Belle2::TOP::TOPtrack::m_moduleID
int m_moduleID
module ID or 0
Definition: TOPtrack.h:285