2022-05-18 20:01:10 +08:00
|
|
|
#ifndef DESCSS_HumanPhantomHit_h
|
|
|
|
#define DESCSS_HumanPhantomHit_h 1
|
2022-05-17 21:14:44 +08:00
|
|
|
|
|
|
|
#include "G4Allocator.hh"
|
|
|
|
#include "G4THitsCollection.hh"
|
|
|
|
#include "G4ThreeVector.hh"
|
|
|
|
#include "G4VHit.hh"
|
|
|
|
#include "tls.hh" // FOR MT
|
|
|
|
|
|
|
|
class G4HumanPhantomHit : public G4VHit {
|
|
|
|
public:
|
|
|
|
G4HumanPhantomHit();
|
|
|
|
~G4HumanPhantomHit();
|
|
|
|
G4HumanPhantomHit(const G4HumanPhantomHit&);
|
|
|
|
const G4HumanPhantomHit& operator=(const G4HumanPhantomHit&);
|
|
|
|
G4bool operator==(const G4HumanPhantomHit&) const;
|
|
|
|
|
|
|
|
inline void* operator new(size_t);
|
|
|
|
inline void operator delete(void*);
|
|
|
|
|
|
|
|
void Draw();
|
|
|
|
void Print();
|
|
|
|
|
|
|
|
public:
|
|
|
|
void SetBodyPartID(G4String bodyPartName) { bodyPartID = bodyPartName; };
|
|
|
|
void SetEdep(G4double de) { edep = de; };
|
|
|
|
|
|
|
|
G4String GetBodyPartID() { return bodyPartID; };
|
|
|
|
G4double GetEdep() { return edep; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
G4String bodyPartID;
|
|
|
|
G4double edep;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef G4THitsCollection<G4HumanPhantomHit> G4HumanPhantomHitsCollection;
|
|
|
|
|
|
|
|
extern G4ThreadLocal G4Allocator<G4HumanPhantomHit>* G4HumanPhantomHitAllocator;
|
|
|
|
|
|
|
|
inline void* G4HumanPhantomHit::operator new(size_t) {
|
|
|
|
if (!G4HumanPhantomHitAllocator) G4HumanPhantomHitAllocator = new G4Allocator<G4HumanPhantomHit>;
|
|
|
|
return (void*)G4HumanPhantomHitAllocator->MallocSingle();
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void G4HumanPhantomHit::operator delete(void* aHit) {
|
|
|
|
G4HumanPhantomHitAllocator->FreeSingle((G4HumanPhantomHit*)aHit);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|