REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Public Member Functions | Protected Attributes
TRestTrackEvent Class Reference

Detailed Description




         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>

Inheritance diagram for TRestTrackEvent:
TRestEvent

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
 
TRestTrackGetMaxEnergyTrack (TString option="")
 
TRestTrackGetMaxEnergyTrackInX ()
 
TRestTrackGetMaxEnergyTrackInY ()
 
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...
 
TRestTrackGetOriginTrack (Int_t tck)
 
TRestTrackGetOriginTrackById (Int_t tckId)
 
Int_t GetOriginTrackID (Int_t tck)
 
TPad * GetPad ()
 
TRestTrackGetSecondMaxEnergyTrack (TString option="")
 
Int_t GetTotalHits ()
 
TRestTrackGetTrack (Int_t n)
 
TRestTrackGetTrackById (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< TRestTrackfTrack
 
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
 
TRestRunfRun = 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)
 

Constructor & Destructor Documentation

◆ TRestTrackEvent()

TRestTrackEvent::TRestTrackEvent ( )

Definition at line 30 of file TRestTrackEvent.cxx.

◆ ~TRestTrackEvent()

TRestTrackEvent::~TRestTrackEvent ( )
virtual

Definition at line 48 of file TRestTrackEvent.cxx.

Member Function Documentation

◆ AddTrack()

void TRestTrackEvent::AddTrack ( TRestTrack c)

Definition at line 60 of file TRestTrackEvent.cxx.

◆ DrawEvent()

TPad * TRestTrackEvent::DrawEvent ( const TString &  option = "")
virtual

Draw the event.

To be implemented in the derived class

Reimplemented from TRestEvent.

Definition at line 558 of file TRestTrackEvent.cxx.

◆ DrawHits()

TPad * TRestTrackEvent::DrawHits ( )

Definition at line 494 of file TRestTrackEvent.cxx.

◆ DrawOriginEnd()

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.

◆ GetEnergy()

Double_t TRestTrackEvent::GetEnergy ( TString  option = "")

Definition at line 219 of file TRestTrackEvent.cxx.

◆ GetLevel()

Int_t TRestTrackEvent::GetLevel ( Int_t  tck)

Definition at line 254 of file TRestTrackEvent.cxx.

◆ GetLevels()

Int_t TRestTrackEvent::GetLevels ( ) const
inline

Definition at line 92 of file TRestTrackEvent.h.

◆ GetMaxEnergyTrack()

TRestTrack * TRestTrackEvent::GetMaxEnergyTrack ( TString  option = "")

Definition at line 148 of file TRestTrackEvent.cxx.

◆ GetMaxEnergyTrackInX()

TRestTrack * TRestTrackEvent::GetMaxEnergyTrackInX ( )

Definition at line 108 of file TRestTrackEvent.cxx.

◆ GetMaxEnergyTrackInY()

TRestTrack * TRestTrackEvent::GetMaxEnergyTrackInY ( )

Definition at line 128 of file TRestTrackEvent.cxx.

◆ GetMaxEnergyTrackLength()

Double_t TRestTrackEvent::GetMaxEnergyTrackLength ( TString  option = "")

Definition at line 214 of file TRestTrackEvent.cxx.

◆ GetMaxEnergyTrackVolume()

Double_t TRestTrackEvent::GetMaxEnergyTrackVolume ( TString  option = "")

Definition at line 209 of file TRestTrackEvent.cxx.

◆ GetMaxTrackBoundaries()

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.

◆ GetMaxTrackBoundaries3D()

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.

◆ GetMaxTrackRelativeZ()

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.

◆ GetNumberOfTracks()

Int_t TRestTrackEvent::GetNumberOfTracks ( TString  option = "")

Definition at line 80 of file TRestTrackEvent.cxx.

◆ GetOriginEnd()

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.

◆ GetOriginTrack()

TRestTrack * TRestTrackEvent::GetOriginTrack ( Int_t  tck)

Definition at line 282 of file TRestTrackEvent.cxx.

◆ GetOriginTrackById()

TRestTrack * TRestTrackEvent::GetOriginTrackById ( Int_t  tckId)

Definition at line 294 of file TRestTrackEvent.cxx.

◆ GetOriginTrackID()

Int_t TRestTrackEvent::GetOriginTrackID ( Int_t  tck)

Definition at line 270 of file TRestTrackEvent.cxx.

◆ GetPad()

TPad * TRestTrackEvent::GetPad ( )
inline

Definition at line 98 of file TRestTrackEvent.h.

◆ GetSecondMaxEnergyTrack()

TRestTrack * TRestTrackEvent::GetSecondMaxEnergyTrack ( TString  option = "")

Definition at line 171 of file TRestTrackEvent.cxx.

◆ GetTotalHits()

Int_t TRestTrackEvent::GetTotalHits ( )

Definition at line 248 of file TRestTrackEvent.cxx.

◆ GetTrack()

TRestTrack * TRestTrackEvent::GetTrack ( Int_t  n)
inline

Definition at line 64 of file TRestTrackEvent.h.

◆ GetTrackById()

TRestTrack * TRestTrackEvent::GetTrackById ( Int_t  id)

Definition at line 102 of file TRestTrackEvent.cxx.

◆ Initialize()

void TRestTrackEvent::Initialize ( )
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.

◆ isTopLevel()

Bool_t TRestTrackEvent::isTopLevel ( Int_t  tck)

Definition at line 265 of file TRestTrackEvent.cxx.

◆ isXYZ()

Bool_t TRestTrackEvent::isXYZ ( )

Definition at line 242 of file TRestTrackEvent.cxx.

◆ PrintEvent()

void TRestTrackEvent::PrintEvent ( Bool_t  fullInfo = false)

Definition at line 482 of file TRestTrackEvent.cxx.

◆ PrintOnlyTracks()

void TRestTrackEvent::PrintOnlyTracks ( )

Definition at line 471 of file TRestTrackEvent.cxx.

◆ RemoveTrack()

void TRestTrackEvent::RemoveTrack ( int  n)

Definition at line 70 of file TRestTrackEvent.cxx.

◆ RemoveTracks()

void TRestTrackEvent::RemoveTracks ( )
inline

Definition at line 104 of file TRestTrackEvent.h.

◆ SetLevels()

void TRestTrackEvent::SetLevels ( )

Definition at line 306 of file TRestTrackEvent.cxx.

◆ SetNumberOfXTracks()

void TRestTrackEvent::SetNumberOfXTracks ( Int_t  x)
inline

Definition at line 119 of file TRestTrackEvent.h.

◆ SetNumberOfYTracks()

void TRestTrackEvent::SetNumberOfYTracks ( Int_t  y)
inline

Definition at line 120 of file TRestTrackEvent.h.

Field Documentation

◆ fHitsPad

TPad* TRestTrackEvent::fHitsPad = nullptr
protected

Definition at line 58 of file TRestTrackEvent.h.

◆ fLevels

Int_t TRestTrackEvent::fLevels
protected

Definition at line 40 of file TRestTrackEvent.h.

◆ fNtracks

Int_t TRestTrackEvent::fNtracks
protected

Definition at line 37 of file TRestTrackEvent.h.

◆ fNtracksX

Int_t TRestTrackEvent::fNtracksX
protected

Definition at line 38 of file TRestTrackEvent.h.

◆ fNtracksY

Int_t TRestTrackEvent::fNtracksY
protected

Definition at line 39 of file TRestTrackEvent.h.

◆ fPrintHitsWarning

Bool_t TRestTrackEvent::fPrintHitsWarning
protected

Definition at line 60 of file TRestTrackEvent.h.

◆ fTrack

std::vector<TRestTrack> TRestTrackEvent::fTrack
protected

Definition at line 41 of file TRestTrackEvent.h.

◆ fXYHit

TGraph* TRestTrackEvent::fXYHit
protected

Definition at line 46 of file TRestTrackEvent.h.

◆ fXYTrack

TGraph* TRestTrackEvent::fXYTrack
protected

Definition at line 50 of file TRestTrackEvent.h.

◆ fXYZHit

TGraph2D* TRestTrackEvent::fXYZHit
protected

Definition at line 49 of file TRestTrackEvent.h.

◆ fXYZTrack

TGraph2D* TRestTrackEvent::fXYZTrack
protected

Definition at line 53 of file TRestTrackEvent.h.

◆ fXZHit

TGraph* TRestTrackEvent::fXZHit
protected

Definition at line 47 of file TRestTrackEvent.h.

◆ fXZHits

TH2F* TRestTrackEvent::fXZHits = nullptr
protected

Definition at line 55 of file TRestTrackEvent.h.

◆ fXZTrack

TGraph* TRestTrackEvent::fXZTrack
protected

Definition at line 51 of file TRestTrackEvent.h.

◆ fYZHit

TGraph* TRestTrackEvent::fYZHit
protected

Definition at line 48 of file TRestTrackEvent.h.

◆ fYZHits

TH2F* TRestTrackEvent::fYZHits = nullptr
protected

Definition at line 56 of file TRestTrackEvent.h.

◆ fYZTrack

TGraph* TRestTrackEvent::fYZTrack
protected

Definition at line 52 of file TRestTrackEvent.h.


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