13 #include "G4Allocator.hh"
14 #include "G4THitsCollection.hh"
15 #include "G4ThreeVector.hh"
17 #include "G4VPhysicalVolume.hh"
38 GGSIntHit(
const std::vector<G4double> &timeBins);
70 inline void *
operator new(
size_t size);
79 inline void operator delete(
void *aHit);
103 virtual void AddStep(
const G4Step &step);
109 void SetVolume(
const G4VPhysicalVolume *volume) { _volume = volume; }
206 const std::vector<G4double> &
GetTimeBins()
const {
return _timeBins; }
218 const G4VPhysicalVolume *
GetVolume() {
return _volume; }
241 std::vector<G4double> _eDep;
242 std::vector<G4double> _timeBins;
244 G4double _pathLength;
245 const G4VPhysicalVolume *_volume;
246 G4ThreeVector _absTranslation;
263 inline void *GGSIntHit::operator
new(size_t) {
280 #define RegisterIntHit(className) \
281 GGSIntHit *className##Builder(const std::vector<G4double> &timeBins) { return new className(timeBins); } \
282 class className##Proxy { \
284 className##Proxy() { GGSIntHitFactory::GetInstance().RegisterBuilder(#className, className##Builder); } \
286 className##Proxy proxyFor##className
G4double GetTotalEnergyDep() const
Energy release getter.
virtual void AddStep(const G4Step &step)
Adds a step to the particle hit.
const G4ThreeVector & GetAbsTranslation()
Getter of absolute position of sensitive element.
G4Allocator< GGSIntHit > * GGSIntHitAllocator
Alias for G4 template memory allocator for GGSIntHit.
GGSPartHitsCollection * GetPartHits()
Getter of container of particle hits.
const std::vector< G4double > & GetTimeBins() const
Time bins getter.
void SetAbsTranslation(const G4ThreeVector &pos)
Set the position in global coordinates of the sensitive element.
void SetPosHitsStorage(bool flag)
Turn on or off the storage of position hits.
const G4VPhysicalVolume * GetVolume()
Getter for volume.
void GGS_IGNORE_VAR(const T &)
Small utility to avoid compiler warnings for unused methods.
G4double GetPathLength() const
Path length getter.
const GGSIntHit & operator=(const GGSIntHit &right)
Assignment operator.
virtual void UserInit(G4Step *aStep)
User initialization of hit global properties.
G4int GetID()
Getter for volume ID.
void SetID(G4int id)
Setter for volume ID.
G4double GetTime() const
Time getter.
GGSIntHit(const std::vector< G4double > &timeBins)
Constructor.
void SetVolume(const G4VPhysicalVolume *volume)
Setter for volume.
G4THitsCollection< GGSIntHit > GGSIntHitsCollection
Alias for G4 template hits collection for GGSIntHit.
G4THitsCollection< GGSPartHit > GGSPartHitsCollection
Alias for G4 template hits collection for GGSPartHit.
Definition of GGS Integrated Hit.
int operator==(const GGSIntHit &right) const
Comparison operator.
const std::vector< G4double > & GetEnergyDep() const
Energy release getter.
void SetPartHitsStorage(bool flag)
Turn on or off the storage of particle hits.