Import Geant4 11.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2024-06-28 13:08:51 +02:00
parent f7b23877ed
commit e58e650b32
5232 changed files with 239416 additions and 244360 deletions
@@ -46,5 +46,3 @@ class Par01ActionInitialization : public G4VUserActionInitialization
};
#endif
@@ -32,61 +32,50 @@
#ifndef Par01CalorimeterHit_h
#define Par01CalorimeterHit_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 Par01CalorimeterHit : public G4VHit
{
public:
Par01CalorimeterHit();
Par01CalorimeterHit(G4LogicalVolume* logVol);
~Par01CalorimeterHit();
Par01CalorimeterHit(const Par01CalorimeterHit &right);
const Par01CalorimeterHit& operator=(const Par01CalorimeterHit &right);
G4bool operator==(const Par01CalorimeterHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
void *operator new(size_t,void*p){return p;}
public:
Par01CalorimeterHit();
Par01CalorimeterHit(G4LogicalVolume* logVol);
~Par01CalorimeterHit();
Par01CalorimeterHit(const Par01CalorimeterHit& right);
const Par01CalorimeterHit& operator=(const Par01CalorimeterHit& right);
G4bool operator==(const Par01CalorimeterHit& right) const;
inline void* operator new(size_t);
inline void operator delete(void* aHit);
void* operator new(size_t, void* p) { return p; }
#ifndef G4NOT_ISO_DELETES
void operator delete(void *,void*){}
void operator delete(void*, void*) {}
#endif
// methods from base class
virtual void Draw();
virtual void Print();
private:
G4double fEdep;
G4ThreeVector fPosition;
G4RotationMatrix fRot;
const G4LogicalVolume* fLogV;
public:
inline void SetEdep(G4double de)
{ fEdep = de; };
inline void AddEdep(G4double de)
{ fEdep += de; };
inline G4double GetEdep()
{ return fEdep; };
inline void SetPos(G4ThreeVector xyz)
{ fPosition = xyz; };
inline G4ThreeVector GetPos()
{ return fPosition; };
inline void SetRot(G4RotationMatrix rmat)
{ fRot = rmat; };
inline G4RotationMatrix GetRot()
{ return fRot; };
inline const G4LogicalVolume * GetLogV()
{ return fLogV; };
// methods from base class
virtual void Draw();
virtual void Print();
private:
G4double fEdep;
G4ThreeVector fPosition;
G4RotationMatrix fRot;
const G4LogicalVolume* fLogV;
public:
inline void SetEdep(G4double de) { fEdep = de; };
inline void AddEdep(G4double de) { fEdep += de; };
inline G4double GetEdep() { return fEdep; };
inline void SetPos(G4ThreeVector xyz) { fPosition = xyz; };
inline G4ThreeVector GetPos() { return fPosition; };
inline void SetRot(G4RotationMatrix rmat) { fRot = rmat; };
inline G4RotationMatrix GetRot() { return fRot; };
inline const G4LogicalVolume* GetLogV() { return fLogV; };
};
typedef G4THitsCollection<Par01CalorimeterHit> Par01CalorimeterHitsCollection;
@@ -95,14 +84,14 @@ extern G4ThreadLocal G4Allocator<Par01CalorimeterHit>* Par01CalorimeterHitAlloca
inline void* Par01CalorimeterHit::operator new(size_t)
{
if(!Par01CalorimeterHitAllocator) Par01CalorimeterHitAllocator =
new G4Allocator<Par01CalorimeterHit>;
return (void *) Par01CalorimeterHitAllocator->MallocSingle();
if (!Par01CalorimeterHitAllocator)
Par01CalorimeterHitAllocator = new G4Allocator<Par01CalorimeterHit>;
return (void*)Par01CalorimeterHitAllocator->MallocSingle();
}
inline void Par01CalorimeterHit::operator delete(void *aHit)
inline void Par01CalorimeterHit::operator delete(void* aHit)
{
Par01CalorimeterHitAllocator->FreeSingle((Par01CalorimeterHit*) aHit);
Par01CalorimeterHitAllocator->FreeSingle((Par01CalorimeterHit*)aHit);
}
#endif
@@ -34,31 +34,28 @@
#include "Par01CalorimeterHit.hh"
#include "G4VSensitiveDetector.hh"
#include "G4Step.hh"
#include "G4VSensitiveDetector.hh"
class Par01CalorimeterSD : public G4VSensitiveDetector
{
public:
Par01CalorimeterSD(G4String name, G4int nCells, G4String colName);
~Par01CalorimeterSD();
virtual void Initialize(G4HCofThisEvent*HCE);
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
virtual void EndOfEvent(G4HCofThisEvent*HCE);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
private:
Par01CalorimeterHitsCollection *fCalCollection;
int* fCellID;
int fNumberOfCells;
int fHCID;
public:
Par01CalorimeterSD(G4String name, G4int nCells, G4String colName);
~Par01CalorimeterSD();
virtual void Initialize(G4HCofThisEvent* HCE);
virtual G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist);
virtual void EndOfEvent(G4HCofThisEvent* HCE);
virtual void clear();
virtual void DrawAll();
virtual void PrintAll();
private:
Par01CalorimeterHitsCollection* fCalCollection;
int* fCellID;
int fNumberOfCells;
int fHCID;
};
#endif
@@ -39,21 +39,19 @@ class Par01DetectorMessenger;
class Par01DetectorConstruction : public G4VUserDetectorConstruction
{
public:
Par01DetectorConstruction();
virtual ~Par01DetectorConstruction();
public:
virtual G4VPhysicalVolume* Construct();
virtual void ConstructSDandField();
public:
Par01DetectorConstruction();
virtual ~Par01DetectorConstruction();
private:
G4LogicalVolume* fCrystalLog;
G4LogicalVolume* fTowerLog;
G4int fnX, fnY;
G4int fnXhad, fnYhad;
public:
virtual G4VPhysicalVolume* Construct();
virtual void ConstructSDandField();
private:
G4LogicalVolume* fCrystalLog;
G4LogicalVolume* fTowerLog;
G4int fnX, fnY;
G4int fnXhad, fnYhad;
};
#endif
@@ -28,7 +28,7 @@
//
//
//
//
//
//----------------------------------------------
// Parameterisation of e+/e-/gamma producing hits
// The hits are the same as defined in the detailed
@@ -39,52 +39,48 @@
#include "Par01EnergySpot.hh"
#include "G4VFastSimulationModel.hh"
#include "G4Step.hh"
#include "G4TouchableHandle.hh"
#include "G4VFastSimulationModel.hh"
#include <vector>
class Par01EMShowerModel : public G4VFastSimulationModel
{
public:
//-------------------------
// Constructor, destructor
//-------------------------
Par01EMShowerModel (G4String, G4Region*);
Par01EMShowerModel (G4String);
~Par01EMShowerModel ();
public:
//-------------------------
// Constructor, destructor
//-------------------------
Par01EMShowerModel(G4String, G4Region*);
Par01EMShowerModel(G4String);
~Par01EMShowerModel();
//------------------------------
// Virtual methods of the base
// class to be coded by the user
//------------------------------
//------------------------------
// Virtual methods of the base
// class to be coded by the user
//------------------------------
// -- IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition&);
// -- ModelTrigger
virtual G4bool ModelTrigger(const G4FastTrack &);
// -- User method DoIt
virtual void DoIt(const G4FastTrack&, G4FastStep&);
// -- IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition&);
// -- ModelTrigger
virtual G4bool ModelTrigger(const G4FastTrack&);
// -- User method DoIt
virtual void DoIt(const G4FastTrack&, G4FastStep&);
private:
void AssignSpotAndCallHit(const Par01EnergySpot &eSpot);
void FillFakeStep(const Par01EnergySpot &eSpot);
void Explode(const G4FastTrack&);
void BuildDetectorResponse();
private:
G4Step *fFakeStep;
G4StepPoint *fFakePreStepPoint, *fFakePostStepPoint;
G4TouchableHandle fTouchableHandle;
G4Navigator *fpNavigator;
G4bool fNaviSetup;
G4Material* fCsI;
private:
void AssignSpotAndCallHit(const Par01EnergySpot& eSpot);
void FillFakeStep(const Par01EnergySpot& eSpot);
void Explode(const G4FastTrack&);
void BuildDetectorResponse();
std::vector<Par01EnergySpot> feSpotList;
private:
G4Step* fFakeStep;
G4StepPoint *fFakePreStepPoint, *fFakePostStepPoint;
G4TouchableHandle fTouchableHandle;
G4Navigator* fpNavigator;
G4bool fNaviSetup;
G4Material* fCsI;
std::vector<Par01EnergySpot> feSpotList;
};
#endif
@@ -36,31 +36,30 @@ class G4Colour;
class Par01EnergySpot
{
public:
Par01EnergySpot();
Par01EnergySpot(const G4ThreeVector& point, G4double E);
~Par01EnergySpot();
public:
Par01EnergySpot();
Par01EnergySpot(const G4ThreeVector& point, G4double E);
~Par01EnergySpot();
inline void SetEnergy(const G4double& E) {fEnergy = E;}
inline G4double GetEnergy() const {return fEnergy;}
inline void SetEnergy(const G4double& E) { fEnergy = E; }
inline G4double GetEnergy() const { return fEnergy; }
inline void SetPosition(const G4ThreeVector& point) {fPoint = point;}
inline G4ThreeVector GetPosition() const {return fPoint;}
inline void SetPosition(const G4ThreeVector& point) { fPoint = point; }
inline G4ThreeVector GetPosition() const { return fPoint; }
G4bool operator==(const Par01EnergySpot& eSpot) const
{
return (fEnergy==eSpot.fEnergy && fPoint==eSpot.fPoint) ? 1 : 0;
}
G4bool operator==(const Par01EnergySpot& eSpot) const
{
return (fEnergy == eSpot.fEnergy && fPoint == eSpot.fPoint) ? 1 : 0;
}
// Draw:
void Draw(G4Colour* color = 0);
// Print:
void Print();
// Draw:
void Draw(G4Colour* color = 0);
// Print:
void Print();
private:
G4double fEnergy;
G4ThreeVector fPoint;
private:
G4double fEnergy;
G4ThreeVector fPoint;
};
#endif
@@ -33,15 +33,15 @@
#include "G4VUserParallelWorld.hh"
class Par01ParallelWorldForPion : public G4VUserParallelWorld {
public:
Par01ParallelWorldForPion(G4String worldName);
~Par01ParallelWorldForPion();
private:
virtual void Construct();
virtual void ConstructSD();
class Par01ParallelWorldForPion : public G4VUserParallelWorld
{
public:
Par01ParallelWorldForPion(G4String worldName);
~Par01ParallelWorldForPion();
private:
virtual void Construct();
virtual void ConstructSD();
};
#endif
@@ -28,7 +28,7 @@
//
//
//
//
//
//----------------------------------------
// Simple example of a "parameterisation".
//----------------------------------------
@@ -39,24 +39,23 @@
class Par01PiModel : public G4VFastSimulationModel
{
public:
//-------------------------
// Constructor, destructor
//-------------------------
Par01PiModel (G4Region *anEnvelope);
~Par01PiModel();
public:
//-------------------------
// Constructor, destructor
//-------------------------
Par01PiModel(G4Region* anEnvelope);
~Par01PiModel();
//------------------------------
// Virtual methods of the base
// class to be coded by the user
//------------------------------
// -- IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition&);
// -- ModelTrigger
virtual G4bool ModelTrigger(const G4FastTrack &);
// -- User method DoIt
virtual void DoIt(const G4FastTrack&, G4FastStep&);
//------------------------------
// Virtual methods of the base
// class to be coded by the user
//------------------------------
// -- IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition&);
// -- ModelTrigger
virtual G4bool ModelTrigger(const G4FastTrack&);
// -- User method DoIt
virtual void DoIt(const G4FastTrack&, G4FastStep&);
};
#endif
@@ -28,7 +28,7 @@
//
//
//
//
//
//----------------------------------------------
// Parameterisation for pi+/pi- producing hits.
//----------------------------------------------
@@ -37,47 +37,47 @@
#include "Par01EnergySpot.hh"
#include "G4VFastSimulationModel.hh"
#include "G4Step.hh"
#include "G4TouchableHandle.hh"
#include "G4VFastSimulationModel.hh"
#include <vector>
class Par01PionShowerModel : public G4VFastSimulationModel
{
public:
//-------------------------
// Constructor, destructor
//-------------------------
Par01PionShowerModel (G4String, G4Region*);
Par01PionShowerModel (G4String);
~Par01PionShowerModel ();
public:
//-------------------------
// Constructor, destructor
//-------------------------
Par01PionShowerModel(G4String, G4Region*);
Par01PionShowerModel(G4String);
~Par01PionShowerModel();
//------------------------------
// Virtual methods of the base
// class to be coded by the user
//------------------------------
//------------------------------
// Virtual methods of the base
// class to be coded by the user
//------------------------------
// -- IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition&);
// -- ModelTrigger
virtual G4bool ModelTrigger(const G4FastTrack &);
// -- User method DoIt
virtual void DoIt(const G4FastTrack&, G4FastStep&);
// -- IsApplicable
virtual G4bool IsApplicable(const G4ParticleDefinition&);
// -- ModelTrigger
virtual G4bool ModelTrigger(const G4FastTrack&);
// -- User method DoIt
virtual void DoIt(const G4FastTrack&, G4FastStep&);
private:
void AssignSpotAndCallHit(const Par01EnergySpot &eSpot);
void FillFakeStep(const Par01EnergySpot &eSpot);
void Explode(const G4FastTrack&);
void BuildDetectorResponse();
private:
G4Step *fFakeStep;
G4StepPoint *fFakePreStepPoint, *fFakePostStepPoint;
G4TouchableHandle fTouchableHandle;
G4Navigator *fpNavigator;
G4bool fNaviSetup;
private:
void AssignSpotAndCallHit(const Par01EnergySpot& eSpot);
void FillFakeStep(const Par01EnergySpot& eSpot);
void Explode(const G4FastTrack&);
void BuildDetectorResponse();
std::vector<Par01EnergySpot> feSpotList;
private:
G4Step* fFakeStep;
G4StepPoint *fFakePreStepPoint, *fFakePostStepPoint;
G4TouchableHandle fTouchableHandle;
G4Navigator* fpNavigator;
G4bool fNaviSetup;
std::vector<Par01EnergySpot> feSpotList;
};
#endif
@@ -52,5 +52,3 @@ class Par01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
};
#endif