18#ifndef RestCore_TRestGeant4Hits
19#define RestCore_TRestGeant4Hits
25#include "TRestGeant4Metadata.h"
33 std::vector<Int_t> fProcessID = {};
34 std::vector<Int_t> fVolumeID = {};
35 std::vector<Float_t> fKineticEnergy = {};
36 std::vector<TVector3> fMomentumDirection = {};
38 std::vector<std::string> fHadronicTargetIsotopeName = {};
39 std::vector<int> fHadronicTargetIsotopeA = {};
40 std::vector<int> fHadronicTargetIsotopeZ = {};
54 inline TVector3 GetMomentumDirection(
size_t n)
const {
return fMomentumDirection[n]; }
56 inline Int_t GetProcessId(
size_t n)
const {
return fProcessID[n]; }
57 inline Int_t GetProcess(
size_t n)
const {
return GetProcessId(n); }
58 inline Int_t GetHitProcess(
size_t n)
const {
return GetProcessId(n); }
59 TString GetProcessName(
size_t n)
const;
61 inline Int_t GetVolumeId(
size_t n)
const {
return fVolumeID[n]; }
62 inline Int_t GetHitVolume(
size_t n)
const {
return GetVolumeId(n); }
63 TString GetVolumeName(
size_t n)
const;
65 inline bool GetHadronicOk()
const {
return fHadronicTargetIsotopeName.size() > 0; }
66 inline std::string GetHadronicTargetIsotopeName(
size_t n)
const {
return fHadronicTargetIsotopeName[n]; }
67 inline int GetHadronicTargetIsotopeA(
size_t n)
const {
return fHadronicTargetIsotopeA[n]; }
68 inline int GetHadronicTargetIsotopeZ(
size_t n)
const {
return fHadronicTargetIsotopeZ[n]; }
72 inline Double_t GetKineticEnergy(
size_t n)
const {
return fKineticEnergy[n]; }
74 Double_t GetEnergyInVolume(Int_t volumeID)
const;
76 TVector3 GetMeanPositionInVolume(Int_t volumeID)
const;
77 TVector3 GetFirstPositionInVolume(Int_t volumeID)
const;
78 TVector3 GetLastPositionInVolume(Int_t volumeID)
const;
80 size_t GetNumberOfHitsInVolume(Int_t volumeID)
const;
83 std::vector<Float_t>& GetEnergyRef() {
return fEnergy; }
94 void InsertStep(
const G4Step*);
An event class to store geant4 generated event information.
It saves a 3-coordinate position and an energy for each punctual deposition.
std::vector< Float_t > fEnergy
Energy deposited at each 3-coordinate position (units keV)