19#ifndef RestDAQ_TRestTrackEvent
20#define RestDAQ_TRestTrackEvent
27#include <TMultiGraph.h>
29#include <TRestEvent.h>
30#include <TRestTrack.h>
31#include <TVirtualPad.h>
41 std::vector<TRestTrack> fTrack;
55 TH2F* fXZHits =
nullptr;
56 TH2F* fYZHits =
nullptr;
58 TPad* fHitsPad =
nullptr;
60 Bool_t fPrintHitsWarning;
65 if (n >= 0 && fTrack.size() < (
unsigned int)n + 1) {
66 std::cout <<
"-- Error : TRestTrackEvent::GetTrack. ERROR!" << std::endl;
67 std::cout <<
"-- Error : GetTrack requested track with index n = " << n << std::endl;
68 std::cout <<
"-- Error : However, only " << fTrack.size() <<
" where found inside TRestTrackEvent"
70 std::cout <<
"-- Error : This might be probably a crash ... !!" << std::endl;
83 TRestTrack* GetMaxEnergyTrack(TString option =
"");
84 TRestTrack* GetSecondMaxEnergyTrack(TString option =
"");
86 Double_t GetMaxEnergyTrackVolume(TString option =
"");
87 Double_t GetMaxEnergyTrackLength(TString option =
"");
88 Double_t GetEnergy(TString option =
"");
90 Int_t GetLevel(Int_t tck);
92 inline Int_t GetLevels()
const {
return fLevels; }
94 TPad*
DrawEvent(
const TString& option =
"");
98 TPad* GetPad() {
return fPad; }
102 void RemoveTrack(
int n);
104 void RemoveTracks() { fTrack.clear(); }
107 Bool_t isTopLevel(Int_t tck);
109 Int_t GetOriginTrackID(Int_t tck);
113 void GetOriginEnd(std::vector<TGraph*>& originGr, std::vector<TGraph*>& endGr,
114 std::vector<TLegend*>& leg);
116 void DrawOriginEnd(TPad* pad, std::vector<TGraph*>& originGr, std::vector<TGraph*>& endGr,
117 std::vector<TLegend*>& leg);
119 void SetNumberOfXTracks(Int_t x) { fNtracksX = x; }
120 void SetNumberOfYTracks(Int_t y) { fNtracksY = y; }
123 Int_t GetNumberOfTracks(TString option =
"");
125 Int_t GetTotalHits();
129 void PrintOnlyTracks();
A base class for any REST event.
virtual void PrintEvent() const
void GetOriginEnd(std::vector< TGraph * > &originGr, std::vector< TGraph * > &endGr, std::vector< TLegend * > &leg)
Retreive origin and end of the track and store in a TGraph and legend.
TRestVolumeHits GetMaxTrackBoundaries3D(TVector3 &orig, TVector3 &end)
This function retrieves the origin and the end track positions based after the reconstruction of a 3D...
TPad * DrawEvent(const TString &option="")
Draw the event.
void DrawOriginEnd(TPad *pad, std::vector< TGraph * > &originGr, std::vector< TGraph * > &endGr, std::vector< TLegend * > &leg)
Draw origin and end of the track in a pad passed to the function Note that GetOriginEnd has to be iss...
Double_t GetMaxTrackRelativeZ()
Function to calculate the relative Z of the most energetic track to crosscheck if the track is upward...
void GetMaxTrackBoundaries(TVector3 &orig, TVector3 &end)
This function retreive the origin and the end of the track based on the most energetic hit....