Import Geant4 10.5.0 source tree
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Transportation.hh 110805 2018-06-15 06:52:15Z gcosmo $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -53,6 +52,7 @@
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4ParticleChangeForTransport.hh"
|
||||
|
||||
class G4SafetyHelper;
|
||||
class G4CoupledTransportation;
|
||||
class G4TransportationLogger;
|
||||
@@ -72,28 +72,28 @@ class G4Transportation : public G4VProcess
|
||||
G4double currentMinimumStep,
|
||||
G4double& currentSafety,
|
||||
G4GPILSelection* selection
|
||||
);
|
||||
); // override;
|
||||
|
||||
G4VParticleChange* AlongStepDoIt(
|
||||
const G4Track& track,
|
||||
const G4Step& stepData
|
||||
);
|
||||
); // override;
|
||||
|
||||
G4VParticleChange* PostStepDoIt(
|
||||
const G4Track& track,
|
||||
const G4Step& stepData
|
||||
);
|
||||
); // override;
|
||||
// Responsible for the relocation
|
||||
|
||||
G4double PostStepGetPhysicalInteractionLength(
|
||||
const G4Track& ,
|
||||
G4double previousStepSize,
|
||||
G4ForceCondition* pForceCond
|
||||
);
|
||||
); // override;
|
||||
// Forces the PostStepDoIt action to be called,
|
||||
// but does not limit the step
|
||||
|
||||
G4bool FieldExertedForce() { return fFieldExertedForce; }
|
||||
inline G4bool FieldExertedForce() { return fFieldExertedForce; }
|
||||
|
||||
G4PropagatorInField* GetPropagatorInField();
|
||||
void SetPropagatorInField( G4PropagatorInField* pFieldPropagator);
|
||||
@@ -106,12 +106,16 @@ class G4Transportation : public G4VProcess
|
||||
inline void SetThresholdWarningEnergy( G4double newEnWarn );
|
||||
inline void SetThresholdImportantEnergy( G4double newEnImp );
|
||||
inline void SetThresholdTrials(G4int newMaxTrials );
|
||||
|
||||
// Get/Set parameters for killing loopers:
|
||||
// Above 'important' energy a 'looping' particle in field will
|
||||
// *NOT* be abandoned, except after fThresholdTrials attempts.
|
||||
// Below Warning energy, no verbosity for looping particles is issued
|
||||
|
||||
void SetHighLooperThresholds(); // Shortcut method - old values (meant for HEP)
|
||||
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);
|
||||
@@ -135,43 +139,45 @@ class G4Transportation : public G4VProcess
|
||||
void StartTracking(G4Track* aTrack);
|
||||
// Reset state for new (potentially resumed) track
|
||||
|
||||
virtual void ProcessDescription(std::ostream& outFile) const; // override;
|
||||
void PrintStatistics( std::ostream& outStr) const;
|
||||
|
||||
protected:
|
||||
|
||||
G4bool DoesGlobalFieldExist();
|
||||
// Checks whether a field exists for the "global" field manager.
|
||||
// Checks whether a field exists for the "global" field manager
|
||||
|
||||
// void ReportLoopingTrack( ... ) --> moved to Logger class
|
||||
// Warn about dropping of tracks that repeatedly exceed number of
|
||||
// iterations for propagaton in field
|
||||
void ReportMissingLogger(const char * methodName);
|
||||
|
||||
private:
|
||||
|
||||
G4Navigator* fLinearNavigator;
|
||||
G4Navigator* fLinearNavigator;
|
||||
G4PropagatorInField* fFieldPropagator;
|
||||
// The Propagators used to transport the particle
|
||||
|
||||
G4ThreeVector fTransportEndPosition;
|
||||
G4ThreeVector fTransportEndMomentumDir;
|
||||
G4double fTransportEndKineticEnergy;
|
||||
G4ThreeVector fTransportEndSpin;
|
||||
G4bool fMomentumChanged;
|
||||
G4bool fEndGlobalTimeComputed;
|
||||
G4double fCandidateEndGlobalTime;
|
||||
G4ThreeVector fTransportEndPosition= G4ThreeVector( 0.0, 0.0, 0.0 );
|
||||
G4ThreeVector fTransportEndMomentumDir= G4ThreeVector( 0.0, 0.0, 0.0 );
|
||||
G4double fTransportEndKineticEnergy= 0.0;
|
||||
G4ThreeVector fTransportEndSpin= G4ThreeVector( 0.0, 0.0, 0.0 );
|
||||
G4bool fMomentumChanged= true;
|
||||
G4bool fEndGlobalTimeComputed= false;
|
||||
G4double fCandidateEndGlobalTime= 0.0;
|
||||
// The particle's state after this Step, Store for DoIt
|
||||
|
||||
G4bool fParticleIsLooping;
|
||||
G4bool fNewTrack; // Flag from StartTracking
|
||||
G4bool fFirstStepInVolume;
|
||||
G4bool fLastStepInVolume; // Last step - almost same as next flag
|
||||
// (temporary redundancy for checking)
|
||||
G4bool fGeometryLimitedStep; // Flag to determine whether a boundary was reached.
|
||||
G4bool fParticleIsLooping = false;
|
||||
G4bool fNewTrack= true; // Flag from StartTracking
|
||||
G4bool fFirstStepInVolume= true;
|
||||
G4bool fLastStepInVolume= false; // Last step - almost same as next flag
|
||||
// (temporary redundancy for checking)
|
||||
G4bool fGeometryLimitedStep= true;
|
||||
// Flag to determine whether a boundary was reached
|
||||
|
||||
G4bool fFieldExertedForce; // During current step
|
||||
G4bool fFieldExertedForce= false; // During current step
|
||||
|
||||
G4TouchableHandle fCurrentTouchableHandle;
|
||||
G4TouchableHandle fCurrentTouchableHandle;
|
||||
|
||||
G4ThreeVector fPreviousSftOrigin;
|
||||
G4double fPreviousSafety;
|
||||
G4ThreeVector fPreviousSftOrigin;
|
||||
G4double fPreviousSafety;
|
||||
// Remember last safety origin & value.
|
||||
|
||||
G4ParticleChangeForTransport fParticleChange;
|
||||
@@ -180,23 +186,34 @@ class G4Transportation : public G4VProcess
|
||||
G4double fEndPointDistance;
|
||||
|
||||
// Thresholds for looping particles:
|
||||
//
|
||||
G4double fThreshold_Warning_Energy; // Warn above this energy
|
||||
G4double fThreshold_Important_Energy; // Hesitate above this
|
||||
G4int fThresholdTrials; // for this no of trials
|
||||
//
|
||||
G4double fThreshold_Warning_Energy = 1.0 * CLHEP::keV; // Warn above this energy
|
||||
G4double fThreshold_Important_Energy = 1.0 * CLHEP::MeV; // Give a few trial above this E
|
||||
G4int fThresholdTrials = 10; // Number of trials an important looper survives
|
||||
// Above 'important' energy a 'looping' particle in field will
|
||||
// *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',
|
||||
// if it is above 'Important' Energy
|
||||
//
|
||||
G4int fNoLooperTrials;
|
||||
// ( Used if it is above 'Important' Energy. )
|
||||
G4int fNoLooperTrials= 0;
|
||||
|
||||
// Statistics for tracks abandoned
|
||||
// Statistics for tracks abandoned due to looping - and 'saved' despite looping
|
||||
//
|
||||
G4double fSumEnergyKilled;
|
||||
G4double fMaxEnergyKilled;
|
||||
|
||||
G4double fSumEnergyKilled= 0.0;
|
||||
G4double fSumEnerSqKilled= 0.0;
|
||||
G4double fMaxEnergyKilled= -1.0;
|
||||
G4int fMaxEnergyKilledPDG= 0;
|
||||
unsigned long fNumLoopersKilled= 0;
|
||||
G4double fSumEnergyKilled_NonElectron= 0.0;
|
||||
G4double fSumEnerSqKilled_NonElectron= 0.0;
|
||||
G4double fMaxEnergyKilled_NonElectron= -1.0;
|
||||
G4int fMaxEnergyKilled_NonElecPDG= 0;
|
||||
unsigned long fNumLoopersKilled_NonElectron= 0;
|
||||
G4double fSumEnergySaved= 0.0;
|
||||
G4double fMaxEnergySaved= -1.0;
|
||||
G4double fSumEnergyUnstableSaved = 0.0;
|
||||
// Whether to avoid calling G4Navigator for short step ( < safety)
|
||||
// If using it, the safety estimate for endpoint will likely be smaller.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user