Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -26,11 +26,11 @@
|
||||
#ifndef PAR03HIT_HH
|
||||
#define PAR03HIT_HH
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4VHit.hh"
|
||||
|
||||
class G4AttDef;
|
||||
class G4AttValue;
|
||||
@@ -50,83 +50,83 @@ class G4LogicalVolume;
|
||||
|
||||
class Par03Hit : public G4VHit
|
||||
{
|
||||
public:
|
||||
Par03Hit();
|
||||
Par03Hit(const Par03Hit& aRight);
|
||||
virtual ~Par03Hit();
|
||||
public:
|
||||
Par03Hit();
|
||||
Par03Hit(const Par03Hit& aRight);
|
||||
virtual ~Par03Hit();
|
||||
|
||||
const Par03Hit& operator=(const Par03Hit& aRight);
|
||||
int operator==(const Par03Hit& aRight) const;
|
||||
const Par03Hit& operator=(const Par03Hit& aRight);
|
||||
int operator==(const Par03Hit& aRight) const;
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
/// Visualise hits. If pointer to the logical volume was set, cell shape is
|
||||
/// drawn taking into account proper radial position (taken from fRhoId)
|
||||
virtual void Draw();
|
||||
/// Retrieve atributes' names in order to allow filtering
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
/// Create attributes for the visualisation.
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
/// Print hit properties.
|
||||
virtual void Print();
|
||||
/// Set position
|
||||
inline void SetPos(G4ThreeVector aXYZ) { fPos = aXYZ; }
|
||||
/// Get position
|
||||
inline G4ThreeVector GetPos() const { return fPos; }
|
||||
/// Set rotation
|
||||
inline void SetRot(G4RotationMatrix aXYZ) { fRot = aXYZ; }
|
||||
/// Get rotation
|
||||
inline G4RotationMatrix GetRot() const { return fRot; }
|
||||
/// Set energy
|
||||
inline void SetEdep(G4double aEdep) { fEdep = aEdep; }
|
||||
/// Add energy to previous value
|
||||
inline void AddEdep(G4double aEdep) { fEdep += aEdep; }
|
||||
/// Get energy
|
||||
inline G4double GetEdep() const { return fEdep; }
|
||||
/// Set Z id of the cell in the readout segmentation
|
||||
inline void SetZid(G4int aZ) { fZId = aZ; }
|
||||
/// Get Z id of the cell in the readout segmentation
|
||||
inline G4int GetZid() const { return fZId; }
|
||||
/// Set Rho id of the cell in the readout segmentation
|
||||
inline void SetRhoId(G4int aRho) { fRhoId = aRho; }
|
||||
/// Get rho id of the cell in the readout segmentation
|
||||
inline G4int GetRhoId() const { return fRhoId; }
|
||||
/// Set phi id of the cell in the readout segmentation
|
||||
inline void SetPhiId(G4int aPhi) { fPhiId = aPhi; }
|
||||
/// Get phi id of the cell in the readout segmentation
|
||||
inline G4int GetPhiId() const { return fPhiId; }
|
||||
/// Set time
|
||||
inline void SetTime(G4double aTime) { fTime = aTime; }
|
||||
/// Get time
|
||||
inline G4double GetTime() const { return fTime; }
|
||||
/// Set type (0 = full sim, 1 = fast sim)
|
||||
inline void SetType(G4int aType) { fType = aType; }
|
||||
/// Get type (0 = full sim, 1 = fast sim)
|
||||
inline G4int GetType() const { return fType; }
|
||||
// Set pointer to cell logical volume
|
||||
inline void SetLogV(G4LogicalVolume* aLogVol) { fLogVol = aLogVol; }
|
||||
// Get pointer to cell logical volume
|
||||
inline const G4LogicalVolume* GetLogVol() { return fLogVol; }
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
/// Visualise hits. If pointer to the logical volume was set, cell shape is
|
||||
/// drawn taking into account proper radial position (taken from fRhoId)
|
||||
virtual void Draw();
|
||||
/// Retrieve atributes' names in order to allow filtering
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
/// Create attributes for the visualisation.
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
/// Print hit properties.
|
||||
virtual void Print();
|
||||
/// Set position
|
||||
inline void SetPos(G4ThreeVector aXYZ) { fPos = aXYZ; }
|
||||
/// Get position
|
||||
inline G4ThreeVector GetPos() const { return fPos; }
|
||||
/// Set rotation
|
||||
inline void SetRot(G4RotationMatrix aXYZ) { fRot = aXYZ; }
|
||||
/// Get rotation
|
||||
inline G4RotationMatrix GetRot() const { return fRot; }
|
||||
/// Set energy
|
||||
inline void SetEdep(G4double aEdep) { fEdep = aEdep; }
|
||||
/// Add energy to previous value
|
||||
inline void AddEdep(G4double aEdep) { fEdep += aEdep; }
|
||||
/// Get energy
|
||||
inline G4double GetEdep() const { return fEdep; }
|
||||
/// Set Z id of the cell in the readout segmentation
|
||||
inline void SetZid(G4int aZ) { fZId = aZ; }
|
||||
/// Get Z id of the cell in the readout segmentation
|
||||
inline G4int GetZid() const { return fZId; }
|
||||
/// Set Rho id of the cell in the readout segmentation
|
||||
inline void SetRhoId(G4int aRho) { fRhoId = aRho; }
|
||||
/// Get rho id of the cell in the readout segmentation
|
||||
inline G4int GetRhoId() const { return fRhoId; }
|
||||
/// Set phi id of the cell in the readout segmentation
|
||||
inline void SetPhiId(G4int aPhi) { fPhiId = aPhi; }
|
||||
/// Get phi id of the cell in the readout segmentation
|
||||
inline G4int GetPhiId() const { return fPhiId; }
|
||||
/// Set time
|
||||
inline void SetTime(G4double aTime) { fTime = aTime; }
|
||||
/// Get time
|
||||
inline G4double GetTime() const { return fTime; }
|
||||
/// Set type (0 = full sim, 1 = fast sim)
|
||||
inline void SetType(G4int aType) { fType = aType; }
|
||||
/// Get type (0 = full sim, 1 = fast sim)
|
||||
inline G4int GetType() const { return fType; }
|
||||
// Set pointer to cell logical volume
|
||||
inline void SetLogV(G4LogicalVolume* aLogVol) { fLogVol = aLogVol; }
|
||||
// Get pointer to cell logical volume
|
||||
inline const G4LogicalVolume* GetLogVol() { return fLogVol; }
|
||||
|
||||
public:
|
||||
/// Energy deposit
|
||||
G4double fEdep = 0;
|
||||
/// Z ID of readout cell
|
||||
G4int fZId = -1;
|
||||
/// Rho ID of readout cell
|
||||
G4int fRhoId = -1;
|
||||
/// Phi ID of readout cell
|
||||
G4int fPhiId = -1;
|
||||
/// Position
|
||||
G4ThreeVector fPos;
|
||||
/// Rotation
|
||||
G4RotationMatrix fRot;
|
||||
/// Time
|
||||
G4double fTime = -1;
|
||||
/// Type: 0 = full sim, 1 = fast sim
|
||||
G4int fType = -1;
|
||||
/// Pointer to logical volume for visualisation
|
||||
G4LogicalVolume* fLogVol = nullptr;
|
||||
public:
|
||||
/// Energy deposit
|
||||
G4double fEdep = 0;
|
||||
/// Z ID of readout cell
|
||||
G4int fZId = -1;
|
||||
/// Rho ID of readout cell
|
||||
G4int fRhoId = -1;
|
||||
/// Phi ID of readout cell
|
||||
G4int fPhiId = -1;
|
||||
/// Position
|
||||
G4ThreeVector fPos;
|
||||
/// Rotation
|
||||
G4RotationMatrix fRot;
|
||||
/// Time
|
||||
G4double fTime = -1;
|
||||
/// Type: 0 = full sim, 1 = fast sim
|
||||
G4int fType = -1;
|
||||
/// Pointer to logical volume for visualisation
|
||||
G4LogicalVolume* fLogVol = nullptr;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<Par03Hit> Par03HitsCollection;
|
||||
@@ -135,14 +135,13 @@ extern G4ThreadLocal G4Allocator<Par03Hit>* Par03HitAllocator;
|
||||
|
||||
inline void* Par03Hit::operator new(size_t)
|
||||
{
|
||||
if(!Par03HitAllocator)
|
||||
Par03HitAllocator = new G4Allocator<Par03Hit>;
|
||||
return (void*) Par03HitAllocator->MallocSingle();
|
||||
if (!Par03HitAllocator) Par03HitAllocator = new G4Allocator<Par03Hit>;
|
||||
return (void*)Par03HitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void Par03Hit::operator delete(void* aHit)
|
||||
{
|
||||
Par03HitAllocator->FreeSingle((Par03Hit*) aHit);
|
||||
Par03HitAllocator->FreeSingle((Par03Hit*)aHit);
|
||||
}
|
||||
|
||||
#endif /* PAR03HIT_HH */
|
||||
|
||||
Reference in New Issue
Block a user