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/// \brief This class is a slightly modified version of G4Transportation
28/// initially written by J. Apostolakis and colleagues
29/// But it should use the exact same algorithm
31// Original Author : John Apostolakis
33// Contact : Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
35// WARNING : This class is released as a prototype.
36// It might strongly evolve or even disapear in the next releases.
40// 10 Oct 2011 M.Karamitros created
42// -------------------------------------------------------------------
45G4ITTransportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
47 fFieldPropagator= pFieldPropagator;
50inline G4PropagatorInField* G4ITTransportation::GetPropagatorInField()
52 return fFieldPropagator;
55inline void G4ITTransportation::SetVerboseLevel( G4int verboseLev )
57 fVerboseLevel= verboseLev;
60inline G4int G4ITTransportation::GetVerboseLevel( ) const
65inline G4double G4ITTransportation::GetThresholdWarningEnergy() const
67 return fThreshold_Warning_Energy;
70inline G4double G4ITTransportation::GetThresholdImportantEnergy() const
72 return fThreshold_Important_Energy;
75inline G4int G4ITTransportation::GetThresholdTrials() const
77 return fThresholdTrials;
80inline void G4ITTransportation::SetThresholdWarningEnergy( G4double newEnWarn )
82 fThreshold_Warning_Energy= newEnWarn;
85inline void G4ITTransportation::SetThresholdImportantEnergy( G4double newEnImp )
87 fThreshold_Important_Energy = newEnImp;
90inline void G4ITTransportation::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
100inline G4double G4ITTransportation::GetMaxEnergyKilled() const
102 return fMaxEnergyKilled;
105inline G4double G4ITTransportation::GetSumEnergyKilled() const
107 return fSumEnergyKilled;
110inline void G4ITTransportation::ResetKilledStatistics(G4int report)
113 G4cout << " G4ITTransportation: 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)
123inline void G4ITTransportation::EnableShortStepOptimisation(G4bool optimiseShortStep)
125 fShortStepOptimisation=optimiseShortStep;