13 : _eDep(timeBins.size() + 1, 0.), _timeBins(timeBins), _time(-1.), _pathLength(0.), _volume(NULL),
14 _absTranslation(0., 0., 0.), _id(-1), _isReset(true), _partHits(NULL), _storePosHits(false) {}
25 _pathLength = right._pathLength;
26 _volume = right._volume;
27 _absTranslation = right._absTranslation;
29 _isReset = right._isReset;
31 if (right._partHits == NULL) {
36 _storePosHits = right._storePosHits;
44 _timeBins = right._timeBins;
46 _pathLength = right._pathLength;
47 _volume = right._volume;
48 _absTranslation = right._absTranslation;
50 _isReset = right._isReset;
51 if (right._partHits == NULL) {
55 *_partHits = *(right._partHits);
56 _storePosHits = right._storePosHits;
64 if ((_eDep == right._eDep) &&
65 (_timeBins == right._timeBins) &&
66 (_time == right._time) &&
67 (_pathLength == right._pathLength) &&
68 (_volume == right._volume) &&
69 (_absTranslation == right._absTranslation) &&
71 (_isReset == right._isReset)) {
72 if (_partHits != NULL) {
73 if (right._partHits != NULL) {
74 return (*_partHits == *(right._partHits));
81 if (right._partHits != NULL) {
94 static const std::string routineName(
"GGSIntHit::AddStep");
96 unsigned int currBin = 0;
97 while (currBin < _eDep.size() - 1 && step.GetPreStepPoint()->GetGlobalTime() > _timeBins[currBin]) {
102 _eDep[currBin] += step.GetTotalEnergyDeposit();
103 _pathLength += step.GetStepLength();
108 _time = step.GetPreStepPoint()->GetGlobalTime();
117 _storePosHits =
true;
121 _storePosHits =
false;
123 for (decltype(_partHits->entries()) i = 0; i < _partHits->entries(); i++) {
139 _storePosHits =
false;
virtual void AddStep(const G4Step &step)
Adds a step to the particle hit.
G4Allocator< GGSIntHit > * GGSIntHitAllocator
Alias for G4 template memory allocator for GGSIntHit.
void SetPosHitsStorage(bool flag)
Turn on or off the storage of position hits.
const GGSIntHit & operator=(const GGSIntHit &right)
Assignment operator.
GGSIntHit(const std::vector< G4double > &timeBins)
Constructor.
G4THitsCollection< GGSPartHit > GGSPartHitsCollection
Alias for G4 template hits collection for GGSPartHit.
Definition of GGS Integrated Hit.
int operator==(const GGSIntHit &right) const
Comparison operator.
void SetPartHitsStorage(bool flag)
Turn on or off the storage of particle hits.