Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4MonopoleFieldSetup Class Reference

#include <G4MonopoleFieldSetup.hh>

Public Member Functions

void InitialiseAll ()
 
void SetMagField (G4double fieldValue)
 
void SetStepperAndChordFinder (G4int val)
 
 ~G4MonopoleFieldSetup ()
 

Static Public Member Functions

static G4MonopoleFieldSetupGetMonopoleFieldSetup ()
 

Detailed Description

Definition at line 63 of file G4MonopoleFieldSetup.hh.

Constructor & Destructor Documentation

G4MonopoleFieldSetup::~G4MonopoleFieldSetup ( )

Definition at line 103 of file G4MonopoleFieldSetup.cc.

104 {
105  delete fMonopoleFieldMessenger;
106  if(fMagneticField) delete fMagneticField;
107  if(fChordFinder) delete fChordFinder;
108  if(fStepper) delete fStepper;
109  if(fMonopoleStepper) delete fMonopoleStepper;
110 }

Member Function Documentation

G4MonopoleFieldSetup * G4MonopoleFieldSetup::GetMonopoleFieldSetup ( )
static

Definition at line 90 of file G4MonopoleFieldSetup.cc.

91 {
92  if (0 == fMonopoleFieldSetup)
93  {
94  static G4MonopoleFieldSetup theInstance;
95  fMonopoleFieldSetup = &theInstance;
96  }
97 
98  return fMonopoleFieldSetup;
99 }

Here is the caller graph for this function:

void G4MonopoleFieldSetup::InitialiseAll ( )

Definition at line 134 of file G4MonopoleFieldSetup.cc.

135 {
137  ->GetFieldManager();
138 
139  fEquation = new G4Mag_UsualEqRhs(fMagneticField);
140  fMonopoleEquation = new G4MonopoleEquation(fMagneticField);
141 
142  fMinStep = 0.01*mm ; // minimal step of 1 mm is default
143 
144  fMonopoleStepper = new G4ClassicalRK4( fMonopoleEquation, 8 ); // for time information..
145  fStepper = new G4ClassicalRK4( fEquation );
146 
148 }
static constexpr double mm
Definition: G4SIunits.hh:115
static G4TransportationManager * GetTransportationManager()
G4FieldManager * GetFieldManager() const
void SetStepperAndChordFinder(G4int val)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4MonopoleFieldSetup::SetMagField ( G4double  fieldValue)

Definition at line 114 of file G4MonopoleFieldSetup.cc.

115 {
116  //apply a global uniform magnetic field along Z axis
117  if (fMagneticField) { delete fMagneticField; } //delete the existing magn field
118 
119  if (fieldValue != 0.) // create a new one if non nul
120  {
121  fMagneticField = new G4UniformMagField(G4ThreeVector(0., 0., fieldValue));
122  InitialiseAll();
123  }
124  else
125  {
126  fMagneticField = 0;
127  fFieldManager->SetDetectorField(fMagneticField);
128  }
129 }
CLHEP::Hep3Vector G4ThreeVector
G4bool SetDetectorField(G4Field *detectorField)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4MonopoleFieldSetup::SetStepperAndChordFinder ( G4int  val)

Definition at line 152 of file G4MonopoleFieldSetup.cc.

153 {
154  if (fMagneticField)
155  {
156  fFieldManager->SetDetectorField(fMagneticField );
157 
158  if(fChordFinder) delete fChordFinder;
159 
160  switch (val)
161  {
162  case 0:
163  fChordFinder = new G4ChordFinder( fMagneticField, fMinStep, fStepper);
164  break;
165  case 1:
166  fChordFinder = new G4ChordFinder( fMagneticField, fMinStep, fMonopoleStepper);
167  break;
168  }
169 
170  fFieldManager->SetChordFinder( fChordFinder );
171  }
172 }
G4bool SetDetectorField(G4Field *detectorField)
void SetChordFinder(G4ChordFinder *aChordFinder)

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: