Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -125,9 +125,16 @@ class G4CoupledTransportation : public G4VProcess
inline void ResetKilledStatistics( G4int report = 1);
// Statistics for tracks killed (currently due to looping in field)
static G4bool EnableUseMagneticMoment(G4bool useMoment=true);
static G4bool EnableMagneticMoment(G4bool useMoment=true);
// Whether to deflect particles with force due to magnetic moment
static G4bool EnableGravity(G4bool useGravity);
// Turn on the capability to deflect particles with a gravity field
static void SetSilenceLooperWarnings( G4bool val);
// Do not warn (or throw exception) about 'looping' particles
static G4bool GetSilenceLooperWarnings();
static void SetSignifyStepsInAnyVolume( G4bool anyVol )
{ fSignifyStepInAnyVolume = anyVol; }
static G4bool GetSignifyStepsInAnyVolume()
@@ -148,6 +155,10 @@ class G4CoupledTransportation : public G4VProcess
void StartTracking(G4Track* aTrack);
void EndTracking();
static G4bool EnableUseMagneticMoment(G4bool useMoment=true)
{ return EnableMagneticMoment(useMoment); }
// Old name ... obsolete
G4double AtRestGetPhysicalInteractionLength( const G4Track& ,
G4ForceCondition* )
@@ -160,8 +171,9 @@ class G4CoupledTransportation : public G4VProcess
protected:
G4bool DoesGlobalFieldExist();
// Checks whether a field exists for the "global" field manager
G4bool DoesAnyFieldExist();
// Check whether any field exists in the geometry
// - replaces method that checked only whether a field for the world volume
void ReportInexactEnergy(G4double startEnergy, G4double endEnergy);
// Issue warning
@@ -183,7 +195,7 @@ class G4CoupledTransportation : public G4VProcess
G4PropagatorInField* fFieldPropagator;
// Still required in order to find/set the fieldmanager
G4bool fGlobalFieldExists;
G4bool fAnyFieldExists;
// G4bool fStartedNewTrack; // True for first step or restarted tracking
// until first step's AlongStepGPIL
@@ -257,6 +269,8 @@ class G4CoupledTransportation : public G4VProcess
friend class G4Transportation;
static G4bool fUseMagneticMoment;
static G4bool fUseGravity;
static G4bool fSilenceLooperWarnings; // Flag to *Supress* all 'looper' warnings
private:
@@ -34,6 +34,7 @@
#include <CLHEP/Units/SystemOfUnits.h>
#include "G4TransportationLogger.hh"
#include "G4FieldManagerStore.hh"
inline void G4CoupledTransportation::
SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
@@ -46,11 +47,10 @@ inline G4PropagatorInField* G4CoupledTransportation::GetPropagatorInField()
return fFieldPropagator;
}
inline G4bool G4CoupledTransportation::DoesGlobalFieldExist()
inline G4bool G4CoupledTransportation::DoesAnyFieldExist()
{
G4TransportationManager* transportMgr;
transportMgr= G4TransportationManager::GetTransportationManager();
return transportMgr->GetFieldManager()->DoesFieldExist();
G4FieldManagerStore* fieldMgrStore= G4FieldManagerStore::GetInstance();
return fieldMgrStore->size() > 0;
}
inline G4double G4CoupledTransportation::GetThresholdWarningEnergy() const
@@ -115,7 +115,7 @@ class G4Transportation : public G4VProcess
void SetLowLooperThresholds(); // Set low thresholds - for low-E applications
void PushThresholdsToLogger(); // Inform logger of current thresholds
void ReportLooperThresholds(); // Print values of looper thresholds
inline G4double GetMaxEnergyKilled() const;
inline G4double GetSumEnergyKilled() const;
inline void ResetKilledStatistics( G4int report = 1);
@@ -124,9 +124,20 @@ class G4Transportation : public G4VProcess
inline void EnableShortStepOptimisation(G4bool optimise=true);
// Whether short steps < safety will avoid to call Navigator (if field=0)
static G4bool EnableUseMagneticMoment(G4bool useMoment=true);
// Whether to deflect particles with force due to magnetic moment
static G4bool EnableMagneticMoment(G4bool useMoment=true);
// Whether to enable particles to be deflected with force due to magnetic moment
static G4bool EnableGravity(G4bool useGravity=true);
// Whether to enable particles to be deflected with force due to gravity
static void SetSilenceLooperWarnings( G4bool val);
// Do not warn (or throw exception) about 'looping' particles
static G4bool GetSilenceLooperWarnings();
public: // without description
static G4bool EnableUseMagneticMoment(G4bool useMoment=true)
{ return EnableMagneticMoment(useMoment); } // Old name - will be deprecated
public: // without description
G4double AtRestGetPhysicalInteractionLength( const G4Track&,
@@ -144,9 +155,10 @@ class G4Transportation : public G4VProcess
protected:
G4bool DoesGlobalFieldExist();
// Checks whether a field exists for the "global" field manager
G4bool DoesAnyFieldExist();
// Check whether any field exists in the geometry
// - replaces method that checked only whether a field for the world volume
void ReportMissingLogger(const char * methodName);
private:
@@ -164,6 +176,8 @@ class G4Transportation : public G4VProcess
G4double fCandidateEndGlobalTime= 0.0;
// The particle's state after this Step, Store for DoIt
G4bool fAnyFieldExists= false;
G4bool fParticleIsLooping = false;
G4bool fNewTrack= true; // Flag from StartTracking
G4bool fFirstStepInVolume= true;
@@ -194,7 +208,6 @@ class G4Transportation : public G4VProcess
// *NOT* be abandoned, except after fThresholdTrials attempts.
G4int fAbandonUnstableTrials = 0; // Number of trials after which to abandon
// unstable loopers ( 0 = never )
// Counter for steps in which particle reports 'looping',
// ( Used if it is above 'Important' Energy. )
G4int fNoLooperTrials= 0;
@@ -226,6 +239,9 @@ class G4Transportation : public G4VProcess
friend class G4CoupledTransportation;
static G4bool fUseMagneticMoment;
static G4bool fUseGravity;
static G4bool fSilenceLooperWarnings; // Flag to *Supress* all 'looper' warnings
};
#include "G4Transportation.icc"
@@ -35,6 +35,7 @@
#include <CLHEP/Units/SystemOfUnits.h>
#include "G4TransportationLogger.hh"
#include "G4FieldManagerStore.hh"
inline void
G4Transportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
@@ -47,14 +48,10 @@ inline G4PropagatorInField* G4Transportation::GetPropagatorInField()
return fFieldPropagator;
}
inline G4bool G4Transportation::DoesGlobalFieldExist()
inline G4bool G4Transportation::DoesAnyFieldExist()
{
G4TransportationManager* transportMgr;
transportMgr= G4TransportationManager::GetTransportationManager();
// fFieldExists= transportMgr->GetFieldManager()->DoesFieldExist();
// return fFieldExists;
return transportMgr->GetFieldManager()->DoesFieldExist();
G4FieldManagerStore* fieldMgrStore= G4FieldManagerStore::GetInstance();
return fieldMgrStore->size() > 0;
}
inline G4double G4Transportation::GetThresholdWarningEnergy() const