CMS 3D CMS Logo

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

#include <FieldStepper.h>

Inheritance diagram for FieldStepper:

Public Member Functions

G4double DistChord () const override
 
 FieldStepper (G4Mag_UsualEqRhs *eq, double del, const std::string &name)
 
G4int IntegratorOrder () const override
 
void Stepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[]) override
 
 ~FieldStepper () override
 

Private Member Functions

void selectStepper (const std::string &)
 

Private Attributes

double theDelta
 
G4Mag_UsualEqRhs * theEquation
 
G4MagIntegratorStepper * theStepper
 

Detailed Description

Definition at line 8 of file FieldStepper.h.

Constructor & Destructor Documentation

◆ FieldStepper()

FieldStepper::FieldStepper ( G4Mag_UsualEqRhs *  eq,
double  del,
const std::string &  name 
)
explicit

Definition at line 23 of file FieldStepper.cc.

24  : G4MagIntegratorStepper(eq, 6), theEquation(eq), theDelta(del) {
25  selectStepper(nam);
26 }

References selectStepper().

◆ ~FieldStepper()

FieldStepper::~FieldStepper ( )
override

Definition at line 28 of file FieldStepper.cc.

28 {}

Member Function Documentation

◆ DistChord()

G4double FieldStepper::DistChord ( ) const
override

Definition at line 34 of file FieldStepper.cc.

34 { return theStepper->DistChord(); }

References theStepper.

◆ IntegratorOrder()

G4int FieldStepper::IntegratorOrder ( ) const
override

Definition at line 36 of file FieldStepper.cc.

36 { return theStepper->IntegratorOrder(); }

References theStepper.

◆ selectStepper()

void FieldStepper::selectStepper ( const std::string &  ss)
private

Definition at line 38 of file FieldStepper.cc.

38  {
39  if (ss == "G4ClassicalRK4")
40  theStepper = new G4ClassicalRK4(theEquation);
41  else if (ss == "G4TClassicalRK4")
42  theStepper = new G4TClassicalRK4<G4Mag_UsualEqRhs, 8>(theEquation);
43  else if (ss == "G4NystromRK4")
44  theStepper = new G4NystromRK4(theEquation, theDelta);
45  else if (ss == "G4SimpleRunge")
46  theStepper = new G4SimpleRunge(theEquation);
47  else if (ss == "G4SimpleHeum")
48  theStepper = new G4SimpleHeum(theEquation);
49  else if (ss == "G4CashKarpRKF45")
50  theStepper = new G4CashKarpRKF45(theEquation);
51  else if (ss == "G4TCashKarpRKF45")
52  theStepper = new G4TCashKarpRKF45<G4Mag_UsualEqRhs>(theEquation);
53  else if (ss == "G4DormandPrince745")
54  theStepper = new G4DormandPrince745(theEquation);
55  else if (ss == "G4TDormandPrince45")
56  theStepper = new G4TDormandPrince45<G4Mag_UsualEqRhs>(theEquation);
57  else if (ss == "G4BogackiShampine45")
58  theStepper = new G4BogackiShampine45(theEquation);
59  else if (ss == "G4TsitourasRK45")
60  theStepper = new G4TsitourasRK45(theEquation);
61  else if (ss == "G4ImplicitEuler")
62  theStepper = new G4ImplicitEuler(theEquation);
63  else if (ss == "G4HelixExplicitEuler")
64  theStepper = new G4HelixExplicitEuler(theEquation);
65  else if (ss == "G4HelixImplicitEuler")
66  theStepper = new G4HelixImplicitEuler(theEquation);
67  else if (ss == "G4HelixSimpleRunge")
68  theStepper = new G4HelixSimpleRunge(theEquation);
69  else if (ss == "G4HelixHeum")
70  theStepper = new G4HelixHeum(theEquation);
71  else {
72  edm::LogWarning("SimG4CoreMagneticField")
73  << " FieldStepper <" << ss << "> is not known, defaulting to G4ClassicalRK4 ";
74  theStepper = new G4ClassicalRK4(theEquation);
75  }
76  edm::LogVerbatim("SimG4CoreMagneticField") << "### FieldStepper: <" << ss << ">";
77 }

References contentValuesCheck::ss, theDelta, theEquation, and theStepper.

Referenced by FieldStepper().

◆ Stepper()

void FieldStepper::Stepper ( const G4double  y[],
const G4double  dydx[],
G4double  h,
G4double  yout[],
G4double  yerr[] 
)
override

Definition at line 30 of file FieldStepper.cc.

30  {
31  theStepper->Stepper(y, dydx, h, yout, yerr);
32 }

References theStepper, and y.

Member Data Documentation

◆ theDelta

double FieldStepper::theDelta
private

Definition at line 23 of file FieldStepper.h.

Referenced by selectStepper().

◆ theEquation

G4Mag_UsualEqRhs* FieldStepper::theEquation
private

Definition at line 22 of file FieldStepper.h.

Referenced by selectStepper().

◆ theStepper

G4MagIntegratorStepper* FieldStepper::theStepper
private

Definition at line 21 of file FieldStepper.h.

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

DDAxes::y
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
FieldStepper::theEquation
G4Mag_UsualEqRhs * theEquation
Definition: FieldStepper.h:22
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
FieldStepper::theDelta
double theDelta
Definition: FieldStepper.h:23
FieldStepper::theStepper
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:21
h
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
FieldStepper::selectStepper
void selectStepper(const std::string &)
Definition: FieldStepper.cc:38