LDMX Software
SimCore
include
SimCore
UserTrackInformation.h
1
#ifndef SIMCORE_USERTRACKINFORMATION_H
2
#define SIMCORE_USERTRACKINFORMATION_H
3
4
#include "G4ThreeVector.hh"
5
#include "G4Track.hh"
6
#include "G4VUserTrackInformation.hh"
7
8
namespace
simcore {
9
16
class
UserTrackInformation
:
public
G4VUserTrackInformation {
17
public
:
19
UserTrackInformation
() =
default
;
20
21
virtual
~UserTrackInformation
() =
default
;
33
static
UserTrackInformation
*
get
(
const
G4Track* track);
34
48
void
initialize
(
const
G4Track* track);
49
51
void
Print
()
const override
;
52
59
bool
getSaveFlag
()
const
{
return
saveFlag_
; }
60
67
void
setSaveFlag
(
bool
saveFlag) {
saveFlag_
= saveFlag; }
68
74
bool
isBremCandidate
()
const
{
return
isBremCandidate_
; }
75
82
void
tagBremCandidate
(
bool
isBremCandidate
=
true
) {
83
isBremCandidate_
=
isBremCandidate
;
84
}
85
91
bool
isRecoilElectron
()
const
{
return
isRecoilElectron_
; }
92
99
void
tagRecoilElectron
(
bool
isRecoilElectron
=
true
) {
100
isRecoilElectron_
=
isRecoilElectron
;
101
}
102
110
bool
isPNGamma
()
const
{
return
isPNGamma_
; }
111
119
void
tagPNGamma
(
bool
isPNGamma
=
true
) {
isPNGamma_
=
isPNGamma
; }
120
126
const
G4ThreeVector&
getInitialMomentum
()
const
{
return
initialMomentum_
; }
127
131
std::string
getVertexVolume
()
const
{
return
vertexVolume_
; }
132
136
double
getVertexTime
()
const
{
return
vertex_time_
; }
137
138
private
:
146
bool
saveFlag_
{
false
};
147
149
bool
isBremCandidate_
{
false
};
150
152
bool
isRecoilElectron_
{
false
};
153
158
bool
isPNGamma_
{
false
};
159
161
std::string
vertexVolume_
{
""
};
162
164
double
vertex_time_
{0.};
165
167
G4ThreeVector
initialMomentum_
;
168
};
169
}
// namespace simcore
170
171
#endif
simcore::UserTrackInformation
Provides user defined information to associate with a Geant4 track.
Definition
UserTrackInformation.h:16
simcore::UserTrackInformation::vertexVolume_
std::string vertexVolume_
Volume the track was created in.
Definition
UserTrackInformation.h:161
simcore::UserTrackInformation::get
static UserTrackInformation * get(const G4Track *track)
get
Definition
UserTrackInformation.cxx:10
simcore::UserTrackInformation::isRecoilElectron
bool isRecoilElectron() const
Check whether this track is a recoil electron.
Definition
UserTrackInformation.h:91
simcore::UserTrackInformation::getVertexVolume
std::string getVertexVolume() const
Get the name of the volume that this track was created in.
Definition
UserTrackInformation.h:131
simcore::UserTrackInformation::Print
void Print() const override
Print the information associated with the track.
Definition
UserTrackInformation.cxx:22
simcore::UserTrackInformation::getInitialMomentum
const G4ThreeVector & getInitialMomentum() const
Get the initial momentum 3-vector of the track [MeV].
Definition
UserTrackInformation.h:126
simcore::UserTrackInformation::tagBremCandidate
void tagBremCandidate(bool isBremCandidate=true)
Tag this track as a brem candidate by the biasing filters.
Definition
UserTrackInformation.h:82
simcore::UserTrackInformation::saveFlag_
bool saveFlag_
Flag for saving the track as a Trajectory.
Definition
UserTrackInformation.h:146
simcore::UserTrackInformation::initialize
void initialize(const G4Track *track)
Initialize the track information with the passed track.
Definition
UserTrackInformation.cxx:17
simcore::UserTrackInformation::setSaveFlag
void setSaveFlag(bool saveFlag)
Set the save flag so the associated track will be persisted as a Trajectory.
Definition
UserTrackInformation.h:67
simcore::UserTrackInformation::isRecoilElectron_
bool isRecoilElectron_
Flag indicating whether this track is a recoil electron.
Definition
UserTrackInformation.h:152
simcore::UserTrackInformation::isPNGamma
bool isPNGamma() const
Check whether this track is a photon that has undergone a photo-nuclear reaction.
Definition
UserTrackInformation.h:110
simcore::UserTrackInformation::isBremCandidate
bool isBremCandidate() const
Check whether this track is a brem candidate.
Definition
UserTrackInformation.h:74
simcore::UserTrackInformation::UserTrackInformation
UserTrackInformation()=default
Constructor.
simcore::UserTrackInformation::initialMomentum_
G4ThreeVector initialMomentum_
The initial momentum of the track.
Definition
UserTrackInformation.h:167
simcore::UserTrackInformation::getSaveFlag
bool getSaveFlag() const
Get the flag which indicates whether this track should be saved as a Trajectory.
Definition
UserTrackInformation.h:59
simcore::UserTrackInformation::vertex_time_
double vertex_time_
Global Time of Creation.
Definition
UserTrackInformation.h:164
simcore::UserTrackInformation::isBremCandidate_
bool isBremCandidate_
Flag indicating whether this track is a brem candidate.
Definition
UserTrackInformation.h:149
simcore::UserTrackInformation::tagRecoilElectron
void tagRecoilElectron(bool isRecoilElectron=true)
Tag this track as a recoil electron by the biasing filters.
Definition
UserTrackInformation.h:99
simcore::UserTrackInformation::tagPNGamma
void tagPNGamma(bool isPNGamma=true)
Tag this track as a photon that has undergone a photo-nuclear reaction.
Definition
UserTrackInformation.h:119
simcore::UserTrackInformation::isPNGamma_
bool isPNGamma_
Flag indicating whether this track has undergone a photo-nuclear reaction.
Definition
UserTrackInformation.h:158
simcore::UserTrackInformation::getVertexTime
double getVertexTime() const
Get the global time at which this track was created.
Definition
UserTrackInformation.h:136
Generated by
1.9.8