CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 26 of file FieldStepper.cc.

References selectStepper().

27  : G4MagIntegratorStepper(eq, 6), theEquation(eq), theDelta(del) {
28  selectStepper(nam);
29 }
double theDelta
Definition: FieldStepper.h:23
void selectStepper(const std::string &)
Definition: FieldStepper.cc:41
G4Mag_UsualEqRhs * theEquation
Definition: FieldStepper.h:22

◆ ~FieldStepper()

FieldStepper::~FieldStepper ( )
override

Definition at line 31 of file FieldStepper.cc.

31 {}

Member Function Documentation

◆ DistChord()

G4double FieldStepper::DistChord ( ) const
override

Definition at line 37 of file FieldStepper.cc.

References theStepper.

37 { return theStepper->DistChord(); }
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:21

◆ IntegratorOrder()

G4int FieldStepper::IntegratorOrder ( ) const
override

Definition at line 39 of file FieldStepper.cc.

References theStepper.

39 { return theStepper->IntegratorOrder(); }
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:21

◆ selectStepper()

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

Definition at line 41 of file FieldStepper.cc.

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

Referenced by FieldStepper().

41  {
42  if (ss == "G4ClassicalRK4")
43  theStepper = new G4ClassicalRK4(theEquation);
44  else if (ss == "G4TClassicalRK4")
45  theStepper = new G4TClassicalRK4<G4Mag_UsualEqRhs, 8>(theEquation);
46  else if (ss == "G4NystromRK4")
47  theStepper = new G4NystromRK4(theEquation, theDelta);
48  else if (ss == "G4SimpleRunge")
49  theStepper = new G4SimpleRunge(theEquation);
50  else if (ss == "G4SimpleHeum")
51  theStepper = new G4SimpleHeum(theEquation);
52  else if (ss == "G4CashKarpRKF45")
53  theStepper = new G4CashKarpRKF45(theEquation);
54  else if (ss == "G4TCashKarpRKF45")
55  theStepper = new G4TCashKarpRKF45<G4Mag_UsualEqRhs>(theEquation);
56  else if (ss == "G4DormandPrince745")
57  theStepper = new G4DormandPrince745(theEquation);
58  else if (ss == "G4TDormandPrince45")
59  theStepper = new G4TDormandPrince45<G4TMagFieldEquation<sim::Field>>(
60  dynamic_cast<G4TMagFieldEquation<sim::Field> *>(theEquation));
61  else if (ss == "CMSTDormandPrince45")
64  else if (ss == "G4BogackiShampine45")
65  theStepper = new G4BogackiShampine45(theEquation);
66  else if (ss == "G4TsitourasRK45")
67  theStepper = new G4TsitourasRK45(theEquation);
68  else if (ss == "G4ImplicitEuler")
69  theStepper = new G4ImplicitEuler(theEquation);
70  else if (ss == "G4HelixExplicitEuler")
71  theStepper = new G4HelixExplicitEuler(theEquation);
72  else if (ss == "G4HelixImplicitEuler")
73  theStepper = new G4HelixImplicitEuler(theEquation);
74  else if (ss == "G4HelixSimpleRunge")
75  theStepper = new G4HelixSimpleRunge(theEquation);
76  else if (ss == "G4HelixHeum")
77  theStepper = new G4HelixHeum(theEquation);
78  else {
79  edm::LogWarning("SimG4CoreMagneticField")
80  << " FieldStepper <" << ss << "> is not known, defaulting to G4ClassicalRK4 ";
81  theStepper = new G4ClassicalRK4(theEquation);
82  }
83  edm::LogVerbatim("SimG4CoreMagneticField") << "### FieldStepper: <" << ss << ">";
84 }
Log< level::Info, true > LogVerbatim
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:21
double theDelta
Definition: FieldStepper.h:23
G4Mag_UsualEqRhs * theEquation
Definition: FieldStepper.h:22
Log< level::Warning, false > LogWarning

◆ Stepper()

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

Definition at line 33 of file FieldStepper.cc.

References h, theStepper, and y.

33  {
34  theStepper->Stepper(y, dydx, h, yout, yerr);
35 }
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:21
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

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().