G4CoupledTransportation.icc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id: G4CoupledTransportation.icc 69887 2013-05-17 08:17:02Z gcosmo $
00028 //
00029 
00030 // 
00031 //
00032 //        Inline function implementation.
00033 //
00034 // =======================================================================
00035 // Created:  9 June 1998, J. Apostolakis
00036 // =======================================================================
00037 //
00038 
00039 #include <CLHEP/Units/SystemOfUnits.h>
00040 
00041 inline void
00042 G4CoupledTransportation::SetPropagatorInField( G4PropagatorInField* pFieldPropagator)
00043 {
00044    fFieldPropagator= pFieldPropagator;
00045 }
00046 
00047 inline G4PropagatorInField* G4CoupledTransportation::GetPropagatorInField()
00048 {
00049    return fFieldPropagator;
00050 }
00051 
00052 inline G4bool G4CoupledTransportation::DoesGlobalFieldExist()
00053 {
00054   G4TransportationManager* transportMgr;
00055   transportMgr= G4TransportationManager::GetTransportationManager();
00056 
00057   // fFieldExists= transportMgr->GetFieldManager()->DoesFieldExist();
00058   // return fFieldExists;
00059   return transportMgr->GetFieldManager()->DoesFieldExist();
00060 }
00061 
00062 inline void G4CoupledTransportation::SetVerboseLevel( G4int verboseLev )
00063 {
00064   fVerboseLevel= verboseLev;
00065 }
00066 
00067 inline G4int G4CoupledTransportation::GetVerboseLevel( ) const
00068 {
00069   return fVerboseLevel;
00070 }
00071 
00072 inline G4double G4CoupledTransportation::GetThresholdWarningEnergy() const
00073 {
00074   return fThreshold_Warning_Energy;
00075 }
00076  
00077 inline G4double G4CoupledTransportation::GetThresholdImportantEnergy() const
00078 { 
00079   return fThreshold_Important_Energy;
00080 } 
00081 
00082 inline G4int G4CoupledTransportation::GetThresholdTrials() const
00083 {
00084   return fThresholdTrials;
00085 }
00086 
00087 inline void G4CoupledTransportation::SetThresholdWarningEnergy( G4double newEnWarn )
00088 {
00089   fThreshold_Warning_Energy= newEnWarn;
00090 }
00091 
00092 inline void G4CoupledTransportation::SetThresholdImportantEnergy( G4double newEnImp )
00093 {
00094   fThreshold_Important_Energy = newEnImp; 
00095 }
00096 
00097 inline void G4CoupledTransportation::SetThresholdTrials(G4int newMaxTrials )
00098 {
00099   fThresholdTrials = newMaxTrials; 
00100 }
00101 
00102      // Get/Set parameters for killing loopers: 
00103      //   Above 'important' energy a 'looping' particle in field will 
00104      //   *NOT* be abandoned, except after fThresholdTrials attempts.
00105      // Below Warning energy, no verbosity for looping particles is issued
00106 
00107 inline G4double G4CoupledTransportation::GetMaxEnergyKilled() const
00108 {
00109   return fMaxEnergyKilled; 
00110 }
00111 
00112 inline G4double G4CoupledTransportation::GetSumEnergyKilled() const
00113 {
00114   return fSumEnergyKilled;
00115 }
00116 
00117 inline void G4CoupledTransportation::ResetKilledStatistics(G4int report)
00118 {
00119   if( report ) { 
00120     G4cout << " G4CoupledTransportation: Statistics for looping particles " << G4endl;
00121     G4cout << "   Sum of energy of loopers killed: " <<  fSumEnergyKilled << G4endl;
00122     G4cout << "   Max energy of loopers killed: " <<  fMaxEnergyKilled << G4endl;
00123   } 
00124 
00125   fSumEnergyKilled= 0;
00126   fMaxEnergyKilled= -1.0*CLHEP::GeV;
00127 }
00128      // Statistics for tracks killed (currently due to looping in field)
00129 
00130 
00131 inline G4bool G4CoupledTransportation::EnableUseMagneticMoment(G4bool useMoment)
00132 {
00133   G4bool lastValue= fUseMagneticMoment;
00134   fUseMagneticMoment= useMoment;
00135   return lastValue; 
00136 }

Generated on Mon May 27 17:47:58 2013 for Geant4 by  doxygen 1.4.7