File indexing completed on 2025-01-18 09:59:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 #include <CLHEP/Units/SystemOfUnits.h>
0037 #include "G4TransportationLogger.hh"
0038
0039 inline void
0040 G4Transportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
0041 {
0042 fFieldPropagator= pFieldPropagator;
0043 }
0044
0045 inline G4PropagatorInField* G4Transportation::GetPropagatorInField()
0046 {
0047 return fFieldPropagator;
0048 }
0049
0050 inline G4double G4Transportation::GetThresholdWarningEnergy() const
0051 {
0052 return fThreshold_Warning_Energy;
0053 }
0054
0055 inline G4double G4Transportation::GetThresholdImportantEnergy() const
0056 {
0057 return fThreshold_Important_Energy;
0058 }
0059
0060 inline G4int G4Transportation::GetThresholdTrials() const
0061 {
0062 return fThresholdTrials;
0063 }
0064
0065 inline void G4Transportation::SetThresholdWarningEnergy( G4double newEnWarn )
0066 {
0067 fThreshold_Warning_Energy= newEnWarn;
0068 if( fpLogger ) {
0069 fpLogger->SetThresholdWarningEnergy( newEnWarn );
0070 } else {
0071 ReportMissingLogger("SetThresholdWarningEnergy");
0072 }
0073
0074 }
0075
0076 inline void G4Transportation::SetThresholdImportantEnergy( G4double newEnImp )
0077 {
0078 fThreshold_Important_Energy = newEnImp;
0079 if( fpLogger ) {
0080 fpLogger->SetThresholdImportantEnergy( newEnImp );
0081
0082 } else {
0083 ReportMissingLogger("SetThresholdImportantEnergy");
0084 }
0085 }
0086
0087 inline void G4Transportation::SetThresholdTrials(G4int newMaxTrials )
0088 {
0089 fThresholdTrials = newMaxTrials;
0090 if( fpLogger ) {
0091 fpLogger->SetThresholdTrials(newMaxTrials );
0092
0093 } else {
0094 ReportMissingLogger("SetThresholdTrials");
0095 }
0096 }
0097
0098 inline G4double G4Transportation::GetMaxEnergyKilled() const
0099 {
0100 return fMaxEnergyKilled;
0101 }
0102
0103 inline G4double G4Transportation::GetSumEnergyKilled() const
0104 {
0105 return fSumEnergyKilled;
0106 }
0107
0108 inline void G4Transportation::ResetKilledStatistics(G4int report)
0109 {
0110
0111
0112 if( report )
0113 {
0114 G4cout << " G4Transportation: Statistics for looping particles "
0115 << G4endl;
0116 G4cout << " Sum of energy of loopers killed: " << fSumEnergyKilled
0117 << G4endl;
0118 G4cout << " Max energy of loopers killed: " << fMaxEnergyKilled
0119 << G4endl;
0120 }
0121
0122 fSumEnergyKilled= 0;
0123 fMaxEnergyKilled= -1.0*CLHEP::GeV;
0124 }
0125
0126 inline void
0127 G4Transportation::EnableShortStepOptimisation(G4bool optimiseShortStep)
0128 {
0129 fShortStepOptimisation=optimiseShortStep;
0130 }
0131
0132 inline void
0133 G4Transportation::PushThresholdsToLogger()
0134 {
0135 if( fpLogger )
0136 fpLogger->SetThresholds( GetThresholdWarningEnergy(),
0137 GetThresholdImportantEnergy(),
0138 GetThresholdTrials() );
0139 else
0140 ReportMissingLogger("PushThresholdsToLogger()");
0141 }
0142