Import Geant4 11.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2024-12-06 11:11:40 +01:00
parent e58e650b32
commit 32390e802b
1984 changed files with 98713 additions and 83996 deletions
@@ -23,20 +23,18 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// ----------------------------------------------------------------------
// Class G4GeometrySampler
//
// Class description:
//
// This class inherits from G4VSampler. It is used for scoring and
// importance sampling in the tracking (mass) geometry.
// See also the description in G4VSampler.hh.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
//
// Author: Michael Dressel, CERN
// --------------------------------------------------------------------
#ifndef G4GeometrySampler_hh
#define G4GeometrySampler_hh G4GeometrySampler_hh
#define G4GeometrySampler_hh 1
#include "G4Types.hh"
#include "G4String.hh"
@@ -45,19 +43,20 @@
class G4ImportanceConfigurator;
class G4WeightWindowConfigurator;
//class G4ScoreConfigurator;
class G4WeightCutOffConfigurator;
//class G4VGCellFinder;
class G4GeometrySampler : public G4VSampler
{
public: // with description
public:
explicit G4GeometrySampler(G4VPhysicalVolume *worldvolume, const G4String &particlename);
explicit G4GeometrySampler(G4String worldvolumeName, const G4String &particlename);
explicit G4GeometrySampler(const G4String& worldvolumeName, const G4String &particlename);
virtual ~G4GeometrySampler();
G4GeometrySampler(const G4GeometrySampler &) = delete;
G4GeometrySampler& operator=(const G4GeometrySampler &) = delete;
// virtual void PrepareScoring(G4VScorer *Scorer);
virtual void PrepareImportanceSampling(G4VIStore* istore,
const G4VImportanceAlgorithm
@@ -80,32 +79,21 @@ public: // with description
void SetWorld(const G4VPhysicalVolume* world);
void SetParticle(const G4String &particlename);
inline G4String GetParticleName(){return fParticleName;};
inline const G4String& GetParticleName() { return fParticleName; }
private:
G4GeometrySampler(const G4GeometrySampler &);
G4GeometrySampler &
operator=(const G4GeometrySampler &);
private:
private:
G4String fParticleName;
const G4VPhysicalVolume* fWorld;
const G4VPhysicalVolume* fWorld = nullptr;
G4String fWorldName;
G4ImportanceConfigurator *fImportanceConfigurator;
// G4ScoreConfigurator *fScoreConfigurator;
// G4VGCellFinder *fGCellFinder;
G4WeightCutOffConfigurator *fWeightCutOffConfigurator;
G4VIStore* fIStore;
G4WeightWindowConfigurator *fWeightWindowConfigurator;
G4VWeightWindowStore *fWWStore;
G4bool fIsConfigured;
G4ImportanceConfigurator* fImportanceConfigurator = nullptr;
G4WeightCutOffConfigurator* fWeightCutOffConfigurator = nullptr;
G4VIStore* fIStore = nullptr;
G4WeightWindowConfigurator* fWeightWindowConfigurator = nullptr;
G4VWeightWindowStore* fWWStore = nullptr;
G4bool fIsConfigured = false;
G4Configurators fConfigurators;
G4bool paraflag;
G4bool paraflag = false;
};
#endif
@@ -23,21 +23,18 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// ----------------------------------------------------------------------
// Class G4ImportanceConfigurator
//
// Class description:
//
// This class builds and places the G4ImportanceProcess.
// If the object is deleted the process is removed from the
// process list.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
//
// Author: Michael Dressel, CERN
// --------------------------------------------------------------------
#ifndef G4ImportanceConfigurator_hh
#define G4ImportanceConfigurator_hh G4ImportanceConfigurator_hh
#define G4ImportanceConfigurator_hh 1
#include "G4Types.hh"
#include "G4ProcessPlacer.hh"
@@ -51,44 +48,40 @@ class G4VPhysicalVolume;
class G4ImportanceConfigurator : public G4VSamplerConfigurator
{
public: // with description
public:
G4ImportanceConfigurator(const G4VPhysicalVolume* worldvolume,
const G4String &particlename,
G4VIStore &istore,
const G4VImportanceAlgorithm *ialg,
G4bool paraflag);
const G4String& particlename,
G4VIStore& istore,
const G4VImportanceAlgorithm* ialg,
G4bool paraflag);
G4ImportanceConfigurator(const G4String &worldvolumeName,
const G4String &particlename,
G4VIStore &istore,
const G4VImportanceAlgorithm *ialg,
G4bool paraflag);
G4ImportanceConfigurator(const G4String& worldvolumeName,
const G4String& particlename,
G4VIStore& istore,
const G4VImportanceAlgorithm* ialg,
G4bool paraflag);
virtual ~G4ImportanceConfigurator();
virtual void Configure(G4VSamplerConfigurator *preConf);
virtual const G4VTrackTerminator *GetTrackTerminator() const;
G4ImportanceConfigurator(const G4ImportanceConfigurator&) = delete;
G4ImportanceConfigurator& operator=(const G4ImportanceConfigurator&) = delete;
virtual void Configure(G4VSamplerConfigurator* preConf);
virtual const G4VTrackTerminator* GetTrackTerminator() const;
void SetWorldName(const G4String& Name);
private:
private:
G4ImportanceConfigurator(const G4ImportanceConfigurator &);
G4ImportanceConfigurator &
operator=(const G4ImportanceConfigurator &);
const G4VPhysicalVolume* fWorld;
const G4VPhysicalVolume* fWorld = nullptr;
G4String fWorldName;
G4ProcessPlacer fPlacer;
G4VIStore &fIStore;
G4bool fDeleteIalg;
const G4VImportanceAlgorithm *fIalgorithm;
G4ImportanceProcess *fImportanceProcess;
G4bool paraflag;
G4VIStore& fIStore;
G4bool fDeleteIalg = false;
const G4VImportanceAlgorithm* fIalgorithm = nullptr;
G4ImportanceProcess* fImportanceProcess = nullptr;
G4bool paraflag = false;
};
#endif
@@ -57,7 +57,7 @@ class G4PathFinder;
class G4ImportanceProcess : public G4VProcess, public G4VTrackTerminator
{
public: // with description
public:
G4ImportanceProcess(const G4VImportanceAlgorithm &aImportanceAlgorithm,
const G4VIStore &aIstore,
@@ -69,13 +69,14 @@ public: // with description
virtual ~G4ImportanceProcess();
// delete the G4ParticleChange
G4ImportanceProcess(const G4ImportanceProcess &) = delete;
G4ImportanceProcess &operator=(const G4ImportanceProcess &) = delete;
//--------------------------------------------------------------
// Set Parallel World
//--------------------------------------------------------------
void SetParallelWorld(const G4String &parallelWorldName);
// void SetParallelWorld(const G4VPhysicalVolume* parallelWorld);
void SetParallelWorld(const G4String& parallelWorldName);
//--------------------------------------------------------------
// Process interface
@@ -86,19 +87,17 @@ public: // with description
virtual G4double
PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
G4double previousStepSize,
G4double previousStepSize,
G4ForceCondition* condition);
// make process beeing forced
virtual G4VParticleChange *PostStepDoIt(const G4Track&, const G4Step&);
virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
// manage the importance sampling in the "mass" geometry
virtual void KillTrack() const;
// used in case no scoring process follows that does the killing
virtual const G4String &GetName() const;
public: // without description
virtual const G4String& GetName() const;
// no operation in AtRestDoIt and AlongStepDoIt
@@ -112,21 +111,12 @@ public: // without description
AtRestGetPhysicalInteractionLength(const G4Track& ,
G4ForceCondition*);
virtual G4VParticleChange*
AtRestDoIt(const G4Track&, const G4Step&);
virtual G4VParticleChange*
AlongStepDoIt(const G4Track&, const G4Step&);
virtual G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&);
virtual G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&);
private:
G4ImportanceProcess(const G4ImportanceProcess &);
G4ImportanceProcess &operator=(const G4ImportanceProcess &);
private:
private:
void CopyStep(const G4Step & step);
void CopyStep(const G4Step& step);
G4Step* fGhostStep = nullptr;
G4StepPoint* fGhostPreStepPoint = nullptr;
@@ -138,7 +128,7 @@ private:
G4SamplingPostStepAction* fPostStepAction = nullptr;
G4TransportationManager* fTransportationManager = nullptr;
G4PathFinder* fPathFinder = nullptr;
G4PathFinder* fPathFinder = nullptr;
// -------------------------------
// Navigation in the Ghost World:
@@ -156,7 +146,6 @@ private:
G4bool fParaflag = false;
G4FieldTrack fEndTrack = '0';
ELimited feLimited = kDoNot;
};
#endif
@@ -23,61 +23,55 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// ----------------------------------------------------------------------
// Class G4WeightCutOffConfigurator
//
// Class description:
//
// This class builds and places the G4WeightCutOffProcess.
// If the object is deleted the process is removed from the
// process list.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
//
// Author: Michael Dressel, CERN
// ----------------------------------------------------------------------
#ifndef G4WeightCutOffConfigurator_hh
#define G4WeightCutOffConfigurator_hh G4WeightCutOffConfigurator_hh
#define G4WeightCutOffConfigurator_hh 1
#include "G4Types.hh"
#include "G4VSamplerConfigurator.hh"
#include "G4ProcessPlacer.hh"
class G4WeightCutOffProcess;
//class G4VGCellFinder;
class G4VIStore;
class G4VPhysicalVolume;
class G4WeightCutOffConfigurator : public G4VSamplerConfigurator
{
public: // with description
public:
G4WeightCutOffConfigurator(const G4VPhysicalVolume* worldvolume,
const G4String &particlename,
G4double wsurvival,
G4double wlimit,
G4double isource,
G4VIStore *istore,
//const G4VGCellFinder &aGCellFinder,
G4bool paraflag);
const G4String& particlename,
G4double wsurvival,
G4double wlimit,
G4double isource,
G4VIStore* istore,
G4bool paraflag);
virtual ~G4WeightCutOffConfigurator();
virtual void Configure(G4VSamplerConfigurator *preConf);
virtual const G4VTrackTerminator *GetTrackTerminator() const ;
G4WeightCutOffConfigurator(const G4WeightCutOffConfigurator&) = delete;
G4WeightCutOffConfigurator& operator=(const G4WeightCutOffConfigurator&) = delete;
virtual void Configure(G4VSamplerConfigurator* preConf);
virtual const G4VTrackTerminator* GetTrackTerminator() const;
private:
private:
G4WeightCutOffConfigurator(const G4WeightCutOffConfigurator&);
G4WeightCutOffConfigurator &
operator=(const G4WeightCutOffConfigurator&);
const G4VPhysicalVolume* fWorld;
const G4VPhysicalVolume* fWorld = nullptr;
G4ProcessPlacer fPlacer;
G4WeightCutOffProcess *fWeightCutOffProcess;
G4bool fPlaced;
G4bool paraflag;
G4WeightCutOffProcess* fWeightCutOffProcess = nullptr;
G4bool fPlaced = false;
G4bool paraflag = false;
};
#endif
@@ -23,19 +23,16 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// ----------------------------------------------------------------------
// Class G4WeightWindowConfigurator
// G4WeightWindowConfigurator
//
// Class description:
//
// Configuration of weight window processes.
// Author: Michael Dressel (Michael.Dressel@cern.ch)
// ----------------------------------------------------------------------
//
// Author: Michael Dressel, CERN
// --------------------------------------------------------------------
#ifndef G4WeightWindowConfigurator_hh
#define G4WeightWindowConfigurator_hh G4WeightWindowConfigurator_hh
#define G4WeightWindowConfigurator_hh 1
#include "G4Types.hh"
#include "G4ProcessPlacer.hh"
@@ -50,36 +47,33 @@ class G4VPhysicalVolume;
class G4WeightWindowConfigurator : public G4VSamplerConfigurator
{
public: // with description
public:
G4WeightWindowConfigurator(const G4VPhysicalVolume* worldvolume,
const G4String &particlename,
G4VWeightWindowStore &wwstore,
const G4VWeightWindowAlgorithm *wwAlg,
G4PlaceOfAction placeOfAction,
G4bool paraflag);
const G4String& particlename,
G4VWeightWindowStore& wwstore,
const G4VWeightWindowAlgorithm* wwAlg,
G4PlaceOfAction placeOfAction,
G4bool paraflag);
virtual ~G4WeightWindowConfigurator();
virtual void Configure(G4VSamplerConfigurator *preConf);
virtual const G4VTrackTerminator *GetTrackTerminator() const;
private:
G4WeightWindowConfigurator(const G4WeightWindowConfigurator &) = delete;
G4WeightWindowConfigurator& operator=(const G4WeightWindowConfigurator &) = delete;
G4WeightWindowConfigurator(const G4WeightWindowConfigurator &);
G4WeightWindowConfigurator &
operator=(const G4WeightWindowConfigurator &);
virtual void Configure(G4VSamplerConfigurator* preConf);
virtual const G4VTrackTerminator* GetTrackTerminator() const;
const G4VPhysicalVolume* fWorld;
private:
const G4VPhysicalVolume* fWorld = nullptr;
G4ProcessPlacer fPlacer;
G4VWeightWindowStore &fWeightWindowStore;
G4bool fDeleteWWalg;
const G4VWeightWindowAlgorithm *fWWalgorithm;
G4WeightWindowProcess *fWeightWindowProcess;
G4VWeightWindowStore& fWeightWindowStore;
G4bool fDeleteWWalg = false;
const G4VWeightWindowAlgorithm* fWWalgorithm = nullptr;
G4WeightWindowProcess* fWeightWindowProcess = nullptr;
G4PlaceOfAction fPlaceOfAction;
G4bool paraflag;
G4bool paraflag = false;
};
#endif
@@ -31,7 +31,7 @@
// This process is a forced post step process. It will apply
// weight window biasing on boundaries, collisions
// or both according to the G4PlaceOfAction argument.
//
// Author: Michael Dressel, 2002
// --------------------------------------------------------------------
#ifndef G4WeightWindowProcess_hh
@@ -58,26 +58,28 @@ class G4PathFinder;
class G4WeightWindowProcess : public G4VProcess, public G4VTrackTerminator
{
public: // with description
public:
G4WeightWindowProcess(const G4VWeightWindowAlgorithm &
aWeightWindowAlgorithm,
const G4VWeightWindowStore &aWWStore,
const G4VTrackTerminator *TrackTerminator,
G4PlaceOfAction placeOfAction,
const G4String &aName = "WeightWindowProcess",
G4bool para = false);
G4WeightWindowProcess(const G4VWeightWindowAlgorithm&
aWeightWindowAlgorithm,
const G4VWeightWindowStore &aWWStore,
const G4VTrackTerminator* TrackTerminator,
G4PlaceOfAction placeOfAction,
const G4String& aName = "WeightWindowProcess",
G4bool para = false);
// creates a G4ParticleChange
virtual ~G4WeightWindowProcess();
// delete the G4ParticleChange
G4WeightWindowProcess(const G4WeightWindowProcess &) = delete;
G4WeightWindowProcess &operator=(const G4WeightWindowProcess &) = delete;
//--------------------------------------------------------------
// Set Parallel World
//--------------------------------------------------------------
void SetParallelWorld(const G4String &parallelWorldName);
void SetParallelWorld(const G4String& parallelWorldName);
void SetParallelWorld(G4VPhysicalVolume* parallelWorld);
//--------------------------------------------------------------
@@ -85,12 +87,10 @@ public: // with description
//--------------------------------------------------------------
void StartTracking(G4Track*);
virtual G4double
PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
G4double previousStepSize,
G4double previousStepSize,
G4ForceCondition* condition);
// make process beeing forced
virtual G4VParticleChange *PostStepDoIt(const G4Track&, const G4Step&);
@@ -99,38 +99,22 @@ public: // with description
virtual void KillTrack() const;
// used in case no scoring process follows that does the killing
virtual const G4String &GetName() const;
public: // without description
virtual const G4String& GetName() const;
// no operation in AtRestDoIt and AlongStepDoIt
virtual G4double
AlongStepGetPhysicalInteractionLength(const G4Track&,
G4double ,
G4double ,
G4double& ,
G4GPILSelection*);
AlongStepGetPhysicalInteractionLength(const G4Track&, G4double, G4double,
G4double&, G4GPILSelection*);
virtual G4double
AtRestGetPhysicalInteractionLength(const G4Track& ,
G4ForceCondition*);
AtRestGetPhysicalInteractionLength(const G4Track&, G4ForceCondition*);
virtual G4VParticleChange*
AtRestDoIt(const G4Track&, const G4Step&);
virtual G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&);
virtual G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&);
private:
virtual G4VParticleChange*
AlongStepDoIt(const G4Track&, const G4Step&);
private:
G4WeightWindowProcess(const G4WeightWindowProcess &);
G4WeightWindowProcess &operator=(const G4WeightWindowProcess &);
private:
void CopyStep(const G4Step & step);
void CopyStep(const G4Step& step);
G4Step* fGhostStep = nullptr;
G4StepPoint* fGhostPreStepPoint = nullptr;
@@ -143,7 +127,7 @@ private:
G4PlaceOfAction fPlaceOfAction;
G4TransportationManager* fTransportationManager = nullptr;
G4PathFinder* fPathFinder = nullptr;
G4PathFinder* fPathFinder = nullptr;
// -------------------------------
// Navigation in the Ghost World: