Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
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 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
44inline void G4MonopoleTransportation::SetPropagatorInField(
45 G4PropagatorInField* pFieldPropagator)
46{
47 fFieldPropagator = pFieldPropagator;
48}
49
50inline G4PropagatorInField* G4MonopoleTransportation::GetPropagatorInField()
51{
52 return fFieldPropagator;
53}
54
55inline 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
65inline G4double G4MonopoleTransportation::GetThresholdWarningEnergy() const
66{
67 return fThreshold_Warning_Energy;
68}
69
70inline G4double G4MonopoleTransportation::GetThresholdImportantEnergy() const
71{
72 return fThreshold_Important_Energy;
73}
74
75inline G4int G4MonopoleTransportation::GetThresholdTrials() const
76{
77 return fThresholdTrials;
78}
79
80inline void G4MonopoleTransportation::SetThresholdWarningEnergy(
81 G4double newEnWarn)
82{
83 fThreshold_Warning_Energy = newEnWarn;
84}
85
86inline void G4MonopoleTransportation::SetThresholdImportantEnergy(
87 G4double newEnImp)
88{
89 fThreshold_Important_Energy = newEnImp;
90}
91
92inline void G4MonopoleTransportation::SetThresholdTrials(G4int newMaxTrials)
93{
94 fThresholdTrials = newMaxTrials;
95}
96
97// Get/Set parameters for killing loopers:
98// Above 'important' energy a 'looping' particle in field will
99// *NOT* be abandoned, except after fThresholdTrials attempts.
100// Below Warning energy, no verbosity for looping particles is issued
101
102inline G4double G4MonopoleTransportation::GetMaxEnergyKilled() const
103{
104 return fMaxEnergyKilled;
105}
106
107inline G4double G4MonopoleTransportation::GetSumEnergyKilled() const
108{
109 return fSumEnergyKilled;
110}
111
112inline void G4MonopoleTransportation::ResetKilledStatistics(G4int report)
113{
114 if (report) {
115 G4cout << " G4MonopoleTransportation: Statistics for looping particles "
116 << G4endl;
117 G4cout << " Sum of energy of loopers killed: " << fSumEnergyKilled
118 << G4endl;
119 G4cout << " Max energy of loopers killed: " << fMaxEnergyKilled << G4endl;
120 }
121
122 fSumEnergyKilled = 0;
123 fMaxEnergyKilled = -1.0 * CLHEP::GeV;
124}
125// Statistics for tracks killed (currently due to looping in field)
126
127inline void G4MonopoleTransportation::EnableShortStepOptimisation(
128 G4bool optimiseShortStep)
129{
130 fShortStepOptimisation = optimiseShortStep;
131}