File indexing completed on 2026-09-22 08:50:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 inline
0033 G4double G4BorisDriver::AdvanceChordLimited(G4FieldTrack& track,
0034 G4double hstep,
0035 G4double eps,
0036 G4double chordDistance)
0037 {
0038 return ChordFinderDelegate::
0039 AdvanceChordLimitedImpl(track, hstep, eps, chordDistance);
0040 }
0041
0042 inline
0043 void G4BorisDriver::OnStartTracking()
0044 {
0045 ChordFinderDelegate::ResetStepEstimate();
0046 }
0047
0048 inline
0049 void G4BorisDriver::OnComputeStep(const G4FieldTrack*)
0050 {
0051 }
0052
0053 inline
0054 G4bool G4BorisDriver::DoesReIntegrate() const
0055 {
0056 return true;
0057 }
0058
0059 inline
0060 G4double G4BorisDriver::ComputeNewStepSize( G4double ,
0061 G4double hstepCurrent)
0062 {
0063 return hstepCurrent;
0064 }
0065
0066 inline
0067 void G4BorisDriver::SetVerboseLevel(G4int level)
0068 {
0069 fVerbosity = (level != 0);
0070 }
0071
0072 inline
0073 G4int G4BorisDriver::GetVerboseLevel() const
0074 {
0075 return static_cast<G4int>(fVerbosity);
0076 }
0077
0078 inline
0079 const G4EquationOfMotion* G4BorisDriver::GetEquationOfMotion() const
0080 {
0081 auto eq = boris->GetEquationOfMotion();
0082 return eq;
0083 }
0084
0085 inline
0086 G4EquationOfMotion* G4BorisDriver::GetEquationOfMotion()
0087 {
0088 auto eq = boris->GetEquationOfMotion();
0089 return eq;
0090 }
0091
0092 inline
0093 G4int G4BorisDriver::GetNumberOfVariables() const
0094 {
0095 return boris->GetNumberOfVariables();
0096 }
0097
0098 inline
0099 const G4MagIntegratorStepper* G4BorisDriver::GetStepper() const
0100 {
0101 return nullptr;
0102 }
0103
0104 inline
0105 G4MagIntegratorStepper* G4BorisDriver::GetStepper()
0106 {
0107 return nullptr;
0108 }
0109
0110 inline
0111 void G4BorisDriver::CheckStep(const G4ThreeVector& posIn,
0112 const G4ThreeVector& posOut,
0113 G4double hdid) const
0114 {
0115 const G4double endPointDist = (posOut - posIn).mag();
0116 if (endPointDist >= hdid * (1. + CLHEP::perMillion))
0117 {
0118
0119
0120
0121
0122 if (endPointDist >= hdid * (1. + CLHEP::perThousand))
0123 {
0124 G4Exception("G4BorisDriver::CheckStep()", "GeomField1002", JustWarning,
0125 "endPointDist >= hdid!");
0126 }
0127 else
0128 {
0129 G4cerr << "G4BorisDriver::CheckStep: moved further than curve distance! "
0130 << " curve hdid= " << hdid << " endpoint dist= " << endPointDist
0131 << " ratio - 1 = " << (endPointDist - hdid) / hdid
0132 << " ( > 1.0e-6 threshold to report ) "
0133 << G4endl;
0134 }
0135
0136 }
0137 else
0138 {
0139
0140 }
0141 }