13 _eDep(0.), _time(-1.), _pathLength(0.), _entrancePoint(0., 0., 0.), _exitPoint(0., 0., 0.), _entranceMomentum(0.,
14 0., 0.), _entranceEnergy(0.), _trackID(-1), _parentID(-2), _particlePdg(0), _isReset(true), _posHits(NULL) {
29 _pathLength = right._pathLength;
30 _entrancePoint = right._entrancePoint;
31 _exitPoint = right._exitPoint;
32 _entranceMomentum = right._entranceMomentum;
33 _entranceEnergy = right._entranceEnergy;
34 _trackID = right._trackID;
35 _parentID = right._parentID;
36 _particlePdg = right._particlePdg;
37 _isReset = right._isReset;
39 if (right._posHits == NULL) {
53 _pathLength = right._pathLength;
54 _entrancePoint = right._entrancePoint;
55 _exitPoint = right._exitPoint;
56 _entranceMomentum = right._entranceMomentum;
57 _entranceEnergy = right._entranceEnergy;
58 _trackID = right._trackID;
59 _parentID = right._parentID;
60 _particlePdg = right._particlePdg;
61 _isReset = right._isReset;
62 if (right._posHits == NULL) {
67 *_posHits = *(right._posHits);
75 if ((_eDep == right._eDep) &&
76 (_time == right._time) &&
77 (_pathLength == right._pathLength) &&
78 (_entrancePoint == right._entrancePoint) &&
79 (_exitPoint == right._exitPoint) &&
80 (_entranceMomentum == right._entranceMomentum) &&
81 (_entranceEnergy == right._entranceEnergy) &&
82 (_trackID == right._trackID) &&
83 (_parentID == right._parentID) &&
84 (_particlePdg == right._particlePdg)) {
86 if (_posHits != NULL) {
87 if (right._posHits != NULL) {
88 return (*_posHits == *(right._posHits));
96 if (right._posHits != NULL) {
111 _eDep += step.GetTotalEnergyDeposit();
112 _pathLength += step.GetStepLength();
113 _exitPoint = step.GetPostStepPoint()->GetPosition();
118 _time = step.GetPreStepPoint()->GetGlobalTime();
119 _entrancePoint = step.GetPreStepPoint()->GetPosition();
120 _entranceMomentum = step.GetPreStepPoint()->GetMomentum();
121 _entranceEnergy = step.GetPreStepPoint()->GetKineticEnergy();
122 _trackID = step.GetTrack()->GetTrackID();
123 _parentID = step.GetTrack()->GetParentID();
124 _particlePdg = step.GetTrack()->GetDefinition()->GetPDGEncoding();
G4THitsCollection< GGSPosHit > GGSPosHitsCollection
Alias for G4 template hits collection for GGSPosHit.
virtual void AddStep(const G4Step &step)
Adds a step to the particle hit.
bool operator==(const GGSPartHit &right) const
Comparison operator.
Definition of GGS Particle Hit.
void SetPosHitsStorage(bool flag)
Turn on or off the storage of position hits.
const GGSPartHit & operator=(const GGSPartHit &right)
Assignment operator.
G4Allocator< GGSPartHit > GGSPartHitAllocator
Alias for G4 template memory allocator for GGSPartHit.