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 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"
44inline void G4MonopoleTransportation::SetPropagatorInField(
45 G4PropagatorInField* pFieldPropagator)
47 fFieldPropagator = pFieldPropagator;
50inline G4PropagatorInField* G4MonopoleTransportation::GetPropagatorInField()
52 return fFieldPropagator;
55inline G4bool G4MonopoleTransportation::DoesGlobalFieldExist()
57 G4TransportationManager* transportMgr;
58 transportMgr = G4TransportationManager::GetTransportationManager();
60 // fFieldExists= transportMgr->GetFieldManager()->DoesFieldExist();
61 // return fFieldExists;
62 return transportMgr->GetFieldManager()->DoesFieldExist();
65inline G4double G4MonopoleTransportation::GetThresholdWarningEnergy() const
67 return fThreshold_Warning_Energy;
70inline G4double G4MonopoleTransportation::GetThresholdImportantEnergy() const
72 return fThreshold_Important_Energy;
75inline G4int G4MonopoleTransportation::GetThresholdTrials() const
77 return fThresholdTrials;
80inline void G4MonopoleTransportation::SetThresholdWarningEnergy(
83 fThreshold_Warning_Energy = newEnWarn;
86inline void G4MonopoleTransportation::SetThresholdImportantEnergy(
89 fThreshold_Important_Energy = newEnImp;
92inline void G4MonopoleTransportation::SetThresholdTrials(G4int newMaxTrials)
94 fThresholdTrials = newMaxTrials;
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
102inline G4double G4MonopoleTransportation::GetMaxEnergyKilled() const
104 return fMaxEnergyKilled;
107inline G4double G4MonopoleTransportation::GetSumEnergyKilled() const
109 return fSumEnergyKilled;
112inline void G4MonopoleTransportation::ResetKilledStatistics(G4int report)
115 G4cout << " G4MonopoleTransportation: Statistics for looping particles "
117 G4cout << " Sum of energy of loopers killed: " << fSumEnergyKilled
119 G4cout << " Max energy of loopers killed: " << fMaxEnergyKilled << G4endl;
122 fSumEnergyKilled = 0;
123 fMaxEnergyKilled = -1.0 * CLHEP::GeV;
125// Statistics for tracks killed (currently due to looping in field)
127inline void G4MonopoleTransportation::EnableShortStepOptimisation(
128 G4bool optimiseShortStep)
130 fShortStepOptimisation = optimiseShortStep;