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 // ********************************************************************
 
   28 /// \brief This class is a slightly modified version of G4Transportation
 
   29 ///        initially written by J. Apostolakis and colleagues
 
   30 ///        But it should use the exact same algorithm
 
   32 // Original Author : John Apostolakis
 
   34 // Contact : Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
 
   36 // WARNING : This class is released as a prototype.
 
   37 // It might strongly evolve or even disapear in the next releases.
 
   41 // 10 Oct 2011 M.Karamitros created
 
   43 // -------------------------------------------------------------------
 
   46 G4ITTransportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
 
   48    fFieldPropagator= pFieldPropagator;
 
   51 inline G4PropagatorInField* G4ITTransportation::GetPropagatorInField()
 
   53    return fFieldPropagator;
 
   56 inline void G4ITTransportation::SetVerboseLevel( G4int verboseLev )
 
   58   fVerboseLevel= verboseLev;
 
   61 inline G4int G4ITTransportation::GetVerboseLevel( ) const
 
   66 inline G4double G4ITTransportation::GetThresholdWarningEnergy() const
 
   68   return fThreshold_Warning_Energy;
 
   71 inline G4double G4ITTransportation::GetThresholdImportantEnergy() const
 
   73   return fThreshold_Important_Energy;
 
   76 inline G4int G4ITTransportation::GetThresholdTrials() const
 
   78   return fThresholdTrials;
 
   81 inline void G4ITTransportation::SetThresholdWarningEnergy( G4double newEnWarn )
 
   83   fThreshold_Warning_Energy= newEnWarn;
 
   86 inline void G4ITTransportation::SetThresholdImportantEnergy( G4double newEnImp )
 
   88   fThreshold_Important_Energy = newEnImp;
 
   91 inline void G4ITTransportation::SetThresholdTrials(G4int newMaxTrials )
 
   93   fThresholdTrials = newMaxTrials;
 
   96      // Get/Set parameters for killing loopers:
 
   97      //   Above 'important' energy a 'looping' particle in field will
 
   98      //   *NOT* be abandoned, except after fThresholdTrials attempts.
 
   99      // Below Warning energy, no verbosity for looping particles is issued
 
  101 inline G4double G4ITTransportation::GetMaxEnergyKilled() const
 
  103   return fMaxEnergyKilled;
 
  106 inline G4double G4ITTransportation::GetSumEnergyKilled() const
 
  108   return fSumEnergyKilled;
 
  111 inline void G4ITTransportation::ResetKilledStatistics(G4int report)
 
  114     G4cout << " G4ITTransportation: Statistics for looping particles " << G4endl;
 
  115     G4cout << "   Sum of energy of loopers killed: " <<  fSumEnergyKilled << G4endl;
 
  116     G4cout << "   Max energy of loopers killed: " <<  fMaxEnergyKilled << G4endl;
 
  120   fMaxEnergyKilled= -1.0*CLHEP::GeV;
 
  122      // Statistics for tracks killed (currently due to looping in field)
 
  124 inline void G4ITTransportation::EnableShortStepOptimisation(G4bool optimiseShortStep)
 
  126   fShortStepOptimisation=optimiseShortStep;