ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4BulirschStoerDriver.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4BulirschStoerDriver.hh
1
// ********************************************************************
2
// * License and Disclaimer *
3
// * *
4
// * The Geant4 software is copyright of the Copyright Holders of *
5
// * the Geant4 Collaboration. It is provided under the terms and *
6
// * conditions of the Geant4 Software License, included in the file *
7
// * LICENSE and available at http://cern.ch/geant4/license . These *
8
// * include a list of copyright holders. *
9
// * *
10
// * Neither the authors of this software system, nor their employing *
11
// * institutes,nor the agencies providing financial support for this *
12
// * work make any representation or warranty, express or implied, *
13
// * regarding this software system or assume any liability for its *
14
// * use. Please see the license in the file LICENSE and URL above *
15
// * for the full disclaimer and the limitation of liability. *
16
// * *
17
// * This code implementation is the result of the scientific and *
18
// * technical work of the GEANT4 collaboration. *
19
// * By using, copying, modifying or distributing the software (or *
20
// * any work based on the software) you agree to acknowledge its *
21
// * use in resulting scientific publications, and indicate your *
22
// * acceptance of all terms of the Geant4 Software license. *
23
// ********************************************************************
24
//
25
// G4BulirschStoer driver
26
//
27
// Class description:
28
//
29
// G4IntegrationDriver<G4BulirschStoer> is a driver class using
30
// Bulirsch-Stoer method to integrate the equation of motion.
31
32
// Author: Dmitry Sorokin, Google Summer of Code 2016
33
// Supervision: John Apostolakis, CERN
34
// --------------------------------------------------------------------
35
#ifndef G4BULIRSCH_STOER_DRIVER_HH
36
#define G4BULIRSCH_STOER_DRIVER_HH
37
38
#include "
G4IntegrationDriver.hh
"
39
#include "
G4BulirschStoer.hh
"
40
#include "
G4ChordFinderDelegate.hh
"
41
42
template
<>
43
class
G4IntegrationDriver
<
G4BulirschStoer
>:
44
public
G4VIntegrationDriver
,
45
public
G4ChordFinderDelegate
<G4IntegrationDriver<G4BulirschStoer>>
46
{
47
public
:
48
49
G4IntegrationDriver
(
G4double
hminimum,
50
G4BulirschStoer
*
stepper
,
51
G4int
numberOfComponents = 6,
52
G4int
statisticsVerbosity = 1);
53
54
~G4IntegrationDriver
() =
default
;
55
56
G4IntegrationDriver
(
const
G4IntegrationDriver
&) =
delete
;
57
G4IntegrationDriver
&
operator=
(
const
G4IntegrationDriver
&) =
delete
;
58
59
virtual
G4double
AdvanceChordLimited
(
G4FieldTrack
&
track
,
60
G4double
hstep,
61
G4double
eps
,
62
G4double
chordDistance)
override
63
{
64
return
ChordFinderDelegate::
65
AdvanceChordLimitedImpl
(track, hstep, eps, chordDistance);
66
}
67
68
virtual
void
OnStartTracking
()
override
69
{
70
ChordFinderDelegate::ResetStepEstimate
();
71
}
72
73
virtual
void
OnComputeStep
()
override
{};
74
75
virtual
G4bool
DoesReIntegrate
()
override
{
return
false
; }
76
77
virtual
G4bool
AccurateAdvance
(
G4FieldTrack
&
track
,
78
G4double
stepLen,
79
G4double
eps
,
80
G4double
beginStep = 0)
override
;
81
82
virtual
G4bool
QuickAdvance
(
G4FieldTrack
& y_val,
83
const
G4double
dydx[],
84
G4double
hstep,
85
G4double
& missDist,
86
G4double
& dyerr)
override
;
87
88
void
OneGoodStep
(
G4double
y
[],
89
const
G4double
dydx[],
90
G4double
& curveLength,
91
G4double
htry,
92
G4double
eps
,
93
G4double
& hdid,
94
G4double
& hnext);
95
96
virtual
void
GetDerivatives
(
const
G4FieldTrack
&
track
,
97
G4double
dydx[])
const override
;
98
99
virtual
void
GetDerivatives
(
const
G4FieldTrack
&
track
,
100
G4double
dydx[],
101
G4double
field[])
const override
;
102
103
virtual
void
SetVerboseLevel
(
G4int
level)
override
;
104
virtual
G4int
GetVerboseLevel
()
const override
;
105
106
virtual
G4double
ComputeNewStepSize
(
107
G4double
errMaxNorm,
// normalised error
108
G4double
hstepCurrent)
override
;
// current step size
109
110
virtual
G4EquationOfMotion
*
GetEquationOfMotion
()
override
;
111
const
G4EquationOfMotion
*
GetEquationOfMotion
()
const
;
112
virtual
void
SetEquationOfMotion
(
G4EquationOfMotion
* equation)
override
;
113
114
virtual
const
G4MagIntegratorStepper
*
GetStepper
()
const override
;
115
virtual
G4MagIntegratorStepper
*
GetStepper
()
override
;
116
117
private
:
118
119
G4int
GetNumberOfVarialbles()
const
;
120
121
G4double
fMinimumStep
;
122
G4double
fVerbosity
;
123
124
G4ModifiedMidpoint
fMidpointMethod
;
125
G4BulirschStoer
*
bulirschStoer
;
126
127
G4double
yIn[
G4FieldTrack::ncompSVEC
],
128
yMid[
G4FieldTrack::ncompSVEC
],
129
yMid2[
G4FieldTrack::ncompSVEC
],
130
yOut[
G4FieldTrack::ncompSVEC
],
131
yOut2[
G4FieldTrack::ncompSVEC
],
132
yError[
G4FieldTrack::ncompSVEC
];
133
134
135
G4double
dydxCurrent[
G4FieldTrack::ncompSVEC
];
136
G4double
yCurrent[
G4FieldTrack::ncompSVEC
];
137
138
G4double
derivs[2][6][
G4FieldTrack::ncompSVEC
];
139
140
const
G4int
interval_sequence[2];
141
142
using
ChordFinderDelegate
=
143
G4ChordFinderDelegate<G4IntegrationDriver<G4BulirschStoer>
>;
144
};
145
146
#include "G4BulirschStoerDriver.icc"
147
148
#endif
geant4
tree
geant4-10.6-release
source
geometry
magneticfield
include
G4BulirschStoerDriver.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:16
using
1.8.2 with
ECCE GitHub integration