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