Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-10 14:46:44 +01:00
committed by Ben Morgan
parent 6399a014b6
commit 80e2389dd8
3932 changed files with 202519 additions and 246221 deletions
@@ -41,8 +41,8 @@
// A utility static class, responsable for keeping parameters
// for all optical physics processes and models.
//
// It is initialized by the master thread but can be updated
// at any moment. Parameters may be used in run time or at
// It is initialized by the master thread but can be updated
// at any moment. Parameters may be used in run time or at
// initialisation
//
// -------------------------------------------------------------------
@@ -60,41 +60,50 @@
class G4OpticalParametersMessenger;
class G4StateManager;
enum G4OpticalProcessIndex {
kCerenkov, ///< Cerenkov process index
kScintillation, ///< Scintillation process index
kAbsorption, ///< Absorption process index
kRayleigh, ///< Rayleigh scattering process index
kMieHG, ///< Mie scattering process index
kBoundary, ///< Boundary process index
kWLS, ///< Wave Length Shifting process index
kWLS2, ///< Second Wave Length Shifting process index
kNoProcess ///< Number of processes, no selected process
enum G4OpticalProcessIndex
{
kCerenkov, ///< Cerenkov process index
kScintillation, ///< Scintillation process index
kAbsorption, ///< Absorption process index
kRayleigh, ///< Rayleigh scattering process index
kMieHG, ///< Mie scattering process index
kBoundary, ///< Boundary process index
kWLS, ///< Wave Length Shifting process index
kWLS2, ///< Second Wave Length Shifting process index
kNoProcess ///< Number of processes, no selected process
};
/// Return the name for a given optical process index
G4String G4OpticalProcessName(G4int );
G4String G4OpticalProcessName(G4int);
inline
G4String G4OpticalProcessName(G4int processNumber)
inline G4String G4OpticalProcessName(G4int processNumber)
{
switch ( processNumber ) {
case kCerenkov: return "Cerenkov";
case kScintillation: return "Scintillation";
case kAbsorption: return "OpAbsorption";
case kRayleigh: return "OpRayleigh";
case kMieHG: return "OpMieHG";
case kBoundary: return "OpBoundary";
case kWLS: return "OpWLS";
case kWLS2: return "OpWLS2";
default: return "NoProcess";
switch(processNumber)
{
case kCerenkov:
return "Cerenkov";
case kScintillation:
return "Scintillation";
case kAbsorption:
return "OpAbsorption";
case kRayleigh:
return "OpRayleigh";
case kMieHG:
return "OpMieHG";
case kBoundary:
return "OpBoundary";
case kWLS:
return "OpWLS";
case kWLS2:
return "OpWLS2";
default:
return "NoProcess";
}
}
class G4OpticalParameters
{
public:
public:
static G4OpticalParameters* Instance();
~G4OpticalParameters();
@@ -104,7 +113,7 @@ public:
// printing
void StreamInfo(std::ostream& os) const;
void Dump() const;
friend std::ostream& operator<< (std::ostream& os, const G4OpticalParameters&);
friend std::ostream& operator<<(std::ostream& os, const G4OpticalParameters&);
void SetVerboseLevel(G4int);
G4int GetVerboseLevel() const;
@@ -113,88 +122,84 @@ public:
G4bool GetProcessActivation(const G4String&) const;
// Cerenkov
void SetCerenkovMaxPhotonsPerStep(G4int);
G4int GetCerenkovMaxPhotonsPerStep() const;
void SetCerenkovVerboseLevel(G4int);
G4int GetCerenkovVerboseLevel() const;
void SetCerenkovMaxPhotonsPerStep(G4int);
G4int GetCerenkovMaxPhotonsPerStep() const;
void SetCerenkovVerboseLevel(G4int);
G4int GetCerenkovVerboseLevel() const;
void SetCerenkovMaxBetaChange(G4double);
G4double GetCerenkovMaxBetaChange() const;
void SetCerenkovTrackSecondariesFirst(G4bool);
G4bool GetCerenkovTrackSecondariesFirst() const;
void SetCerenkovStackPhotons(G4bool);
G4bool GetCerenkovStackPhotons() const;
void SetCerenkovTrackSecondariesFirst(G4bool);
G4bool GetCerenkovTrackSecondariesFirst() const;
void SetCerenkovStackPhotons(G4bool);
G4bool GetCerenkovStackPhotons() const;
// Scintillation
void SetScintYieldFactor(G4double);
G4double GetScintYieldFactor() const;
void SetScintExcitationRatio(G4double);
G4double GetScintExcitationRatio() const;
void SetScintByParticleType(G4bool);
G4bool GetScintByParticleType() const;
void SetScintTrackInfo(G4bool);
G4bool GetScintTrackInfo() const;
void SetScintTrackSecondariesFirst(G4bool);
G4bool GetScintTrackSecondariesFirst() const;
void SetScintFiniteRiseTime(G4bool);
G4bool GetScintFiniteRiseTime() const;
void SetScintStackPhotons(G4bool);
G4bool GetScintStackPhotons() const;
void SetScintVerboseLevel(G4int);
G4int GetScintVerboseLevel() const;
void SetScintEnhancedTimeConstants(G4bool);
G4bool GetScintEnhancedTimeConstants() const;
void SetScintByParticleType(G4bool);
G4bool GetScintByParticleType() const;
void SetScintTrackInfo(G4bool);
G4bool GetScintTrackInfo() const;
void SetScintTrackSecondariesFirst(G4bool);
G4bool GetScintTrackSecondariesFirst() const;
void SetScintFiniteRiseTime(G4bool);
G4bool GetScintFiniteRiseTime() const;
void SetScintStackPhotons(G4bool);
G4bool GetScintStackPhotons() const;
void SetScintVerboseLevel(G4int);
G4int GetScintVerboseLevel() const;
void SetScintEnhancedTimeConstants(G4bool);
G4bool GetScintEnhancedTimeConstants() const;
// WLS
void SetWLSTimeProfile(const G4String&);
G4String GetWLSTimeProfile() const;
void SetWLSVerboseLevel(G4int);
G4int GetWLSVerboseLevel() const;
void SetWLSVerboseLevel(G4int);
G4int GetWLSVerboseLevel() const;
// WLS2
void SetWLS2TimeProfile(const G4String&);
G4String GetWLS2TimeProfile() const;
void SetWLS2VerboseLevel(G4int);
G4int GetWLS2VerboseLevel() const;
void SetWLS2VerboseLevel(G4int);
G4int GetWLS2VerboseLevel() const;
// boundary
void SetBoundaryVerboseLevel(G4int);
G4int GetBoundaryVerboseLevel() const;
void SetBoundaryVerboseLevel(G4int);
G4int GetBoundaryVerboseLevel() const;
void SetBoundaryInvokeSD(G4bool);
G4bool GetBoundaryInvokeSD() const;
// absorption
void SetAbsorptionVerboseLevel(G4int);
G4int GetAbsorptionVerboseLevel() const;
void SetAbsorptionVerboseLevel(G4int);
G4int GetAbsorptionVerboseLevel() const;
// rayleigh
void SetRayleighVerboseLevel(G4int);
G4int GetRayleighVerboseLevel() const;
void SetRayleighVerboseLevel(G4int);
G4int GetRayleighVerboseLevel() const;
// mie
void SetMieVerboseLevel(G4int);
G4int GetMieVerboseLevel() const;
private:
void SetMieVerboseLevel(G4int);
G4int GetMieVerboseLevel() const;
private:
G4OpticalParameters();
void Initialise();
G4bool IsLocked() const;
void PrintWarning(G4ExceptionDescription& ed) const;
static G4OpticalParameters* theInstance;
G4OpticalParametersMessenger* theMessenger;
G4StateManager* fStateManager;
G4StateManager* fStateManager;
G4int verboseLevel;
// Whether to activate each process
std::map<G4String, G4bool> processActivation;
std::map<G4String, G4bool> processActivation;
// cerenkov/////////////////
G4bool cerenkovStackPhotons;
G4bool cerenkovTrackSecondariesFirst;
G4int cerenkovVerboseLevel;
G4int cerenkovMaxPhotons;
G4bool cerenkovStackPhotons;
G4bool cerenkovTrackSecondariesFirst;
G4int cerenkovVerboseLevel;
G4int cerenkovMaxPhotons;
G4double cerenkovMaxBetaChange;
// scintillation /////////////////
@@ -202,45 +207,44 @@ private:
/// option to set a finite rise-time; Note: the G4Scintillation
/// process expects the user to have set the constant material
/// property SCINTILLATIONRISETIME{1,2,3}
G4bool scintFiniteRiseTime;
G4bool scintFiniteRiseTime;
/// option to allow for the light yield to be a function of
/// particle type and deposited energy in case of non-linear
/// light emission in scintillators
G4bool scintByParticleType;
G4bool scintByParticleType;
/// option to allow for G4ScintillationTrackInformation
/// to be attached to a scintillation photon's track
G4bool scintTrackInfo;
G4bool scintTrackInfo;
/// option to allow stacking of secondary Scintillation photons
G4bool scintStackPhotons;
G4bool scintStackPhotons;
G4int scintVerboseLevel;
G4bool scintTrackSecondariesFirst;
G4int scintVerboseLevel;
G4bool scintTrackSecondariesFirst;
///////////////// WLS
G4String wlsTimeProfileName;
G4int wlsVerboseLevel;
G4int wlsVerboseLevel;
///////////////// WLS2
G4String wls2TimeProfileName;
G4int wls2VerboseLevel;
G4int wls2VerboseLevel;
//////////////// absorption
G4int absorptionVerboseLevel;
G4int absorptionVerboseLevel;
//////////////// rayleigh
G4int rayleighVerboseLevel;
G4int rayleighVerboseLevel;
//////////////// mie
G4int mieVerboseLevel;
//////////////// mie
G4int mieVerboseLevel;
//////////////// boundary
/// G4OpBoundaryProcess to call InvokeSD method
G4bool boundaryInvokeSD;
G4int boundaryVerboseLevel;
G4bool boundaryInvokeSD;
G4int boundaryVerboseLevel;
#ifdef G4MULTITHREADED
static G4Mutex opticalParametersMutex;