2// ********************************************************************
3// * License and Disclaimer *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
29// Inline function implementation.
31// =======================================================================
32// Created: 9 June 1998, J. Apostolakis
33// =======================================================================
35#include <CLHEP/Units/SystemOfUnits.h>
36#include "G4TransportationLogger.hh"
37#include "G4FieldManagerStore.hh"
39inline void G4CoupledTransportation::
40SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
42 fFieldPropagator= pFieldPropagator;
45inline G4PropagatorInField* G4CoupledTransportation::GetPropagatorInField()
47 return fFieldPropagator;
50inline G4bool G4CoupledTransportation::DoesAnyFieldExist()
52 G4FieldManagerStore* fieldMgrStore= G4FieldManagerStore::GetInstance();
53 return fieldMgrStore->size() > 0;
56inline G4double G4CoupledTransportation::GetThresholdWarningEnergy() const
58 return fThreshold_Warning_Energy;
61inline G4double G4CoupledTransportation::GetThresholdImportantEnergy() const
63 return fThreshold_Important_Energy;
66inline G4int G4CoupledTransportation::GetThresholdTrials() const
68 return fThresholdTrials;
71inline void G4CoupledTransportation::SetThresholdWarningEnergy( G4double newEnWarn )
73 fThreshold_Warning_Energy= newEnWarn;
75 fpLogger->SetThresholdWarningEnergy( newEnWarn );
77 ReportMissingLogger("SetThresholdWarningEnergy");
79 // Update the information for correct reporting
82inline void G4CoupledTransportation::SetThresholdImportantEnergy( G4double newEnImp )
84 fThreshold_Important_Energy = newEnImp;
86 fpLogger->SetThresholdImportantEnergy( newEnImp );
87 // Update the information for correct reporting
89 ReportMissingLogger("SetThresholdImportantEnergy");
93inline void G4CoupledTransportation::SetThresholdTrials(G4int newMaxTrials )
95 fThresholdTrials = newMaxTrials;
97 fpLogger->SetThresholdTrials(newMaxTrials );
98 // Update the information for correct reporting
100 ReportMissingLogger("SetThresholdTrials");
104inline G4double G4CoupledTransportation::GetMaxEnergyKilled() const
106 return fMaxEnergyKilled;
109inline G4double G4CoupledTransportation::GetSumEnergyKilled() const
111 return fSumEnergyKilled;
114inline void G4CoupledTransportation::ResetKilledStatistics(G4int report)
116 // Statistics for tracks killed (currently due to looping in field)
120 G4cout << " G4CoupledTransportation: Statistics for looping particles "
122 G4cout << " Sum of energy of loopers killed: " << fSumEnergyKilled
124 G4cout << " Max energy of loopers killed: " << fMaxEnergyKilled
128 fMaxEnergyKilled= -1.0*CLHEP::GeV;
132G4CoupledTransportation::PushThresholdsToLogger()
135 fpLogger->SetThresholds( GetThresholdWarningEnergy(),
136 GetThresholdImportantEnergy(),
137 GetThresholdTrials() );
139 ReportMissingLogger("PushThresholdsToLogger()");