Geant4  10.02.p02
G4ITTransportation.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 // $Id$
27 //
28 /// \brief This class is a slightly modified version of G4Transportation
29 /// initially written by J. Apostolakis and colleagues
30 /// But it should use the exact same algorithm
31 //
32 // Original Author : John Apostolakis
33 //
34 // Contact : Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
35 //
36 // WARNING : This class is released as a prototype.
37 // It might strongly evolve or even disapear in the next releases.
38 //
39 // History:
40 // -----------
41 // 10 Oct 2011 M.Karamitros created
42 //
43 // -------------------------------------------------------------------
44 
45 inline void
46 G4ITTransportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
47 {
48  fFieldPropagator= pFieldPropagator;
49 }
50 
51 inline G4PropagatorInField* G4ITTransportation::GetPropagatorInField()
52 {
53  return fFieldPropagator;
54 }
55 
56 inline void G4ITTransportation::SetVerboseLevel( G4int verboseLev )
57 {
58  fVerboseLevel= verboseLev;
59 }
60 
61 inline G4int G4ITTransportation::GetVerboseLevel( ) const
62 {
63  return fVerboseLevel;
64 }
65 
66 inline G4double G4ITTransportation::GetThresholdWarningEnergy() const
67 {
68  return fThreshold_Warning_Energy;
69 }
70 
71 inline G4double G4ITTransportation::GetThresholdImportantEnergy() const
72 {
73  return fThreshold_Important_Energy;
74 }
75 
76 inline G4int G4ITTransportation::GetThresholdTrials() const
77 {
78  return fThresholdTrials;
79 }
80 
81 inline void G4ITTransportation::SetThresholdWarningEnergy( G4double newEnWarn )
82 {
83  fThreshold_Warning_Energy= newEnWarn;
84 }
85 
86 inline void G4ITTransportation::SetThresholdImportantEnergy( G4double newEnImp )
87 {
88  fThreshold_Important_Energy = newEnImp;
89 }
90 
91 inline void G4ITTransportation::SetThresholdTrials(G4int newMaxTrials )
92 {
93  fThresholdTrials = newMaxTrials;
94 }
95 
96  // Get/Set parameters for killing loopers:
97  // Above 'important' energy a 'looping' particle in field will
98  // *NOT* be abandoned, except after fThresholdTrials attempts.
99  // Below Warning energy, no verbosity for looping particles is issued
100 
101 inline G4double G4ITTransportation::GetMaxEnergyKilled() const
102 {
103  return fMaxEnergyKilled;
104 }
105 
106 inline G4double G4ITTransportation::GetSumEnergyKilled() const
107 {
108  return fSumEnergyKilled;
109 }
110 
111 inline void G4ITTransportation::ResetKilledStatistics(G4int report)
112 {
113  if( report ) {
114  G4cout << " G4ITTransportation: Statistics for looping particles " << G4endl;
115  G4cout << " Sum of energy of loopers killed: " << fSumEnergyKilled << G4endl;
116  G4cout << " Max energy of loopers killed: " << fMaxEnergyKilled << G4endl;
117  }
118 
119  fSumEnergyKilled= 0;
120  fMaxEnergyKilled= -1.0*CLHEP::GeV;
121 }
122  // Statistics for tracks killed (currently due to looping in field)
123 
124 inline void G4ITTransportation::EnableShortStepOptimisation(G4bool optimiseShortStep)
125 {
126  fShortStepOptimisation=optimiseShortStep;
127 }