hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Track Class Reference

#include <Track.h>

Inheritance diagram for Track:

Public Member Functions

 Track ()
 
 ~Track ()
 
void Clear (Option_t *option="")
 
void addHit (TObject *hit)
 
void setTruthLink (TObject *obj)
 
TRef getTruthLink ()
 
TRefArray getSvtHits () const
 
void setTrackParameters (const double d0, const double phi0, const double omega, const double tan_lambda, const double z0)
 
std::vector< double > getTrackParameters ()
 
double getD0 () const
 
double getPhi () const
 
void setPhi (const double phi0)
 
double getOmega () const
 
double getTanLambda () const
 
double getZ0 () const
 
void setCov (const std::vector< float > &cov)
 
std::vector< float > getCov ()
 
std::vector< int > getHitLayers ()
 
void addHitLayer (int layer)
 
void addMcpHit (int layer, int mcpID)
 
std::vector< std::pair< int, int > > getMcpHits ()
 
double getD0Err () const
 
double getPhiErr () const
 
double getOmegaErr () const
 
double getTanLambdaErr () const
 
double getZ0Err () const
 
void setNdf (const float ndf)
 
double getNdf () const
 
void setChi2 (const double chi2)
 
double getChi2 () const
 
double getChi2Ndf () const
 
void setIsolation (const int layer, const double isolation)
 
double getIsolation (const int layer) const
 
void setTrackTime (const double track_time)
 
double getTrackTime () const
 
void setTrackVolume (const int track_volume)
 
void setParticle (TObject *particle)
 
TObject * getParticle () const
 
void setPositionAtEcal (const double *position)
 
std::vector< double > getPositionAtEcal ()
 
void setPosition (const double *position)
 
std::vector< double > getPosition ()
 
void setType (const int type)
 
int getType () const
 
void applyCorrection (std::string var, double correction)
 
bool is345Seed () const
 
bool is456Seed () const
 
bool is123SeedC4 () const
 
bool is123SeedC5 () const
 
bool isMatchedTrack () const
 
bool isGBLTrack () const
 
bool isKalmanTrack () const
 
bool isStrategy (TRACKINFO::STRATEGY strategy)
 
void setCharge (const int charge)
 
int getCharge () const
 
void setID (const int id)
 
int getID () const
 
void setMomentum (double bfield=0.52)
 
void setMomentum (std::vector< double > momentum)
 
void setMomentum (double px, double py, double pz)
 
std::vector< double > getMomentum ()
 
double getP () const
 
double getPt () const
 
void setLambdaKink (const int layer, const double lambda_kink)
 
double getLambdaKink (const int layer) const
 
void setPhiKink (const int layer, const double phi_kink)
 
double getPhiKink (const int layer) const
 
bool isTopTrack () const
 
bool isBottomTrack () const
 
void setTrackerHitCount (int nHits)
 
int getTrackerHitCount () const
 
void setNShared (const int nShared)
 
int getNShared () const
 
void setSharedLy0 (const bool isShared)
 
void setSharedLy1 (const bool isShared)
 
bool getSharedLy0 () const
 
bool getSharedLy1 () const
 
void Print (Option_t *option="") const
 

Private Member Functions

 ClassDef (Track, 1)
 

Private Attributes

TRefArray tracker_hits_ {TRefArray{}}
 
TRef particle_
 
double isolation_ [14]
 
int n_hits_ {0}
 
int track_volume_ {-999}
 
int type_ {-999}
 
std::vector< float > cov_
 
std::vector< int > hit_layers_
 
std::vector< std::pair< int, int > > mcp_hits_
 
double d0_ {-999.}
 
double phi0_ {-999.}
 
double omega_ {-999.}
 
double tan_lambda_ {-999.}
 
double z0_ {-999.}
 
double chi2_ {-999.}
 
double ndf_ {0.}
 
double track_time_ {-999.}
 
double x_at_ecal_ {-999.}
 
double y_at_ecal_ {-999.}
 
double z_at_ecal_ {-999.}
 
double x_ {-999.}
 
double y_ {-999.}
 
double z_ {-999.}
 
double lambda_kinks_ [14]
 
double phi_kinks_ [14]
 
double px_ {-9999.}
 
double py_ {-9999.}
 
double pz_ {-9999.}
 
int id_ {0}
 
int charge_ {0}
 
int nShared_ {0}
 
bool SharedLy0_ {false}
 
bool SharedLy1_ {false}
 
TRef truth_link_
 
TRef mcp_link_
 

Detailed Description

Definition at line 32 of file Track.h.

Constructor & Destructor Documentation

◆ Track()

Track ( )

Constructor

◆ ~Track()

~Track ( )

Destructor

Definition at line 16 of file Track.cxx.

Member Function Documentation

◆ addHit()

void addHit ( TObject *  hit)

Add a reference to an TrackerHit.

Parameters
hit: A TrackerHit object

Definition at line 86 of file Track.cxx.

◆ addHitLayer()

void addHitLayer ( int  layer)
inline

Definition at line 100 of file Track.h.

◆ addMcpHit()

void addMcpHit ( int  layer,
int  mcpID 
)
inline

Definition at line 102 of file Track.h.

◆ applyCorrection()

void applyCorrection ( std::string  var,
double  correction 
)
Returns
The track decoded type: GSSSSM.

Definition at line 91 of file Track.cxx.

◆ ClassDef()

ClassDef ( Track  ,
 
)
private

◆ Clear()

void Clear ( Option_t *  option = "")

Reset the Track object

Definition at line 23 of file Track.cxx.

◆ getCharge()

int getCharge ( ) const
inline

Get the charge of a the track.

Returns
The charge associated of the track.

Definition at line 247 of file Track.h.

◆ getChi2()

double getChi2 ( ) const
inline
Returns
the chi^2 of the fit to the track.

Definition at line 123 of file Track.h.

◆ getChi2Ndf()

double getChi2Ndf ( ) const
inline
Returns
the chi^2 / ndf of the fit to the track.

Definition at line 126 of file Track.h.

◆ getCov()

std::vector< float > getCov ( )
inline

Definition at line 97 of file Track.h.

◆ getD0()

double getD0 ( ) const
inline

Definition at line 87 of file Track.h.

◆ getD0Err()

double getD0Err ( ) const
inline

Definition at line 105 of file Track.h.

◆ getHitLayers()

std::vector< int > getHitLayers ( )
inline

Definition at line 99 of file Track.h.

◆ getID()

int getID ( ) const
inline

Get the track id.

Definition at line 262 of file Track.h.

◆ getIsolation()

double getIsolation ( const int  layer) const
inline

Get the isolation value of the given layer.

Parameters
layerThe SVT layer of interest.
Returns
The isolation value of the given layer.

Definition at line 149 of file Track.h.

◆ getLambdaKink()

double getLambdaKink ( const int  layer) const
inline

Get the lambda kink value of the given layer.

Parameters
layerThe SVT layer of interest.
Returns
The lambda kink value of the given layer.

Definition at line 309 of file Track.h.

◆ getMcpHits()

std::vector< std::pair< int, int > > getMcpHits ( )
inline

Definition at line 103 of file Track.h.

◆ getMomentum()

std::vector< double > getMomentum ( )
inline
Returns
The track momentum.

Definition at line 285 of file Track.h.

◆ getNdf()

double getNdf ( ) const
inline

Definition at line 113 of file Track.h.

◆ getNShared()

int getNShared ( ) const
inline

Definition at line 350 of file Track.h.

◆ getOmega()

double getOmega ( ) const
inline

Definition at line 90 of file Track.h.

◆ getOmegaErr()

double getOmegaErr ( ) const
inline

Definition at line 107 of file Track.h.

◆ getP()

double getP ( ) const
inline
Returns
momentum magnitude

Definition at line 291 of file Track.h.

◆ getParticle()

TObject * getParticle ( ) const
inline
Returns
The Particle associated with this track.

Definition at line 178 of file Track.h.

◆ getPhi()

double getPhi ( ) const
inline

Definition at line 88 of file Track.h.

◆ getPhiErr()

double getPhiErr ( ) const
inline

Definition at line 106 of file Track.h.

◆ getPhiKink()

double getPhiKink ( const int  layer) const
inline

Get the phi kink value of the given layer.

Parameters
layerThe SVT layer of interest.
Returns
The phi kink value of the given layer.

Definition at line 325 of file Track.h.

◆ getPosition()

std::vector< double > getPosition ( )
Returns
Extrapolated track position.

Definition at line 61 of file Track.cxx.

◆ getPositionAtEcal()

std::vector< double > getPositionAtEcal ( )
Returns
Extrapolated track position at Ecal face.

Definition at line 53 of file Track.cxx.

◆ getPt()

double getPt ( ) const
inline

Definition at line 293 of file Track.h.

◆ getSharedLy0()

bool getSharedLy0 ( ) const
inline

Definition at line 355 of file Track.h.

◆ getSharedLy1()

bool getSharedLy1 ( ) const
inline

Definition at line 356 of file Track.h.

◆ getSvtHits()

TRefArray getSvtHits ( ) const
inline
Returns
A reference to the hits associated with this track.

Definition at line 64 of file Track.h.

◆ getTanLambda()

double getTanLambda ( ) const
inline

Definition at line 91 of file Track.h.

◆ getTanLambdaErr()

double getTanLambdaErr ( ) const
inline

Definition at line 108 of file Track.h.

◆ getTrackerHitCount()

int getTrackerHitCount ( ) const
inline
Returns
Number of tracker hits associated with this track.

Definition at line 345 of file Track.h.

◆ getTrackParameters()

std::vector< double > getTrackParameters ( )
Returns
The track parameters.

Definition at line 45 of file Track.cxx.

◆ getTrackTime()

double getTrackTime ( ) const
inline

Get the time of the track.

Returns
The track time.

Definition at line 160 of file Track.h.

◆ getTruthLink()

TRef getTruthLink ( )
inline

Definition at line 59 of file Track.h.

◆ getType()

int getType ( ) const
inline
Returns
The track type.

Definition at line 211 of file Track.h.

◆ getZ0()

double getZ0 ( ) const
inline

Definition at line 92 of file Track.h.

◆ getZ0Err()

double getZ0Err ( ) const
inline

Definition at line 109 of file Track.h.

◆ is123SeedC4()

bool is123SeedC4 ( ) const
inline

Definition at line 223 of file Track.h.

◆ is123SeedC5()

bool is123SeedC5 ( ) const
inline

Definition at line 225 of file Track.h.

◆ is345Seed()

bool is345Seed ( ) const
inline

Definition at line 219 of file Track.h.

◆ is456Seed()

bool is456Seed ( ) const
inline

Definition at line 221 of file Track.h.

◆ isBottomTrack()

bool isBottomTrack ( ) const
inline
Returns
True if the track is in the bottom SVT volume, false otherwise.

Definition at line 335 of file Track.h.

◆ isGBLTrack()

bool isGBLTrack ( ) const
inline

Definition at line 229 of file Track.h.

◆ isKalmanTrack()

bool isKalmanTrack ( ) const
inline

Definition at line 231 of file Track.h.

◆ isMatchedTrack()

bool isMatchedTrack ( ) const
inline

Definition at line 227 of file Track.h.

◆ isStrategy()

bool isStrategy ( TRACKINFO::STRATEGY  strategy)
inline

Definition at line 233 of file Track.h.

◆ isTopTrack()

bool isTopTrack ( ) const
inline
Returns
True if the track is in the top SVT volume, false otherwise.

Definition at line 330 of file Track.h.

◆ Print()

void Print ( Option_t *  option = "") const

Definition at line 100 of file Track.cxx.

◆ setCharge()

void setCharge ( const int  charge)
inline

Set the track charge.

Parameters
chargeTrack charge.

Definition at line 240 of file Track.h.

◆ setChi2()

void setChi2 ( const double  chi2)
inline

Set the chi^2 of the fit to the track.

Parameters
chi2The chi^2 of the fit to the track.

Definition at line 120 of file Track.h.

◆ setCov()

void setCov ( const std::vector< float > &  cov)
inline

Set the covariance matrix

Definition at line 95 of file Track.h.

◆ setID()

void setID ( const int  id)
inline

Set the track id.

Definition at line 255 of file Track.h.

◆ setIsolation()

void setIsolation ( const int  layer,
const double  isolation 
)
inline

Set the isolation variable of the given layer.

Parameters
layerLayer number associated with the given isolation value.
isolationThe isolation variable.

Definition at line 140 of file Track.h.

◆ setLambdaKink()

void setLambdaKink ( const int  layer,
const double  lambda_kink 
)
inline

Set the lambda kink of the given layer.

Parameters
layerLayer number associated with the given lambda kink.
lambda_kinkThe lambda kink value.

Definition at line 301 of file Track.h.

◆ setMomentum() [1/3]

void setMomentum ( double  bfield = 0.52)

Set the momentum of the track from track parameters and b-field

Parameters
bfield

Definition at line 63 of file Track.cxx.

◆ setMomentum() [2/3]

void setMomentum ( double  px,
double  py,
double  pz 
)

Definition at line 80 of file Track.cxx.

◆ setMomentum() [3/3]

void setMomentum ( std::vector< double >  momentum)

Set the momentum of the track. The momentum is extracted from the corresponding ReconstructedParticle.

Parameters
momentumThe momentum of the track.

Definition at line 74 of file Track.cxx.

◆ setNdf()

void setNdf ( const float  ndf)
inline

Definition at line 112 of file Track.h.

◆ setNShared()

void setNShared ( const int  nShared)
inline

Set number of shared 3D hits

Definition at line 348 of file Track.h.

◆ setParticle()

void setParticle ( TObject *  particle)
inline

Set the Particle associated with this track. This can be used to retrieve additional track properties such as the momentum and charge.

Parameters
particle: Final state particle associated with this track

Definition at line 175 of file Track.h.

◆ setPhi()

void setPhi ( const double  phi0)
inline

Definition at line 89 of file Track.h.

◆ setPhiKink()

void setPhiKink ( const int  layer,
const double  phi_kink 
)
inline

Set the phi kink of the given layer.

Parameters
layerLayer number associated with the given phi kink.
phi_kinkThe phi kink value.

Definition at line 317 of file Track.h.

◆ setPosition()

void setPosition ( const double *  position)

Set the track state position. The extrapolation is assumed to use the full 3D field map.

@parm position The extrapolated track position at track state

Definition at line 55 of file Track.cxx.

◆ setPositionAtEcal()

void setPositionAtEcal ( const double *  position)

Set the extrapolated track position at the Ecal face. The extrapolation is assumed to use the full 3D field map.

@parm position The extrapolated track position at the Ecal

Definition at line 47 of file Track.cxx.

◆ setSharedLy0()

void setSharedLy0 ( const bool  isShared)
inline

Definition at line 352 of file Track.h.

◆ setSharedLy1()

void setSharedLy1 ( const bool  isShared)
inline

Definition at line 353 of file Track.h.

◆ setTrackerHitCount()

void setTrackerHitCount ( int  nHits)
inline

Set the number of tracker hits associated with this track.

Definition at line 340 of file Track.h.

◆ setTrackParameters()

void setTrackParameters ( const double  d0,
const double  phi0,
const double  omega,
const double  tan_lambda,
const double  z0 
)

Set the track parameters.

Parameters
d0Distance of closest approach to the reference point.
phi0The azimuthal angle of the momentum at the distance of closest approach.
omegaThe curvature of the track.
tan_lambdaThe slope of the track in the SY plane.
z0The y position of the track at the distance of closest approach.

Definition at line 31 of file Track.cxx.

◆ setTrackTime()

void setTrackTime ( const double  track_time)
inline
Parameters
track_timeThe track time.

Definition at line 153 of file Track.h.

◆ setTrackVolume()

void setTrackVolume ( const int  track_volume)
inline

The the volume (Top/Bottom) that the track is located in.

Parameters
track_volumeThe track volume.

Definition at line 167 of file Track.h.

◆ setTruthLink()

void setTruthLink ( TObject *  obj)
inline

Set the reference to a truth object

Parameters
track: A truth object (truth track)

Definition at line 58 of file Track.h.

◆ setType()

void setType ( const int  type)
inline

Set the track type. For more details, see StrategyType and TrackType.

Parameters
typeThe track type.

Definition at line 208 of file Track.h.

Member Data Documentation

◆ charge_

int charge_ {0}
private

Track charge.

Definition at line 464 of file Track.h.

◆ chi2_

double chi2_ {-999.}
private

The chi^2 of the track fit.

Definition at line 420 of file Track.h.

◆ cov_

std::vector<float> cov_
private

Cov matrix

Definition at line 384 of file Track.h.

◆ d0_

double d0_ {-999.}
private

The distance of closest approach to the reference point.

Definition at line 393 of file Track.h.

◆ hit_layers_

std::vector<int> hit_layers_
private

hit layers

Definition at line 387 of file Track.h.

◆ id_

int id_ {0}
private

Track id.

Definition at line 461 of file Track.h.

◆ isolation_

double isolation_[14]
private

Array used to store the isolation variables for each of the sensor layers. Updated to 2019 geometry.

Definition at line 372 of file Track.h.

◆ lambda_kinks_

double lambda_kinks_[14]
private

Array used to store the lambda kinks for each of the sensor layers.

Definition at line 450 of file Track.h.

◆ mcp_hits_

std::vector<std::pair<int,int> > mcp_hits_
private

truth mcp hits

Definition at line 390 of file Track.h.

◆ mcp_link_

TRef mcp_link_
private

Reference to MC Particle.

Definition at line 479 of file Track.h.

◆ n_hits_

int n_hits_ {0}
private

The number of 3D hits associated with this track.

Definition at line 375 of file Track.h.

◆ ndf_

double ndf_ {0.}
private

The ndfs of the track fit.

Definition at line 423 of file Track.h.

◆ nShared_

int nShared_ {0}
private

N Shared hits.

Definition at line 467 of file Track.h.

◆ omega_

double omega_ {-999.}
private

The track curvature. The curvature is positive (negative) if the particle has a positive (negative) charge.

Definition at line 405 of file Track.h.

◆ particle_

TRef particle_
private

Reference to the reconstructed particle associated with this track.

Definition at line 369 of file Track.h.

◆ phi0_

double phi0_ {-999.}
private

The azimuthal angle of the momentum at the position of closest approach to the reference point.

Definition at line 399 of file Track.h.

◆ phi_kinks_

double phi_kinks_[14]
private

Array used to store the phi kinks for each of the sensor layers.

Definition at line 453 of file Track.h.

◆ px_

double px_ {-9999.}
private

Track momentum.

Definition at line 456 of file Track.h.

◆ py_

double py_ {-9999.}
private

Definition at line 457 of file Track.h.

◆ pz_

double pz_ {-9999.}
private

Definition at line 458 of file Track.h.

◆ SharedLy0_

bool SharedLy0_ {false}
private

Has Ly0 Shared hits.

Definition at line 470 of file Track.h.

◆ SharedLy1_

bool SharedLy1_ {false}
private

Has Ly1 Shared hits.

Definition at line 473 of file Track.h.

◆ tan_lambda_

double tan_lambda_ {-999.}
private

The slope of the track in the SY plane where S is the arc length of the helix in the xz plane.

Definition at line 411 of file Track.h.

◆ track_time_

double track_time_ {-999.}
private

The time of the track. This is currently the average time of all hits composing the track.

Definition at line 429 of file Track.h.

◆ track_volume_

int track_volume_ {-999}
private

The volume to which this track belongs to.

Definition at line 378 of file Track.h.

◆ tracker_hits_

TRefArray tracker_hits_ {TRefArray{}}
private

Reference to the 3D hits associated with this track.

Definition at line 366 of file Track.h.

◆ truth_link_

TRef truth_link_
private

Reference to a truth track

Definition at line 476 of file Track.h.

◆ type_

int type_ {-999}
private

The track type.

Definition at line 381 of file Track.h.

◆ x_

double x_ {-999.}
private

The x position track.

Definition at line 441 of file Track.h.

◆ x_at_ecal_

double x_at_ecal_ {-999.}
private

The x position of the extrapolated track at the Ecal face.

Definition at line 432 of file Track.h.

◆ y_

double y_ {-999.}
private

The y position track.

Definition at line 444 of file Track.h.

◆ y_at_ecal_

double y_at_ecal_ {-999.}
private

The y position of the extrapolated track at the Ecal face.

Definition at line 435 of file Track.h.

◆ z0_

double z0_ {-999.}
private

The y position of the track at the distance of closest approach in the xz plane.

Definition at line 417 of file Track.h.

◆ z_

double z_ {-999.}
private

The z position track.

Definition at line 447 of file Track.h.

◆ z_at_ecal_

double z_at_ecal_ {-999.}
private

The z position of the extrapolated track at the Ecal face.

Definition at line 438 of file Track.h.


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