19#include "TRestTrack.h"
25TRestTrack::TRestTrack() {
29TRestTrack::~TRestTrack() {
33void TRestTrack::Initialize() {
47void TRestTrack::RemoveVolumeHits() {
65 for (
int i = 0; i < nHits; i++) {
78 const double maxToFirst = (pos0 - maxPos).Mag();
79 const double maxToLast = (posE - maxPos).Mag();
81 if (maxToFirst < maxToLast) {
90void TRestTrack::PrintTrack(Bool_t fullInfo) {
91 Double_t x = GetMeanPosition().X();
92 Double_t y = GetMeanPosition().Y();
93 Double_t z = GetMeanPosition().Z();
97 if (isXY()) cout <<
" is XY " << endl;
98 if (isXZ()) cout <<
" is XZ " << endl;
99 if (isYZ()) cout <<
" is YZ " << endl;
100 if (isXYZ()) cout <<
" is XYZ " << endl;
103 cout <<
"Mean position : ( " << x <<
" , " << y <<
" , " << z <<
" ) " << endl;
104 cout <<
"Number of track hits : " <<
fVolumeHits.GetNumberOfHits() << endl;
105 cout <<
"----------------------------------------" << endl;
109 cout <<
"----------------------------------------" << endl;
Double_t GetTotalDistance() const
It determines the distance required to travel from the first to the last hit adding all the distances...
Double_t fTrackEnergy
Total energy of the track.
void GetBoundaries(TVector3 &orig, TVector3 &end)
This function retreive the origin and the end of a single track based on the most energetic hit....
Double_t fTrackLength
Total length of the track.
Int_t fParentID
Parent ID.
TRestVolumeHits fVolumeHits
Hit volumes that define a track.