Geant4  10.01.p01
G4CoupledTransportation.icc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
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. *
10 // * *
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. *
17 // * *
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 // ********************************************************************
25 //
26 //
27 // $Id: G4CoupledTransportation.icc 84478 2014-10-16 08:49:24Z gcosmo $
28 //
29 
30 //
31 //
32 // Inline function implementation.
33 //
34 // =======================================================================
35 // Created: 9 June 1998, J. Apostolakis
36 // =======================================================================
37 //
38 
39 #include <CLHEP/Units/SystemOfUnits.h>
40 
41 inline void
42 G4CoupledTransportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
43 {
44  fFieldPropagator= pFieldPropagator;
45 }
46 
47 inline G4PropagatorInField* G4CoupledTransportation::GetPropagatorInField()
48 {
49  return fFieldPropagator;
50 }
51 
52 inline G4bool G4CoupledTransportation::DoesGlobalFieldExist()
53 {
54  G4TransportationManager* transportMgr;
55  transportMgr= G4TransportationManager::GetTransportationManager();
56 
57  // fFieldExists= transportMgr->GetFieldManager()->DoesFieldExist();
58  // return fFieldExists;
59  return transportMgr->GetFieldManager()->DoesFieldExist();
60 }
61 
62 inline void G4CoupledTransportation::SetVerboseLevel( G4int verboseLev )
63 {
64  fVerboseLevel= verboseLev;
65 }
66 
67 inline G4int G4CoupledTransportation::GetVerboseLevel( ) const
68 {
69  return fVerboseLevel;
70 }
71 
72 inline G4double G4CoupledTransportation::GetThresholdWarningEnergy() const
73 {
74  return fThreshold_Warning_Energy;
75 }
76 
77 inline G4double G4CoupledTransportation::GetThresholdImportantEnergy() const
78 {
79  return fThreshold_Important_Energy;
80 }
81 
82 inline G4int G4CoupledTransportation::GetThresholdTrials() const
83 {
84  return fThresholdTrials;
85 }
86 
87 inline void G4CoupledTransportation::SetThresholdWarningEnergy( G4double newEnWarn )
88 {
89  fThreshold_Warning_Energy= newEnWarn;
90 }
91 
92 inline void G4CoupledTransportation::SetThresholdImportantEnergy( G4double newEnImp )
93 {
94  fThreshold_Important_Energy = newEnImp;
95 }
96 
97 inline void G4CoupledTransportation::SetThresholdTrials(G4int newMaxTrials )
98 {
99  fThresholdTrials = newMaxTrials;
100 }
101 
102  // Get/Set parameters for killing loopers:
103  // Above 'important' energy a 'looping' particle in field will
104  // *NOT* be abandoned, except after fThresholdTrials attempts.
105  // Below Warning energy, no verbosity for looping particles is issued
106 
107 inline G4double G4CoupledTransportation::GetMaxEnergyKilled() const
108 {
109  return fMaxEnergyKilled;
110 }
111 
112 inline G4double G4CoupledTransportation::GetSumEnergyKilled() const
113 {
114  return fSumEnergyKilled;
115 }
116 
117 inline void G4CoupledTransportation::ResetKilledStatistics(G4int report)
118 {
119  if( report ) {
120  G4cout << " G4CoupledTransportation: Statistics for looping particles " << G4endl;
121  G4cout << " Sum of energy of loopers killed: " << fSumEnergyKilled << G4endl;
122  G4cout << " Max energy of loopers killed: " << fMaxEnergyKilled << G4endl;
123  }
124 
125  fSumEnergyKilled= 0;
126  fMaxEnergyKilled= -1.0*CLHEP::GeV;
127 }
128  // Statistics for tracks killed (currently due to looping in field)
129 
130