Import Geant4 10.5.0 source tree
This commit is contained in:
@@ -24,17 +24,14 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Transportation.icc 110805 2018-06-15 06:52:15Z gcosmo $
|
||||
//
|
||||
|
||||
//
|
||||
//
|
||||
// Inline function implementation.
|
||||
//
|
||||
|
||||
// =======================================================================
|
||||
// Created: 9 June 1998, J. Apostolakis
|
||||
// =======================================================================
|
||||
//
|
||||
|
||||
#include <CLHEP/Units/SystemOfUnits.h>
|
||||
#include "G4TransportationLogger.hh"
|
||||
@@ -78,26 +75,36 @@ inline G4int G4Transportation::GetThresholdTrials() const
|
||||
inline void G4Transportation::SetThresholdWarningEnergy( G4double newEnWarn )
|
||||
{
|
||||
fThreshold_Warning_Energy= newEnWarn;
|
||||
fpLogger->SetThresholdWarningEnergy( newEnWarn ); // Update the information for correct reporting
|
||||
if( fpLogger ) {
|
||||
fpLogger->SetThresholdWarningEnergy( newEnWarn );
|
||||
} else {
|
||||
ReportMissingLogger("SetThresholdWarningEnergy");
|
||||
}
|
||||
// Update the information for correct reporting
|
||||
}
|
||||
|
||||
inline void G4Transportation::SetThresholdImportantEnergy( G4double newEnImp )
|
||||
{
|
||||
fThreshold_Important_Energy = newEnImp;
|
||||
fpLogger->SetThresholdImportantEnergy( newEnImp );// Update the information for correct reporting
|
||||
fThreshold_Important_Energy = newEnImp;
|
||||
if( fpLogger ) {
|
||||
fpLogger->SetThresholdImportantEnergy( newEnImp );
|
||||
// Update the information for correct reporting
|
||||
} else {
|
||||
ReportMissingLogger("SetThresholdImportantEnergy");
|
||||
}
|
||||
}
|
||||
|
||||
inline void G4Transportation::SetThresholdTrials(G4int newMaxTrials )
|
||||
{
|
||||
fThresholdTrials = newMaxTrials;
|
||||
fpLogger->SetThresholdTrials(newMaxTrials ); // Update the information for correct reporting
|
||||
fThresholdTrials = newMaxTrials;
|
||||
if( fpLogger ) {
|
||||
fpLogger->SetThresholdTrials(newMaxTrials );
|
||||
// Update the information for correct reporting
|
||||
} else {
|
||||
ReportMissingLogger("SetThresholdTrials");
|
||||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
|
||||
inline G4double G4Transportation::GetMaxEnergyKilled() const
|
||||
{
|
||||
return fMaxEnergyKilled;
|
||||
@@ -110,19 +117,36 @@ inline G4double G4Transportation::GetSumEnergyKilled() const
|
||||
|
||||
inline void G4Transportation::ResetKilledStatistics(G4int report)
|
||||
{
|
||||
if( report ) {
|
||||
G4cout << " G4Transportation: Statistics for looping particles " << G4endl;
|
||||
G4cout << " Sum of energy of loopers killed: " << fSumEnergyKilled << G4endl;
|
||||
G4cout << " Max energy of loopers killed: " << fMaxEnergyKilled << G4endl;
|
||||
// Statistics for tracks killed (currently due to looping in field)
|
||||
|
||||
if( report )
|
||||
{
|
||||
G4cout << " G4Transportation: Statistics for looping particles "
|
||||
<< G4endl;
|
||||
G4cout << " Sum of energy of loopers killed: " << fSumEnergyKilled
|
||||
<< G4endl;
|
||||
G4cout << " Max energy of loopers killed: " << fMaxEnergyKilled
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
fSumEnergyKilled= 0;
|
||||
fMaxEnergyKilled= -1.0*CLHEP::GeV;
|
||||
}
|
||||
// Statistics for tracks killed (currently due to looping in field)
|
||||
|
||||
inline void G4Transportation::EnableShortStepOptimisation(G4bool optimiseShortStep)
|
||||
inline void
|
||||
G4Transportation::EnableShortStepOptimisation(G4bool optimiseShortStep)
|
||||
{
|
||||
fShortStepOptimisation=optimiseShortStep;
|
||||
}
|
||||
|
||||
inline void
|
||||
G4Transportation::PushThresholdsToLogger()
|
||||
{
|
||||
if( fpLogger )
|
||||
fpLogger->SetThresholds( GetThresholdWarningEnergy(),
|
||||
GetThresholdImportantEnergy(),
|
||||
GetThresholdTrials() );
|
||||
else
|
||||
ReportMissingLogger("PushThresholdsToLogger()");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user