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