REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
|
RESTSoft : Software for Rare Event Searches with TPCs TRestTrackEvent.h Event class to store DAQ events either from simulation and acquisition oct 2015: First concept Created as part of the conceptualization of existing REST software. Javier Gracia
Definition at line 35 of file TRestTrackEvent.h.
#include <TRestTrackEvent.h>
Public Member Functions | |
void | AddTrack (TRestTrack *c) |
TPad * | DrawEvent (const TString &option="") |
Draw the event. More... | |
TPad * | DrawHits () |
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 issued in advance. More... | |
Double_t | GetEnergy (TString option="") |
Int_t | GetLevel (Int_t tck) |
Int_t | GetLevels () const |
TRestTrack * | GetMaxEnergyTrack (TString option="") |
TRestTrack * | GetMaxEnergyTrackInX () |
TRestTrack * | GetMaxEnergyTrackInY () |
Double_t | GetMaxEnergyTrackLength (TString option="") |
Double_t | GetMaxEnergyTrackVolume (TString option="") |
void | GetMaxTrackBoundaries (TVector3 &orig, TVector3 &end) |
This function retreive the origin and the end of the track based on the most energetic hit. The origin is defined as the further hit deposition edge to the most energetic hit, while the track end is defined as the closest edge to the most energetic hit. More... | |
TRestVolumeHits | GetMaxTrackBoundaries3D (TVector3 &orig, TVector3 &end) |
This function retrieves the origin and the end track positions based after the reconstruction of a 3D track. It requires the track to have the same number of hits in X and Y. Two different directions are scanned and the one which maximizes the track length is retrieved. Afterwards the position of the closer hit to the half integral of the track is obtained. Then, the origin of the track is defined as the further edge to the half integral, while the track end is defined as the closest edge. More... | |
Double_t | GetMaxTrackRelativeZ () |
Function to calculate the relative Z of the most energetic track to crosscheck if the track is upwards or downwards. More... | |
Int_t | GetNumberOfTracks (TString option="") |
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. More... | |
TRestTrack * | GetOriginTrack (Int_t tck) |
TRestTrack * | GetOriginTrackById (Int_t tckId) |
Int_t | GetOriginTrackID (Int_t tck) |
TPad * | GetPad () |
TRestTrack * | GetSecondMaxEnergyTrack (TString option="") |
Int_t | GetTotalHits () |
TRestTrack * | GetTrack (Int_t n) |
TRestTrack * | GetTrackById (Int_t id) |
void | Initialize () |
Bool_t | isTopLevel (Int_t tck) |
Bool_t | isXYZ () |
void | PrintEvent (Bool_t fullInfo=false) |
void | PrintOnlyTracks () |
void | RemoveTrack (int n) |
void | RemoveTracks () |
void | SetLevels () |
void | SetNumberOfXTracks (Int_t x) |
void | SetNumberOfYTracks (Int_t y) |
Public Member Functions inherited from TRestEvent | |
virtual void | CloneTo (TRestEvent *target) |
Clone the content of this TRestEvent object to another. More... | |
virtual TPad * | DrawEvent (const TString &option="") |
Draw the event. More... | |
Int_t | GetID () const |
Int_t | GetRunOrigin () const |
TString | GetSubEventTag () const |
Int_t | GetSubID () const |
Int_t | GetSubRunOrigin () const |
Double_t | GetTime () const |
TTimeStamp | GetTimeStamp () const |
virtual void | Initialize ()=0 |
virtual void | InitializeReferences (TRestRun *run) |
Initialize dynamical references when loading the event from a root file. More... | |
virtual void | InitializeWithMetadata (TRestRun *run) |
Bool_t | isOk () const |
virtual void | PrintEvent () const |
void | SetEventInfo (TRestEvent *eve) |
void | SetID (Int_t id) |
void | SetOK (Bool_t state) |
void | SetRunOrigin (Int_t run_origin) |
void | SetState (Bool_t state) |
void | SetSubEventTag (const TString &tag) |
void | SetSubID (Int_t id) |
void | SetSubRunOrigin (Int_t sub_run_origin) |
void | SetTime (Double_t seconds, Double_t nanoseconds) |
void | SetTime (Double_t time) |
void | SetTimeStamp (const TTimeStamp &time) |
TRestEvent () | |
virtual | ~TRestEvent () |
Protected Attributes | |
TPad * | fHitsPad = nullptr |
Int_t | fLevels |
Int_t | fNtracks |
Int_t | fNtracksX |
Int_t | fNtracksY |
Bool_t | fPrintHitsWarning |
std::vector< TRestTrack > | fTrack |
TGraph * | fXYHit |
TGraph * | fXYTrack |
TGraph2D * | fXYZHit |
TGraph2D * | fXYZTrack |
TGraph * | fXZHit |
TH2F * | fXZHits = nullptr |
TGraph * | fXZTrack |
TGraph * | fYZHit |
TH2F * | fYZHits = nullptr |
TGraph * | fYZTrack |
Protected Attributes inherited from TRestEvent | |
Int_t | fEventID |
Event identification number. More... | |
TTimeStamp | fEventTime |
Absolute event time. More... | |
Bool_t | fOk |
Flag to be used by processes to define an event status. fOk=true is the default. More... | |
TPad * | fPad |
TRestRun * | fRun = nullptr |
Int_t | fRunOrigin |
Run ID number of the event. More... | |
Int_t | fSubEventID |
Sub-Event identification number. More... | |
TString | fSubEventTag |
A short length label to identify the sub-Event. More... | |
Int_t | fSubRunOrigin |
Sub-run ID number of the event. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from TRestEvent | |
void | RestartPad (Int_t nElements) |
TRestTrackEvent::TRestTrackEvent | ( | ) |
Definition at line 30 of file TRestTrackEvent.cxx.
|
virtual |
Definition at line 48 of file TRestTrackEvent.cxx.
void TRestTrackEvent::AddTrack | ( | TRestTrack * | c | ) |
Definition at line 60 of file TRestTrackEvent.cxx.
|
virtual |
Draw the event.
To be implemented in the derived class
Reimplemented from TRestEvent.
Definition at line 558 of file TRestTrackEvent.cxx.
TPad * TRestTrackEvent::DrawHits | ( | ) |
Definition at line 494 of file TRestTrackEvent.cxx.
void TRestTrackEvent::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 issued in advance.
Definition at line 963 of file TRestTrackEvent.cxx.
Double_t TRestTrackEvent::GetEnergy | ( | TString | option = "" | ) |
Definition at line 219 of file TRestTrackEvent.cxx.
Int_t TRestTrackEvent::GetLevel | ( | Int_t | tck | ) |
Definition at line 254 of file TRestTrackEvent.cxx.
|
inline |
Definition at line 92 of file TRestTrackEvent.h.
TRestTrack * TRestTrackEvent::GetMaxEnergyTrack | ( | TString | option = "" | ) |
Definition at line 148 of file TRestTrackEvent.cxx.
TRestTrack * TRestTrackEvent::GetMaxEnergyTrackInX | ( | ) |
Definition at line 108 of file TRestTrackEvent.cxx.
TRestTrack * TRestTrackEvent::GetMaxEnergyTrackInY | ( | ) |
Definition at line 128 of file TRestTrackEvent.cxx.
Double_t TRestTrackEvent::GetMaxEnergyTrackLength | ( | TString | option = "" | ) |
Definition at line 214 of file TRestTrackEvent.cxx.
Double_t TRestTrackEvent::GetMaxEnergyTrackVolume | ( | TString | option = "" | ) |
Definition at line 209 of file TRestTrackEvent.cxx.
void TRestTrackEvent::GetMaxTrackBoundaries | ( | TVector3 & | orig, |
TVector3 & | end | ||
) |
This function retreive the origin and the end of the track based on the most energetic hit. The origin is defined as the further hit deposition edge to the most energetic hit, while the track end is defined as the closest edge to the most energetic hit.
Definition at line 400 of file TRestTrackEvent.cxx.
TRestVolumeHits TRestTrackEvent::GetMaxTrackBoundaries3D | ( | TVector3 & | orig, |
TVector3 & | end | ||
) |
This function retrieves the origin and the end track positions based after the reconstruction of a 3D track. It requires the track to have the same number of hits in X and Y. Two different directions are scanned and the one which maximizes the track length is retrieved. Afterwards the position of the closer hit to the half integral of the track is obtained. Then, the origin of the track is defined as the further edge to the half integral, while the track end is defined as the closest edge.
Definition at line 325 of file TRestTrackEvent.cxx.
Double_t TRestTrackEvent::GetMaxTrackRelativeZ | ( | ) |
Function to calculate the relative Z of the most energetic track to crosscheck if the track is upwards or downwards.
Definition at line 427 of file TRestTrackEvent.cxx.
Int_t TRestTrackEvent::GetNumberOfTracks | ( | TString | option = "" | ) |
Definition at line 80 of file TRestTrackEvent.cxx.
void TRestTrackEvent::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.
Definition at line 928 of file TRestTrackEvent.cxx.
TRestTrack * TRestTrackEvent::GetOriginTrack | ( | Int_t | tck | ) |
Definition at line 282 of file TRestTrackEvent.cxx.
TRestTrack * TRestTrackEvent::GetOriginTrackById | ( | Int_t | tckId | ) |
Definition at line 294 of file TRestTrackEvent.cxx.
Int_t TRestTrackEvent::GetOriginTrackID | ( | Int_t | tck | ) |
Definition at line 270 of file TRestTrackEvent.cxx.
|
inline |
Definition at line 98 of file TRestTrackEvent.h.
TRestTrack * TRestTrackEvent::GetSecondMaxEnergyTrack | ( | TString | option = "" | ) |
Definition at line 171 of file TRestTrackEvent.cxx.
Int_t TRestTrackEvent::GetTotalHits | ( | ) |
Definition at line 248 of file TRestTrackEvent.cxx.
|
inline |
Definition at line 64 of file TRestTrackEvent.h.
TRestTrack * TRestTrackEvent::GetTrackById | ( | Int_t | id | ) |
Definition at line 102 of file TRestTrackEvent.cxx.
|
virtual |
Run to initialize event data. To be re-implemented in derived class, you may want to call the base class at the end of the re-implemented, by calling TRestEvent::Initialize();
Implements TRestEvent.
Definition at line 52 of file TRestTrackEvent.cxx.
Bool_t TRestTrackEvent::isTopLevel | ( | Int_t | tck | ) |
Definition at line 265 of file TRestTrackEvent.cxx.
Bool_t TRestTrackEvent::isXYZ | ( | ) |
Definition at line 242 of file TRestTrackEvent.cxx.
void TRestTrackEvent::PrintEvent | ( | Bool_t | fullInfo = false | ) |
Definition at line 482 of file TRestTrackEvent.cxx.
void TRestTrackEvent::PrintOnlyTracks | ( | ) |
Definition at line 471 of file TRestTrackEvent.cxx.
void TRestTrackEvent::RemoveTrack | ( | int | n | ) |
Definition at line 70 of file TRestTrackEvent.cxx.
|
inline |
Definition at line 104 of file TRestTrackEvent.h.
void TRestTrackEvent::SetLevels | ( | ) |
Definition at line 306 of file TRestTrackEvent.cxx.
|
inline |
Definition at line 119 of file TRestTrackEvent.h.
|
inline |
Definition at line 120 of file TRestTrackEvent.h.
|
protected |
Definition at line 58 of file TRestTrackEvent.h.
|
protected |
Definition at line 40 of file TRestTrackEvent.h.
|
protected |
Definition at line 37 of file TRestTrackEvent.h.
|
protected |
Definition at line 38 of file TRestTrackEvent.h.
|
protected |
Definition at line 39 of file TRestTrackEvent.h.
|
protected |
Definition at line 60 of file TRestTrackEvent.h.
|
protected |
Definition at line 41 of file TRestTrackEvent.h.
|
protected |
Definition at line 46 of file TRestTrackEvent.h.
|
protected |
Definition at line 50 of file TRestTrackEvent.h.
|
protected |
Definition at line 49 of file TRestTrackEvent.h.
|
protected |
Definition at line 53 of file TRestTrackEvent.h.
|
protected |
Definition at line 47 of file TRestTrackEvent.h.
|
protected |
Definition at line 55 of file TRestTrackEvent.h.
|
protected |
Definition at line 51 of file TRestTrackEvent.h.
|
protected |
Definition at line 48 of file TRestTrackEvent.h.
|
protected |
Definition at line 56 of file TRestTrackEvent.h.
|
protected |
Definition at line 52 of file TRestTrackEvent.h.