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,v 1.4 2007/05/29 13:50:15 japost Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-04-beta-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 | G4CoupledTransportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator) |
---|
42 | { |
---|
43 | fFieldPropagator= pFieldPropagator; |
---|
44 | } |
---|
45 | |
---|
46 | inline G4PropagatorInField* G4CoupledTransportation::GetPropagatorInField() |
---|
47 | { |
---|
48 | return fFieldPropagator; |
---|
49 | } |
---|
50 | |
---|
51 | inline G4bool G4CoupledTransportation::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 G4CoupledTransportation::SetVerboseLevel( G4int verboseLev ) |
---|
62 | { |
---|
63 | fVerboseLevel= verboseLev; |
---|
64 | } |
---|
65 | |
---|
66 | inline G4int G4CoupledTransportation::GetVerboseLevel( ) const |
---|
67 | { |
---|
68 | return fVerboseLevel; |
---|
69 | } |
---|
70 | |
---|
71 | inline G4double G4CoupledTransportation::GetThresholdWarningEnergy() const |
---|
72 | { |
---|
73 | return fThreshold_Warning_Energy; |
---|
74 | } |
---|
75 | |
---|
76 | inline G4double G4CoupledTransportation::GetThresholdImportantEnergy() const |
---|
77 | { |
---|
78 | return fThreshold_Important_Energy; |
---|
79 | } |
---|
80 | |
---|
81 | inline G4int G4CoupledTransportation::GetThresholdTrials() const |
---|
82 | { |
---|
83 | return fThresholdTrials; |
---|
84 | } |
---|
85 | |
---|
86 | inline void G4CoupledTransportation::SetThresholdWarningEnergy( G4double newEnWarn ) |
---|
87 | { |
---|
88 | fThreshold_Warning_Energy= newEnWarn; |
---|
89 | } |
---|
90 | |
---|
91 | inline void G4CoupledTransportation::SetThresholdImportantEnergy( G4double newEnImp ) |
---|
92 | { |
---|
93 | fThreshold_Important_Energy = newEnImp; |
---|
94 | } |
---|
95 | |
---|
96 | inline void G4CoupledTransportation::SetThresholdTrials(G4int newMaxTrials ) |
---|
97 | { |
---|
98 | fThresholdTrials = 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 G4CoupledTransportation::GetMaxEnergyKilled() const |
---|
107 | { |
---|
108 | return fMaxEnergyKilled; |
---|
109 | } |
---|
110 | |
---|
111 | inline G4double G4CoupledTransportation::GetSumEnergyKilled() const |
---|
112 | { |
---|
113 | return fSumEnergyKilled; |
---|
114 | } |
---|
115 | |
---|
116 | inline void G4CoupledTransportation::ResetKilledStatistics(G4int report) |
---|
117 | { |
---|
118 | if( report ) { |
---|
119 | G4cout << " G4CoupledTransportation: Statistics for looping particles " << G4endl; |
---|
120 | G4cout << " Sum of energy of loopers killed: " << fSumEnergyKilled << G4endl; |
---|
121 | G4cout << " Max energy of loopers killed: " << fMaxEnergyKilled << G4endl; |
---|
122 | } |
---|
123 | |
---|
124 | fSumEnergyKilled= 0; |
---|
125 | fMaxEnergyKilled= -1.0*GeV; |
---|
126 | } |
---|
127 | // Statistics for tracks killed (currently due to looping in field) |
---|
128 | |
---|