Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:21:12

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 /// \file exoticphysics/monopole/include/G4MonopoleTransportation.icc
0027 /// \brief Implementation of the G4MonopoleTransportation class inline functions
0028 //
0029 //
0030 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0031 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0032 
0033 //
0034 //        Inline function implementation.
0035 //
0036 // =======================================================================
0037 // Created:  3 May 2010, J. Apostolakis, B. Bozsogi
0038 // =======================================================================
0039 //
0040 
0041 #include "CLHEP/Units/SystemOfUnits.h"
0042 
0043 inline void
0044 G4MonopoleTransportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
0045 {
0046    fFieldPropagator= pFieldPropagator;
0047 }
0048 
0049 inline G4PropagatorInField* G4MonopoleTransportation::GetPropagatorInField()
0050 {
0051    return fFieldPropagator;
0052 }
0053 
0054 inline G4bool G4MonopoleTransportation::DoesGlobalFieldExist()
0055 {
0056   G4TransportationManager* transportMgr;
0057   transportMgr= G4TransportationManager::GetTransportationManager();
0058 
0059   // fFieldExists= transportMgr->GetFieldManager()->DoesFieldExist();
0060   // return fFieldExists;
0061   return transportMgr->GetFieldManager()->DoesFieldExist();
0062 }
0063 
0064 inline G4double G4MonopoleTransportation::GetThresholdWarningEnergy() const
0065 {
0066   return fThreshold_Warning_Energy;
0067 }
0068  
0069 inline G4double G4MonopoleTransportation::GetThresholdImportantEnergy() const
0070 { 
0071   return fThreshold_Important_Energy;
0072 } 
0073 
0074 inline G4int G4MonopoleTransportation::GetThresholdTrials() const
0075 {
0076   return fThresholdTrials;
0077 }
0078 
0079 inline void G4MonopoleTransportation::SetThresholdWarningEnergy( G4double newEnWarn )
0080 {
0081   fThreshold_Warning_Energy= newEnWarn;
0082 }
0083 
0084 inline void G4MonopoleTransportation::SetThresholdImportantEnergy( G4double newEnImp )
0085 {
0086   fThreshold_Important_Energy = newEnImp; 
0087 }
0088 
0089 inline void G4MonopoleTransportation::SetThresholdTrials(G4int newMaxTrials )
0090 {
0091   fThresholdTrials = newMaxTrials; 
0092 }
0093 
0094      // Get/Set parameters for killing loopers: 
0095      //   Above 'important' energy a 'looping' particle in field will 
0096      //   *NOT* be abandoned, except after fThresholdTrials attempts.
0097      // Below Warning energy, no verbosity for looping particles is issued
0098 
0099 inline G4double G4MonopoleTransportation::GetMaxEnergyKilled() const
0100 {
0101   return fMaxEnergyKilled; 
0102 }
0103 
0104 inline G4double G4MonopoleTransportation::GetSumEnergyKilled() const
0105 {
0106   return fSumEnergyKilled;
0107 }
0108 
0109 inline void G4MonopoleTransportation::ResetKilledStatistics(G4int report)
0110 {
0111   if( report ) { 
0112     G4cout << " G4MonopoleTransportation: Statistics for looping particles " << G4endl;
0113     G4cout << "   Sum of energy of loopers killed: " <<  fSumEnergyKilled << G4endl;
0114     G4cout << "   Max energy of loopers killed: " <<  fMaxEnergyKilled << G4endl;
0115   } 
0116 
0117   fSumEnergyKilled= 0;
0118   fMaxEnergyKilled= -1.0*CLHEP::GeV;
0119 }
0120      // Statistics for tracks killed (currently due to looping in field)
0121 
0122 inline void G4MonopoleTransportation::EnableShortStepOptimisation(G4bool optimiseShortStep)
0123 { 
0124   fShortStepOptimisation=optimiseShortStep;
0125 }