13 : _eDep(0.), _time(-1.), _pathLength(0.), _entrancePoint(0., 0., 0.), _exitPoint(0., 0., 0.),
14 _entranceMomentum(0., 0., 0.), _entranceEnergy(0.), _trackID(-1), _parentID(-2), _particlePdg(0), _isReset(true),
26 _pathLength = right._pathLength;
27 _entrancePoint = right._entrancePoint;
28 _exitPoint = right._exitPoint;
29 _entranceMomentum = right._entranceMomentum;
30 _entranceEnergy = right._entranceEnergy;
31 _trackID = right._trackID;
32 _parentID = right._parentID;
33 _particlePdg = right._particlePdg;
34 _isReset = right._isReset;
36 if (right._posHits == NULL) {
48 _pathLength = right._pathLength;
49 _entrancePoint = right._entrancePoint;
50 _exitPoint = right._exitPoint;
51 _entranceMomentum = right._entranceMomentum;
52 _entranceEnergy = right._entranceEnergy;
53 _trackID = right._trackID;
54 _parentID = right._parentID;
55 _particlePdg = right._particlePdg;
56 _isReset = right._isReset;
57 if (right._posHits == NULL) {
61 *_posHits = *(right._posHits);
69 if ((_eDep == right._eDep) &&
70 (_time == right._time) &&
71 (_pathLength == right._pathLength) &&
72 (_entrancePoint == right._entrancePoint) &&
73 (_exitPoint == right._exitPoint) &&
74 (_entranceMomentum == right._entranceMomentum) &&
75 (_entranceEnergy == right._entranceEnergy) &&
76 (_trackID == right._trackID) &&
77 (_parentID == right._parentID) &&
78 (_particlePdg == right._particlePdg)) {
80 if (_posHits != NULL) {
81 if (right._posHits != NULL) {
82 return (*_posHits == *(right._posHits));
89 if (right._posHits != NULL) {
102 _eDep += step.GetTotalEnergyDeposit();
103 _pathLength += step.GetStepLength();
104 _exitPoint = step.GetPostStepPoint()->GetPosition();
109 _time = step.GetPreStepPoint()->GetGlobalTime();
110 _entrancePoint = step.GetPreStepPoint()->GetPosition();
111 _entranceMomentum = step.GetPreStepPoint()->GetMomentum();
112 _entranceEnergy = step.GetPreStepPoint()->GetKineticEnergy();
113 _trackID = step.GetTrack()->GetTrackID();
114 _parentID = step.GetTrack()->GetParentID();
115 _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.