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 ( G4Mag_UsualEqRhs *  eq,
double  del,
const std::string &  name 
)
explicit

Definition at line 19 of file FieldStepper.cc.

References selectStepper().

20  : G4MagIntegratorStepper(eq, 6), theEquation(eq), theDelta(del) {
21  selectStepper(nam);
22 }
double theDelta
Definition: FieldStepper.h:23
void selectStepper(const std::string &)
Definition: FieldStepper.cc:34
G4Mag_UsualEqRhs * theEquation
Definition: FieldStepper.h:22
FieldStepper::~FieldStepper ( )
override

Definition at line 24 of file FieldStepper.cc.

24 {}

Member Function Documentation

G4double FieldStepper::DistChord ( ) const
override

Definition at line 30 of file FieldStepper.cc.

References theStepper.

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

Definition at line 32 of file FieldStepper.cc.

References theStepper.

32 { return theStepper->IntegratorOrder(); }
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:21
void FieldStepper::selectStepper ( const std::string &  ss)
private

Definition at line 34 of file FieldStepper.cc.

References theDelta, theEquation, and theStepper.

Referenced by FieldStepper().

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

Definition at line 26 of file FieldStepper.cc.

References theStepper.

26  {
27  theStepper->Stepper(y, dydx, h, yout, yerr);
28 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:21

Member Data Documentation

double FieldStepper::theDelta
private

Definition at line 23 of file FieldStepper.h.

Referenced by selectStepper().

G4Mag_UsualEqRhs* FieldStepper::theEquation
private

Definition at line 22 of file FieldStepper.h.

Referenced by selectStepper().

G4MagIntegratorStepper* FieldStepper::theStepper
private

Definition at line 21 of file FieldStepper.h.

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