13 _eDep(timeBins.size() + 1, 0.), _timeBins(timeBins), _time(-1.), _pathLength(0.), _volume(NULL), _absTranslation(0.,
14 0., 0.), _id(-1), _isReset(true), _partHits(
15 NULL), _storePosHits(false) {
27 G4VHit(), _timeBins(right._timeBins) {
30 _pathLength = right._pathLength;
31 _volume = right._volume;
32 _absTranslation = right._absTranslation;
34 _isReset = right._isReset;
36 if (right._partHits == NULL) {
42 _storePosHits = right._storePosHits;
50 _timeBins = right._timeBins;
52 _pathLength = right._pathLength;
53 _volume = right._volume;
54 _absTranslation = right._absTranslation;
56 _isReset = right._isReset;
57 if (right._partHits == NULL) {
62 *_partHits = *(right._partHits);
63 _storePosHits = right._storePosHits;
71 if ((_eDep == right._eDep) &&
72 (_timeBins == right._timeBins) &&
73 (_time == right._time) &&
74 (_pathLength == right._pathLength) &&
75 (_volume == right._volume) &&
76 (_absTranslation == right._absTranslation) &&
78 (_isReset == right._isReset)) {
79 if (_partHits != NULL) {
80 if (right._partHits != NULL) {
81 return (*_partHits == *(right._partHits));
89 if (right._partHits != NULL) {
105 static const std::string routineName(
"GGSIntHit::AddStep");
107 unsigned int currBin = 0;
108 while (currBin < _eDep.size() - 1 && step.GetPreStepPoint()->GetGlobalTime() > _timeBins[currBin]) {
113 _eDep[currBin] += step.GetTotalEnergyDeposit();
114 _pathLength += step.GetStepLength();
119 _time = step.GetPreStepPoint()->GetGlobalTime();
128 _storePosHits =
true;
133 _storePosHits =
false;
135 for (G4int i = 0; i < _partHits->entries(); i++) {
152 _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.