Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -28,81 +28,73 @@
|
||||
#ifndef SensitiveDetectorHit_h
|
||||
#define SensitiveDetectorHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4VHit.hh"
|
||||
|
||||
class G4AttDef;
|
||||
class G4AttValue;
|
||||
|
||||
class SensitiveDetectorHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
public:
|
||||
SensitiveDetectorHit();
|
||||
SensitiveDetectorHit(G4int z);
|
||||
virtual ~SensitiveDetectorHit();
|
||||
SensitiveDetectorHit(
|
||||
const SensitiveDetectorHit &right);
|
||||
const SensitiveDetectorHit& operator=(
|
||||
const SensitiveDetectorHit &right);
|
||||
G4bool operator==(const SensitiveDetectorHit &right) const;
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
|
||||
SensitiveDetectorHit(const SensitiveDetectorHit& right);
|
||||
const SensitiveDetectorHit& operator=(const SensitiveDetectorHit& right);
|
||||
G4bool operator==(const SensitiveDetectorHit& right) const;
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
|
||||
virtual void Draw();
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
virtual void Print();
|
||||
|
||||
private:
|
||||
|
||||
private:
|
||||
G4int fLayerID;
|
||||
G4ThreeVector fWorldPos;
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
inline void SetLayerID(G4int z) { fLayerID = z; }
|
||||
inline G4int GetLayerID() const { return fLayerID; }
|
||||
inline void SetWorldPos(G4ThreeVector xyz) { fWorldPos = xyz; }
|
||||
inline G4ThreeVector GetWorldPos() const { return fWorldPos; }
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<SensitiveDetectorHit>
|
||||
SensitiveDetectorHitsCollection;
|
||||
typedef G4THitsCollection<SensitiveDetectorHit> SensitiveDetectorHitsCollection;
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
extern G4ThreadLocal G4Allocator<SensitiveDetectorHit>*
|
||||
SensitiveDetectorHitAllocator;
|
||||
extern G4ThreadLocal G4Allocator<SensitiveDetectorHit>* SensitiveDetectorHitAllocator;
|
||||
#else
|
||||
extern G4Allocator<SensitiveDetectorHit>
|
||||
SensitiveDetectorHitAllocator;
|
||||
extern G4Allocator<SensitiveDetectorHit> SensitiveDetectorHitAllocator;
|
||||
#endif
|
||||
|
||||
inline void* SensitiveDetectorHit::operator new(size_t)
|
||||
{
|
||||
#ifdef G4MULTITHREADED
|
||||
if(!SensitiveDetectorHitAllocator)
|
||||
SensitiveDetectorHitAllocator =
|
||||
new G4Allocator<SensitiveDetectorHit>;
|
||||
return (void *) SensitiveDetectorHitAllocator->MallocSingle();
|
||||
if (!SensitiveDetectorHitAllocator)
|
||||
SensitiveDetectorHitAllocator = new G4Allocator<SensitiveDetectorHit>;
|
||||
return (void*)SensitiveDetectorHitAllocator->MallocSingle();
|
||||
#else
|
||||
void* aHit;
|
||||
aHit = (void*)SensitiveDetectorHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
void* aHit;
|
||||
aHit = (void*)SensitiveDetectorHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void SensitiveDetectorHit::operator delete(void* aHit)
|
||||
{
|
||||
#ifdef G4MULTITHREADED
|
||||
SensitiveDetectorHitAllocator->FreeSingle((
|
||||
SensitiveDetectorHit*) aHit);
|
||||
SensitiveDetectorHitAllocator->FreeSingle((SensitiveDetectorHit*)aHit);
|
||||
#else
|
||||
SensitiveDetectorHitAllocator.FreeSingle((
|
||||
SensitiveDetectorHit*) aHit);
|
||||
SensitiveDetectorHitAllocator.FreeSingle((SensitiveDetectorHit*)aHit);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user