Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:33

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 /// \brief This class is a slightly modified version of G4Transportation
0028 ///        initially written by J. Apostolakis and colleagues
0029 ///        But it should use the exact same algorithm
0030 //
0031 // Original Author : John Apostolakis
0032 //
0033 // Contact : Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
0034 //
0035 // WARNING : This class is released as a prototype.
0036 // It might strongly evolve or even disapear in the next releases.
0037 //
0038 // History:
0039 // -----------
0040 // 10 Oct 2011 M.Karamitros created
0041 //
0042 // -------------------------------------------------------------------
0043 
0044 inline void
0045 G4ITTransportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
0046 {
0047    fFieldPropagator= pFieldPropagator;
0048 }
0049 
0050 inline G4PropagatorInField* G4ITTransportation::GetPropagatorInField()
0051 {
0052    return fFieldPropagator;
0053 }
0054 
0055 inline void G4ITTransportation::SetVerboseLevel( G4int verboseLev )
0056 {
0057   fVerboseLevel= verboseLev;
0058 }
0059 
0060 inline G4int G4ITTransportation::GetVerboseLevel( ) const
0061 {
0062   return fVerboseLevel;
0063 }
0064 
0065 inline G4double G4ITTransportation::GetThresholdWarningEnergy() const
0066 {
0067   return fThreshold_Warning_Energy;
0068 }
0069 
0070 inline G4double G4ITTransportation::GetThresholdImportantEnergy() const
0071 {
0072   return fThreshold_Important_Energy;
0073 }
0074 
0075 inline G4int G4ITTransportation::GetThresholdTrials() const
0076 {
0077   return fThresholdTrials;
0078 }
0079 
0080 inline void G4ITTransportation::SetThresholdWarningEnergy( G4double newEnWarn )
0081 {
0082   fThreshold_Warning_Energy= newEnWarn;
0083 }
0084 
0085 inline void G4ITTransportation::SetThresholdImportantEnergy( G4double newEnImp )
0086 {
0087   fThreshold_Important_Energy = newEnImp;
0088 }
0089 
0090 inline void G4ITTransportation::SetThresholdTrials(G4int newMaxTrials )
0091 {
0092   fThresholdTrials = newMaxTrials;
0093 }
0094 
0095      // Get/Set parameters for killing loopers:
0096      //   Above 'important' energy a 'looping' particle in field will
0097      //   *NOT* be abandoned, except after fThresholdTrials attempts.
0098      // Below Warning energy, no verbosity for looping particles is issued
0099 
0100 inline G4double G4ITTransportation::GetMaxEnergyKilled() const
0101 {
0102   return fMaxEnergyKilled;
0103 }
0104 
0105 inline G4double G4ITTransportation::GetSumEnergyKilled() const
0106 {
0107   return fSumEnergyKilled;
0108 }
0109 
0110 inline void G4ITTransportation::ResetKilledStatistics(G4int report)
0111 {
0112   if( report != 0 ) {
0113     G4cout << " G4ITTransportation: Statistics for looping particles " << G4endl;
0114     G4cout << "   Sum of energy of loopers killed: " <<  fSumEnergyKilled << G4endl;
0115     G4cout << "   Max energy of loopers killed: " <<  fMaxEnergyKilled << G4endl;
0116   }
0117 
0118   fSumEnergyKilled= 0;
0119   fMaxEnergyKilled= -1.0*CLHEP::GeV;
0120 }
0121      // Statistics for tracks killed (currently due to looping in field)
0122 
0123 inline void G4ITTransportation::EnableShortStepOptimisation(G4bool optimiseShortStep)
0124 {
0125   fShortStepOptimisation=optimiseShortStep;
0126 }