#ifndef GeneHe3detHit_h #define GeneHe3detHit_h 1 #include "G4Allocator.hh" #include "G4THitsCollection.hh" #include "G4ThreeVector.hh" #include "G4VHit.hh" //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... class GeneHe3detHit : public G4VHit { public: GeneHe3detHit(); ~GeneHe3detHit(); GeneHe3detHit(const GeneHe3detHit&); const GeneHe3detHit& operator=(const GeneHe3detHit&); int operator==(const GeneHe3detHit&) const; inline void* operator new(size_t); inline void operator delete(void*); void Draw(); void Print(); public: void SetCpNo(G4int id) { cpNo = id; }; void SetEdep(G4double de) { edep = de; }; void SetPos(G4ThreeVector xyz) { pos = xyz; }; void SetParticle(G4String name) { particleName = name; }; void SetParticleEnergy(G4double e1) { particleEnergy = e1; }; void SetTime(G4double t2) { HitTime = t2; }; inline G4int GetCpNo() { return cpNo; }; inline G4double GetEdep() { return edep; }; inline G4ThreeVector GetPos() { return pos; }; inline G4String GetParticle() { return particleName; }; inline G4double GetParticleEnergy() { return particleEnergy; }; inline G4double GetTime() { return HitTime; }; private: G4int cpNo; G4double edep; G4ThreeVector pos; G4double HitTime; G4String particleName; G4double particleEnergy; }; //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... typedef G4THitsCollection GeneHe3detHitsCollection; extern G4Allocator GeneHe3detHitAllocator; //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... inline void* GeneHe3detHit::operator new(size_t) { void* aHit; aHit = (void*)GeneHe3detHitAllocator.MallocSingle(); return aHit; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... inline void GeneHe3detHit::operator delete(void* aHit) { GeneHe3detHitAllocator.FreeSingle((GeneHe3detHit*)aHit); } #endif