SimG4Core
MagneticField
src
FieldStepper.cc
Go to the documentation of this file.
1
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
2
#include "
SimG4Core/MagneticField/interface/FieldStepper.h
"
3
4
#include "G4BogackiShampine45.hh"
5
#include "G4CashKarpRKF45.hh"
6
#include "G4ClassicalRK4.hh"
7
#include "G4DormandPrince745.hh"
8
#include "G4HelixExplicitEuler.hh"
9
#include "G4HelixHeum.hh"
10
#include "G4HelixImplicitEuler.hh"
11
#include "G4HelixSimpleRunge.hh"
12
#include "G4ImplicitEuler.hh"
13
#include "G4Mag_UsualEqRhs.hh"
14
#include "G4NystromRK4.hh"
15
#include "G4SimpleHeum.hh"
16
#include "G4SimpleRunge.hh"
17
#include "G4TsitourasRK45.hh"
18
19
FieldStepper::FieldStepper
(G4Mag_UsualEqRhs *eq,
double
del,
const
std::string
&nam)
20
: G4MagIntegratorStepper(eq, 6), theEquation(eq), theDelta(del) {
21
selectStepper
(nam);
22
}
23
24
FieldStepper::~FieldStepper
() {}
25
26
void
FieldStepper::Stepper
(
const
G4double
y
[],
const
G4double dydx[], G4double
h
, G4double yout[], G4double yerr[]) {
27
theStepper
->Stepper(
y
, dydx,
h
, yout, yerr);
28
}
29
30
G4double
FieldStepper::DistChord
()
const
{
return
theStepper
->DistChord(); }
31
32
G4int
FieldStepper::IntegratorOrder
()
const
{
return
theStepper
->IntegratorOrder(); }
33
34
void
FieldStepper::selectStepper
(
const
std::string
&
ss
) {
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
}
DDAxes::y
MessageLogger.h
FieldStepper.h
FieldStepper::FieldStepper
FieldStepper(G4Mag_UsualEqRhs *eq, double del, const std::string &name)
Definition:
FieldStepper.cc:19
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::IntegratorOrder
G4int IntegratorOrder() const override
Definition:
FieldStepper.cc:32
FieldStepper::Stepper
void Stepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[]) override
Definition:
FieldStepper.cc:26
FieldStepper::theDelta
double theDelta
Definition:
FieldStepper.h:23
FieldStepper::theStepper
G4MagIntegratorStepper * theStepper
Definition:
FieldStepper.h:21
h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
FieldStepper::DistChord
G4double DistChord() const override
Definition:
FieldStepper.cc:30
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition:
MessageLogger.h:128
detailsBasic3DVector::y
float float y
Definition:
extBasic3DVector.h:14
FieldStepper::selectStepper
void selectStepper(const std::string &)
Definition:
FieldStepper.cc:34
FieldStepper::~FieldStepper
~FieldStepper() override
Definition:
FieldStepper.cc:24
Generated for CMSSW Reference Manual by
1.8.16