16#ifndef RestCore_TRestGeant4Track
17#define RestCore_TRestGeant4Track
23#include "TRestGeant4Hits.h"
36 TString fParticleName;
40 TString fCreatorProcess;
42 std::vector<Int_t> fSecondaryTrackIDs;
44 Double_t fGlobalTimestamp;
47 Double_t fInitialKineticEnergy;
50 TVector3 fInitialPosition;
68 inline TString GetCreatorProcess()
const {
return fCreatorProcess; }
70 inline void AddSecondaryTrackID(Int_t trackID) { fSecondaryTrackIDs.push_back(trackID); }
75 inline Int_t GetTrackID()
const {
return fTrackID; }
76 inline Int_t GetParentID()
const {
return fParentID; }
77 inline TString GetParticleName()
const {
return fParticleName; }
78 inline Double_t GetGlobalTime()
const {
return fGlobalTimestamp; }
79 inline Double_t GetTimeLength()
const {
return fTimeLength; }
80 inline Double_t GetInitialKineticEnergy()
const {
return fInitialKineticEnergy; }
81 inline TVector3 GetInitialPosition()
const {
return fInitialPosition; }
82 inline Double_t GetWeight()
const {
return fWeight; }
83 inline Double_t GetTotalEnergy()
const {
return fHits.GetTotalEnergy(); }
84 inline Double_t GetLength()
const {
return fLength; }
86 TString GetInitialVolume()
const;
87 TString GetFinalVolume()
const;
89 inline std::vector<Int_t> GetSecondaryTrackIDs()
const {
return fSecondaryTrackIDs; }
90 std::vector<const TRestGeant4Track*> GetSecondaryTracks()
const;
91 inline std::vector<const TRestGeant4Track*> GetChildrenTracks()
const {
return GetSecondaryTracks(); }
95 inline TVector3 GetTrackOrigin()
const {
return GetInitialPosition(); }
97 EColor GetParticleColor()
const;
99 inline Double_t GetEnergyInVolume(Int_t volID)
const {
return fHits.GetEnergyInVolume(volID); }
100 inline TVector3 GetMeanPositionInVolume(Int_t volID)
const {
101 return fHits.GetMeanPositionInVolume(volID);
103 inline TVector3 GetFirstPositionInVolume(Int_t volID)
const {
104 return fHits.GetFirstPositionInVolume(volID);
106 inline TVector3 GetLastPositionInVolume(Int_t volID)
const {
107 return fHits.GetLastPositionInVolume(volID);
110 Int_t GetProcessID(
const TString& processName)
const;
111 TString GetProcessName(Int_t
id)
const;
113 Bool_t ContainsProcessInVolume(Int_t processID, Int_t volumeID = -1)
const;
114 inline Bool_t ContainsProcess(Int_t processID)
const {
return ContainsProcessInVolume(processID, -1); }
116 Bool_t ContainsProcessInVolume(
const TString& processName, Int_t volumeID = -1)
const;
117 inline Bool_t ContainsProcess(
const TString& processName)
const {
118 return ContainsProcessInVolume(processName, -1);
121 Double_t GetEnergyInVolume(
const TString& volumeName,
bool children =
false)
const;
123 TString GetLastProcessName()
const;
127 void PrintTrackFilterVolumes(
const std::set<std::string>& filterVolumes)
const;
129 inline void RemoveHits() { fHits.
RemoveHits(); }
144 void UpdateTrack(
const G4Track*);
145 void InsertStep(
const G4Step*);
An event class to store geant4 generated event information.
void PrintTrack(size_t maxHits=0) const
Prints the track information. N number of hits to print, 0 = all.
size_t GetNumberOfHits(Int_t volID=-1) const
Function that returns the number of hit depositions found inside the TRestGeant4Track....
size_t GetNumberOfPhysicalHits(Int_t volID=-1) const
Function that returns the number of hit depositions found inside the TRestGeant4Track with energy > 0...
virtual void RemoveHits()
It removes all hits inside the class.