G4FieldManager Class Reference

#include <G4FieldManager.hh>


Public Member Functions

 G4FieldManager (G4Field *detectorField=0, G4ChordFinder *pChordFinder=0, G4bool b=true)
 G4FieldManager (G4MagneticField *detectorMagneticField)
virtual ~G4FieldManager ()
G4bool SetDetectorField (G4Field *detectorField)
const G4FieldGetDetectorField () const
G4bool DoesFieldExist () const
void CreateChordFinder (G4MagneticField *detectorMagField)
void SetChordFinder (G4ChordFinder *aChordFinder)
G4ChordFinderGetChordFinder ()
const G4ChordFinderGetChordFinder () const
virtual void ConfigureForTrack (const G4Track *)
G4double GetDeltaIntersection () const
G4double GetDeltaOneStep () const
void SetAccuraciesWithDeltaOneStep (G4double valDeltaOneStep)
void SetDeltaOneStep (G4double valueD1step)
void SetDeltaIntersection (G4double valueDintersection)
G4double GetMinimumEpsilonStep () const
void SetMinimumEpsilonStep (G4double newEpsMin)
G4double GetMaximumEpsilonStep () const
void SetMaximumEpsilonStep (G4double newEpsMax)
G4bool DoesFieldChangeEnergy () const
void SetFieldChangesEnergy (G4bool value)


Detailed Description

Definition at line 83 of file G4FieldManager.hh.


Constructor & Destructor Documentation

G4FieldManager::G4FieldManager ( G4Field detectorField = 0,
G4ChordFinder pChordFinder = 0,
G4bool  b = true 
)

Definition at line 37 of file G4FieldManager.cc.

References G4Field::DoesFieldChangeEnergy(), and G4FieldManagerStore::Register().

00041    : fDetectorField(detectorField), 
00042      fChordFinder(pChordFinder), 
00043      fAllocatedChordFinder(false),
00044      fEpsilonMinDefault(5.0e-5), 
00045      fEpsilonMaxDefault(0.001),
00046      fDefault_Delta_One_Step_Value(0.01),    // mm
00047      fDefault_Delta_Intersection_Val(0.001), // mm
00048      fEpsilonMin( fEpsilonMinDefault ),
00049      fEpsilonMax( fEpsilonMaxDefault)
00050 { 
00051    fDelta_One_Step_Value= fDefault_Delta_One_Step_Value;
00052    fDelta_Intersection_Val= fDefault_Delta_Intersection_Val;
00053    if ( detectorField )
00054      fFieldChangesEnergy= detectorField->DoesFieldChangeEnergy();
00055    else
00056      fFieldChangesEnergy= fieldChangesEnergy;
00057 
00058    // Add to store
00059    G4FieldManagerStore::Register(this);
00060 }

G4FieldManager::G4FieldManager ( G4MagneticField detectorMagneticField  ) 

Definition at line 62 of file G4FieldManager.cc.

References G4FieldManagerStore::Register().

00063    : fDetectorField(detectorField), fAllocatedChordFinder(true),
00064      fEpsilonMinDefault(5.0e-5), 
00065      fEpsilonMaxDefault(0.001),
00066      fFieldChangesEnergy(false), 
00067      fDefault_Delta_One_Step_Value(0.01),    // mm
00068      fDefault_Delta_Intersection_Val(0.001), // mm
00069      fEpsilonMin( fEpsilonMinDefault ),
00070      fEpsilonMax( fEpsilonMaxDefault)
00071 {
00072    fChordFinder= new G4ChordFinder( detectorField );
00073    fDelta_One_Step_Value= fDefault_Delta_One_Step_Value;
00074    fDelta_Intersection_Val= fDefault_Delta_Intersection_Val;
00075    // Add to store
00076    G4FieldManagerStore::Register(this);
00077 }

G4FieldManager::~G4FieldManager (  )  [virtual]

Definition at line 85 of file G4FieldManager.cc.

References G4FieldManagerStore::DeRegister().

00086 {
00087    if( fAllocatedChordFinder ){
00088       delete fChordFinder;
00089    }
00090    G4FieldManagerStore::DeRegister(this);
00091 }


Member Function Documentation

void G4FieldManager::ConfigureForTrack ( const G4Track  )  [virtual]

Definition at line 79 of file G4FieldManager.cc.

Referenced by G4Transportation::AlongStepGetPhysicalInteractionLength(), G4ITTransportation::AlongStepGetPhysicalInteractionLength(), and G4CoupledTransportation::AlongStepGetPhysicalInteractionLength().

00080 {
00081    // Default is to do nothing!
00082    ;
00083 }

void G4FieldManager::CreateChordFinder ( G4MagneticField detectorMagField  ) 

Definition at line 94 of file G4FieldManager.cc.

00095 {
00096    if ( fAllocatedChordFinder )
00097       delete fChordFinder;
00098    fChordFinder= new G4ChordFinder( detectorMagField );
00099    fAllocatedChordFinder= true;
00100 }

G4bool G4FieldManager::DoesFieldChangeEnergy (  )  const [inline]

Definition at line 96 of file G4FieldManager.icc.

Referenced by G4Transportation::AlongStepGetPhysicalInteractionLength(), and G4CoupledTransportation::AlongStepGetPhysicalInteractionLength().

00097 { return fFieldChangesEnergy;}

G4bool G4FieldManager::DoesFieldExist (  )  const [inline]

Definition at line 42 of file G4FieldManager.icc.

Referenced by G4Transportation::DoesGlobalFieldExist(), G4ITTransportation::DoesGlobalFieldExist(), and G4CoupledTransportation::DoesGlobalFieldExist().

00043 { 
00044    return (fDetectorField != 0);
00045 } 

const G4ChordFinder * G4FieldManager::GetChordFinder (  )  const [inline]

Definition at line 60 of file G4FieldManager.icc.

00061 {
00062      return fChordFinder;
00063 }

G4ChordFinder * G4FieldManager::GetChordFinder (  )  [inline]

Definition at line 54 of file G4FieldManager.icc.

Referenced by G4PropagatorInField::GetChordFinder(), and G4ErrorPropagatorManager::InitFieldForBackwards().

00055 {  
00056      return fChordFinder;
00057 }

G4double G4FieldManager::GetDeltaIntersection (  )  const [inline]

Definition at line 66 of file G4FieldManager.icc.

Referenced by G4PropagatorInField::GetDeltaIntersection(), and G4PropagatorInField::RefreshIntersectionLocator().

00067 {
00068      return fDelta_Intersection_Val;
00069 }

G4double G4FieldManager::GetDeltaOneStep (  )  const [inline]

Definition at line 72 of file G4FieldManager.icc.

Referenced by G4PropagatorInField::ComputeStep(), and G4PropagatorInField::GetDeltaOneStep().

00073 {
00074      return fDelta_One_Step_Value;
00075 }

const G4Field * G4FieldManager::GetDetectorField (  )  const [inline]

Definition at line 35 of file G4FieldManager.icc.

Referenced by G4Transportation::AlongStepGetPhysicalInteractionLength(), G4ITTransportation::AlongStepGetPhysicalInteractionLength(), G4CoupledTransportation::AlongStepGetPhysicalInteractionLength(), G4ErrorSurfaceTrajState::BuildErrorMatrix(), G4PathFinder::ComputeStep(), G4DecayWithSpin::DecayIt(), G4ErrorFreeTrajState::G4ErrorFreeTrajState(), G4SynchrotronRadiationInMat::GetMeanFreePath(), G4SynchrotronRadiation::GetMeanFreePath(), G4SynchrotronRadiationInMat::GetPhotonEnergy(), G4QSynchRad::GetRadius(), G4ErrorPropagatorManager::InitFieldForBackwards(), G4SynchrotronRadiationInMat::PostStepDoIt(), G4SynchrotronRadiation::PostStepDoIt(), G4ErrorMagFieldLimitProcess::PostStepGetPhysicalInteractionLength(), and G4ErrorFreeTrajState::PropagateError().

00036 { 
00037    // If pointer is null, should this raise an exception ??
00038    return fDetectorField;
00039 } 

G4double G4FieldManager::GetMaximumEpsilonStep (  )  const [inline]

Definition at line 122 of file G4FieldManager.icc.

Referenced by G4PropagatorInField::ComputeStep(), G4PropagatorInField::G4PropagatorInField(), and G4PropagatorInField::GetMaximumEpsilonStep().

00123 {
00124   return fEpsilonMax; 
00125 }

G4double G4FieldManager::GetMinimumEpsilonStep (  )  const [inline]

Definition at line 106 of file G4FieldManager.icc.

Referenced by G4PropagatorInField::ComputeStep(), and G4PropagatorInField::GetMinimumEpsilonStep().

00107 {
00108   return fEpsilonMin; 
00109 }

void G4FieldManager::SetAccuraciesWithDeltaOneStep ( G4double  valDeltaOneStep  )  [inline]

Definition at line 90 of file G4FieldManager.icc.

00091 { 
00092       fDelta_One_Step_Value= valDeltaOneStep;  
00093       fDelta_Intersection_Val = 0.4 * fDelta_One_Step_Value;
00094 }

void G4FieldManager::SetChordFinder ( G4ChordFinder aChordFinder  )  [inline]

Definition at line 48 of file G4FieldManager.icc.

Referenced by G4ErrorPropagatorManager::InitFieldForBackwards().

00049 {
00050      fChordFinder= aChordFinder;
00051 }

void G4FieldManager::SetDeltaIntersection ( G4double  valueDintersection  )  [inline]

Definition at line 84 of file G4FieldManager.icc.

00085 {
00086       fDelta_Intersection_Val = valDeltaIntersection;
00087 }

void G4FieldManager::SetDeltaOneStep ( G4double  valueD1step  )  [inline]

Definition at line 78 of file G4FieldManager.icc.

00079 { 
00080      fDelta_One_Step_Value= valDeltaOneStep;  
00081 }

G4bool G4FieldManager::SetDetectorField ( G4Field detectorField  ) 

Definition at line 102 of file G4FieldManager.cc.

References G4Field::DoesFieldChangeEnergy().

00103 {
00104    fDetectorField= pDetectorField;
00105 
00106    if ( pDetectorField )
00107      fFieldChangesEnergy= pDetectorField->DoesFieldChangeEnergy();
00108    else
00109      fFieldChangesEnergy= false;   //  No field 
00110 
00111    return false;
00112 }

void G4FieldManager::SetFieldChangesEnergy ( G4bool  value  )  [inline]

Definition at line 99 of file G4FieldManager.icc.

00100 { fFieldChangesEnergy = value; }

void G4FieldManager::SetMaximumEpsilonStep ( G4double  newEpsMax  )  [inline]

Definition at line 128 of file G4FieldManager.icc.

Referenced by G4PropagatorInField::SetMaximumEpsilonStep().

00129 {
00130   if(    (newEpsMax > 0.0) 
00131       && (newEpsMax >= fEpsilonMin ) 
00132       && (std::fabs(1.0+newEpsMax)>1.0) )
00133   {
00134     fEpsilonMax = newEpsMax;
00135   }
00136 }

void G4FieldManager::SetMinimumEpsilonStep ( G4double  newEpsMin  )  [inline]

Definition at line 112 of file G4FieldManager.icc.

Referenced by G4PropagatorInField::SetMinimumEpsilonStep().

00113 {
00114   if( (newEpsMin > 0.0) && (std::fabs(1.0+newEpsMin) > 1.0) )
00115   {
00116     fEpsilonMin = newEpsMin;
00117   }
00118 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:59 2013 for Geant4 by  doxygen 1.4.7