Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions SimG4Core/MagneticField/interface/FieldStepper.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
#define SimG4Core_MagneticField_FieldStepper_H

#include "G4MagIntegratorStepper.hh"
#include "G4Version.hh"

#if G4VERSION_NUMBER >= 1132
#include "G4FieldParameters.hh"
#endif

class G4Mag_UsualEqRhs;

Expand All @@ -15,6 +20,10 @@ class FieldStepper : public G4MagIntegratorStepper {
G4double DistChord() const override;
G4int IntegratorOrder() const override;

#if G4VERSION_NUMBER >= 1132
G4StepperType StepperType() const override { return kTDormandPrince45; };
#endif

private:
void selectStepper(const std::string &);

Expand Down
9 changes: 9 additions & 0 deletions SimG4Core/MagneticField/src/CMSTDormandPrince45.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,22 @@
#include <cassert>
#include "G4MagIntegratorStepper.hh"
#include "G4FieldUtils.hh"
#include "G4Version.hh"

#if G4VERSION_NUMBER >= 1132
#include "G4FieldParameters.hh"
#endif

template <class T_Equation, unsigned int N = 6>
class CMSTDormandPrince45 : public G4MagIntegratorStepper {
public:
CMSTDormandPrince45(T_Equation* equation);
CMSTDormandPrince45(T_Equation* equation, G4int numVar); // must have numVar == N

#if G4VERSION_NUMBER >= 1132
G4StepperType StepperType() const override { return kTDormandPrince45; };
#endif

inline void StepWithError(
const G4double yInput[], const G4double dydx[], G4double hstep, G4double yOutput[], G4double yError[]);

Expand Down