2 // ********************************************************************
3 // * License and Disclaimer *
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. *
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. *
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 // ********************************************************************
26 /// \file exoticphysics/monopole/include/G4MonopoleTransportation.icc
27 /// \brief Implementation of the G4MonopoleTransportation class inline functions
29 // $Id: G4MonopoleTransportation.icc 68036 2013-03-13 14:13:45Z gcosmo $
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
35 // Inline function implementation.
37 // =======================================================================
38 // Created: 3 May 2010, J. Apostolakis, B. Bozsogi
39 // =======================================================================
42 #include "CLHEP/Units/SystemOfUnits.h"
45 G4MonopoleTransportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
47 fFieldPropagator= pFieldPropagator;
50 inline G4PropagatorInField* G4MonopoleTransportation::GetPropagatorInField()
52 return fFieldPropagator;
55 inline G4bool G4MonopoleTransportation::DoesGlobalFieldExist()
57 G4TransportationManager* transportMgr;
58 transportMgr= G4TransportationManager::GetTransportationManager();
60 // fFieldExists= transportMgr->GetFieldManager()->DoesFieldExist();
61 // return fFieldExists;
62 return transportMgr->GetFieldManager()->DoesFieldExist();
65 inline G4double G4MonopoleTransportation::GetThresholdWarningEnergy() const
67 return fThreshold_Warning_Energy;
70 inline G4double G4MonopoleTransportation::GetThresholdImportantEnergy() const
72 return fThreshold_Important_Energy;
75 inline G4int G4MonopoleTransportation::GetThresholdTrials() const
77 return fThresholdTrials;
80 inline void G4MonopoleTransportation::SetThresholdWarningEnergy( G4double newEnWarn )
82 fThreshold_Warning_Energy= newEnWarn;
85 inline void G4MonopoleTransportation::SetThresholdImportantEnergy( G4double newEnImp )
87 fThreshold_Important_Energy = newEnImp;
90 inline void G4MonopoleTransportation::SetThresholdTrials(G4int newMaxTrials )
92 fThresholdTrials = newMaxTrials;
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
100 inline G4double G4MonopoleTransportation::GetMaxEnergyKilled() const
102 return fMaxEnergyKilled;
105 inline G4double G4MonopoleTransportation::GetSumEnergyKilled() const
107 return fSumEnergyKilled;
110 inline void G4MonopoleTransportation::ResetKilledStatistics(G4int 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;
119 fMaxEnergyKilled= -1.0*CLHEP::GeV;
121 // Statistics for tracks killed (currently due to looping in field)
123 inline void G4MonopoleTransportation::EnableShortStepOptimisation(G4bool optimiseShortStep)
125 fShortStepOptimisation=optimiseShortStep;