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// ********************************************************************
27// $Id: G4mplAtlasTransportation.icc 526171 2012-11-15 18:33:35Z zmarshal $
28// GEANT4 tag $Name: geant4-09-03-patch-01 $
33// Inline function implementation.
35// =======================================================================
36// Created: 9 June 1998, J. Apostolakis
37// =======================================================================
40#include "CLHEP/Units/SystemOfUnits.h"
43G4mplAtlasTransportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
45 fFieldPropagator= pFieldPropagator;
48inline G4PropagatorInField* G4mplAtlasTransportation::GetPropagatorInField()
50 return fFieldPropagator;
53inline G4bool G4mplAtlasTransportation::DoesGlobalFieldExist()
55 G4TransportationManager* transportMgr;
56 transportMgr= G4TransportationManager::GetTransportationManager();
58 // fFieldExists= transportMgr->GetFieldManager()->DoesFieldExist();
59 // return fFieldExists;
60 return transportMgr->GetFieldManager()->DoesFieldExist();
63inline void G4mplAtlasTransportation::SetVerboseLevel( G4int verboseLev )
65 fVerboseLevel= verboseLev;
68inline G4int G4mplAtlasTransportation::GetVerboseLevel( ) const
73inline G4double G4mplAtlasTransportation::GetThresholdWarningEnergy() const
75 return fThreshold_Warning_Energy;
78inline G4double G4mplAtlasTransportation::GetThresholdImportantEnergy() const
80 return fThreshold_Important_Energy;
83inline G4int G4mplAtlasTransportation::GetThresholdTrials() const
85 return fThresholdTrials;
88inline void G4mplAtlasTransportation::SetThresholdWarningEnergy( G4double newEnWarn )
90 fThreshold_Warning_Energy= newEnWarn;
93inline void G4mplAtlasTransportation::SetThresholdImportantEnergy( G4double newEnImp )
95 fThreshold_Important_Energy = newEnImp;
98inline void G4mplAtlasTransportation::SetThresholdTrials(G4int newMaxTrials )
100 fThresholdTrials = newMaxTrials;
103// Get/Set parameters for killing loopers:
104// Above 'important' energy a 'looping' particle in field will
105// *NOT* be abandoned, except after fThresholdTrials attempts.
106// Below Warning energy, no verbosity for looping particles is issued
108inline G4double G4mplAtlasTransportation::GetMaxEnergyKilled() const
110 return fMaxEnergyKilled;
113inline G4double G4mplAtlasTransportation::GetSumEnergyKilled() const
115 return fSumEnergyKilled;
118inline void G4mplAtlasTransportation::ResetKilledStatistics(G4int report)
121 G4cout << " G4mplAtlasTransportation: Statistics for looping particles " << G4endl;
122 G4cout << " Sum of energy of loopers killed: " << fSumEnergyKilled << G4endl;
123 G4cout << " Max energy of loopers killed: " << fMaxEnergyKilled << G4endl;
127 fMaxEnergyKilled= -1.0*CLHEP::GeV;
129// Statistics for tracks killed (currently due to looping in field)
131inline void G4mplAtlasTransportation::EnableShortStepOptimisation(G4bool optimiseShortStep)
133 fShortStepOptimisation=optimiseShortStep;