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