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: QuirkTransportation.icc 583415 2014-02-14 16:44:26Z jblack $
28 // GEANT4 tag $Name: geant4-09-04-patch-01 $
33 // Inline function implementation.
35 // =======================================================================
36 // Created: 9 June 1998, J. Apostolakis
37 // =======================================================================
41 QuirkTransportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
43 m_fieldPropagator= pFieldPropagator;
46 inline G4PropagatorInField* QuirkTransportation::GetPropagatorInField()
48 return m_fieldPropagator;
51 inline G4bool QuirkTransportation::DoesGlobalFieldExist()
53 G4TransportationManager* transportMgr;
54 transportMgr= G4TransportationManager::GetTransportationManager();
56 // fFieldExists= transportMgr->GetFieldManager()->DoesFieldExist();
57 // return fFieldExists;
58 return transportMgr->GetFieldManager()->DoesFieldExist();
61 inline void QuirkTransportation::SetVerboseLevel( G4int verboseLev )
63 m_verboseLevel= verboseLev;
66 inline G4int QuirkTransportation::GetVerboseLevel( ) const
68 return m_verboseLevel;
71 inline G4double QuirkTransportation::GetThresholdWarningEnergy() const
73 return m_threshold_Warning_Energy;
76 inline G4double QuirkTransportation::GetThresholdImportantEnergy() const
78 return m_threshold_Important_Energy;
81 inline G4int QuirkTransportation::GetThresholdTrials() const
83 return m_thresholdTrials;
86 inline void QuirkTransportation::SetThresholdWarningEnergy( G4double newEnWarn )
88 m_threshold_Warning_Energy= newEnWarn;
91 inline void QuirkTransportation::SetThresholdImportantEnergy( G4double newEnImp )
93 m_threshold_Important_Energy = newEnImp;
96 inline void QuirkTransportation::SetThresholdTrials(G4int newMaxTrials )
98 m_thresholdTrials = newMaxTrials;
101 // Get/Set parameters for killing loopers:
102 // Above 'important' energy a 'looping' particle in field will
103 // *NOT* be abandoned, except after fThresholdTrials attempts.
104 // Below Warning energy, no verbosity for looping particles is issued
106 inline G4double QuirkTransportation::GetMaxEnergyKilled() const
108 return m_maxEnergyKilled;
111 inline G4double QuirkTransportation::GetSumEnergyKilled() const
113 return m_sumEnergyKilled;
116 inline void QuirkTransportation::ResetKilledStatistics(G4int report)
119 G4cout << " QuirkTransportation: Statistics for looping particles " << G4endl;
120 G4cout << " Sum of energy of loopers killed: " << m_sumEnergyKilled << G4endl;
121 G4cout << " Max energy of loopers killed: " << m_maxEnergyKilled << G4endl;
124 m_sumEnergyKilled= 0;
125 m_maxEnergyKilled= -1.0*CLHEP::GeV;
127 // Statistics for tracks killed (currently due to looping in field)
129 inline void QuirkTransportation::EnableShortStepOptimisation(G4bool optimiseShortStep)
131 m_shortStepOptimisation=optimiseShortStep;