Geant4  10.00.p01
G4MonopoleTransportation.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 /// \file exoticphysics/monopole/include/G4MonopoleTransportation.icc
27 /// \brief Implementation of the G4MonopoleTransportation class inline functions
28 //
29 // $Id: G4MonopoleTransportation.icc 68036 2013-03-13 14:13:45Z gcosmo $
30 //
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 //
35 // Inline function implementation.
36 //
37 // =======================================================================
38 // Created: 3 May 2010, J. Apostolakis, B. Bozsogi
39 // =======================================================================
40 //
41 
42 #include "CLHEP/Units/SystemOfUnits.h"
43 
44 inline void
45 G4MonopoleTransportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
46 {
47  fFieldPropagator= pFieldPropagator;
48 }
49 
50 inline G4PropagatorInField* G4MonopoleTransportation::GetPropagatorInField()
51 {
52  return fFieldPropagator;
53 }
54 
55 inline G4bool G4MonopoleTransportation::DoesGlobalFieldExist()
56 {
57  G4TransportationManager* transportMgr;
58  transportMgr= G4TransportationManager::GetTransportationManager();
59 
60  // fFieldExists= transportMgr->GetFieldManager()->DoesFieldExist();
61  // return fFieldExists;
62  return transportMgr->GetFieldManager()->DoesFieldExist();
63 }
64 
65 inline G4double G4MonopoleTransportation::GetThresholdWarningEnergy() const
66 {
67  return fThreshold_Warning_Energy;
68 }
69 
70 inline G4double G4MonopoleTransportation::GetThresholdImportantEnergy() const
71 {
72  return fThreshold_Important_Energy;
73 }
74 
75 inline G4int G4MonopoleTransportation::GetThresholdTrials() const
76 {
77  return fThresholdTrials;
78 }
79 
80 inline void G4MonopoleTransportation::SetThresholdWarningEnergy( G4double newEnWarn )
81 {
82  fThreshold_Warning_Energy= newEnWarn;
83 }
84 
85 inline void G4MonopoleTransportation::SetThresholdImportantEnergy( G4double newEnImp )
86 {
87  fThreshold_Important_Energy = newEnImp;
88 }
89 
90 inline void G4MonopoleTransportation::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 
100 inline G4double G4MonopoleTransportation::GetMaxEnergyKilled() const
101 {
102  return fMaxEnergyKilled;
103 }
104 
105 inline G4double G4MonopoleTransportation::GetSumEnergyKilled() const
106 {
107  return fSumEnergyKilled;
108 }
109 
110 inline void G4MonopoleTransportation::ResetKilledStatistics(G4int report)
111 {
112  if( report ) {
113  G4cout << " G4MonopoleTransportation: 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 
123 inline void G4MonopoleTransportation::EnableShortStepOptimisation(G4bool optimiseShortStep)
124 {
125  fShortStepOptimisation=optimiseShortStep;
126 }