CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
sim::FieldStepper Class Reference

#include <FieldStepper.h>

Inheritance diagram for sim::FieldStepper:

Public Member Functions

double DistChord () const override
 
 FieldStepper (G4Mag_UsualEqRhs *eq, double del=0.0)
 
int IntegratorOrder () const override
 
G4MagIntegratorStepper * select (const std::string &s)
 
void Stepper (const double y[], const double dydx[], double h, double yout[], double yerr[]) override
 
 ~FieldStepper () override
 

Private Attributes

double delta
 
G4Mag_UsualEqRhs * theEquation
 
G4MagIntegratorStepper * theStepper
 

Detailed Description

Definition at line 9 of file FieldStepper.h.

Constructor & Destructor Documentation

FieldStepper::FieldStepper ( G4Mag_UsualEqRhs *  eq,
double  del = 0.0 
)

Definition at line 21 of file FieldStepper.cc.

21  :
22  G4MagIntegratorStepper(eq, 6), theEquation(eq), delta(del) {}
G4Mag_UsualEqRhs * theEquation
Definition: FieldStepper.h:21
FieldStepper::~FieldStepper ( )
override

Definition at line 24 of file FieldStepper.cc.

24 {}

Member Function Documentation

double FieldStepper::DistChord ( ) const
override

Definition at line 30 of file FieldStepper.cc.

References theStepper.

30 { return theStepper->DistChord(); }
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:20
int FieldStepper::IntegratorOrder ( ) const
override

Definition at line 32 of file FieldStepper.cc.

References theStepper.

33 { return theStepper->IntegratorOrder(); }
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:20
G4MagIntegratorStepper * FieldStepper::select ( const std::string &  s)

Definition at line 35 of file FieldStepper.cc.

References delta, theEquation, and theStepper.

Referenced by sim::FieldBuilder::configureForVolume().

36 {
37  if (ss == "G4ClassicalRK4") theStepper = new G4ClassicalRK4(theEquation);
38  else if (ss == "G4NystromRK4") theStepper = new G4NystromRK4(theEquation, delta);
39  else if (ss == "G4SimpleRunge") theStepper = new G4SimpleRunge(theEquation);
40  else if (ss == "G4SimpleHeum") theStepper = new G4SimpleHeum(theEquation);
41  else if (ss == "G4CashKarpRKF45") theStepper = new G4CashKarpRKF45(theEquation);
42  else if (ss == "G4DormandPrince745") theStepper = new G4DormandPrince745(theEquation);
43  else if (ss == "G4BogackiShampine45") theStepper = new G4BogackiShampine45(theEquation);
44  else if (ss == "G4TsitourasRK45") theStepper = new G4TsitourasRK45(theEquation);
45  else if (ss == "G4ImplicitEuler") theStepper = new G4ImplicitEuler(theEquation);
46  else if (ss == "G4HelixExplicitEuler") theStepper = new G4HelixExplicitEuler(theEquation);
47  else if (ss == "G4HelixImplicitEuler") theStepper = new G4HelixImplicitEuler(theEquation);
48  else if (ss == "G4HelixSimpleRunge") theStepper = new G4HelixSimpleRunge(theEquation);
49  else if (ss == "G4HelixHeum") theStepper = new G4HelixHeum(theEquation);
50  else
51  {
52  edm::LogWarning("SimG4CoreMagneticField")
53  << " FieldStepper <" << ss << "> is not known, defaulting to G4ClassicalRK4 ";
54  theStepper = new G4ClassicalRK4(theEquation);
55  }
56  edm::LogInfo("SimG4CoreMagneticField")
57  << "### FieldStepper: <" << ss << ">";
58  return theStepper;
59 }
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:20
G4Mag_UsualEqRhs * theEquation
Definition: FieldStepper.h:21
void FieldStepper::Stepper ( const double  y[],
const double  dydx[],
double  h,
double  yout[],
double  yerr[] 
)
override

Definition at line 26 of file FieldStepper.cc.

References theStepper.

28 { theStepper->Stepper(y,dydx,h,yout,yerr); }
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:20

Member Data Documentation

double sim::FieldStepper::delta
private

Definition at line 22 of file FieldStepper.h.

Referenced by select().

G4Mag_UsualEqRhs* sim::FieldStepper::theEquation
private

Definition at line 21 of file FieldStepper.h.

Referenced by select().

G4MagIntegratorStepper* sim::FieldStepper::theStepper
private

Definition at line 20 of file FieldStepper.h.

Referenced by DistChord(), IntegratorOrder(), select(), and Stepper().