Import Geant4 10.5.1 source tree
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
|
||||
// New FSAL type driver / steppers -----
|
||||
#include "G4IntegrationDriver.hh"
|
||||
#include "G4FSALBogackiShampine45.hh"
|
||||
// #include "G4FSALBogackiShampine45.hh"
|
||||
// #include "G4FSALDormandPrince745.hh"
|
||||
|
||||
#include <cassert>
|
||||
@@ -88,17 +88,19 @@ G4ChordFinder::G4ChordFinder( G4MagneticField* theMagField,
|
||||
// by creating in inverse order the Driver, the Stepper and EqRhs ...
|
||||
|
||||
using NewFsalStepperType = G4RK547FEq1; // or 2 or 3
|
||||
const char* NewFSALStepperName = "G4RK574FEq1> FSAL 4th/5th order 7-stage 'Equilibrium-type' #1.";
|
||||
const char* NewFSALStepperName =
|
||||
"G4RK574FEq1> FSAL 4th/5th order 7-stage 'Equilibrium-type' #1.";
|
||||
using RegularStepperType =
|
||||
G4DormandPrince745; //
|
||||
G4DormandPrince745; // DOPRI5 (MatLab) 5th order embedded method. High efficiency.
|
||||
// G4ClassicalRK4; // The old default
|
||||
// G4CashKarpRKF45; // First embedded method in G4
|
||||
// G4BogackiShampine45; // High efficiency 5th order embedded method
|
||||
// G4DormandPrince745 // Famous DOPRI5 (MatLab) 5th order embedded method. High efficiency.
|
||||
// G4NystromRK4; // Nystrom stepper 4th order
|
||||
// G4RK547FEq1; // or 2 or 3
|
||||
const char* RegularStepperName = "Nystrom stepper 4th order";
|
||||
//"G4DormandPrince745 (aka DOPRI5): 5th/4th Order 7-stage embedded stepper";
|
||||
const char* RegularStepperName =
|
||||
"G4DormandPrince745 (aka DOPRI5): 5th/4th Order 7-stage embedded stepper";
|
||||
// "BogackiShampine 45 (Embedded 5th/4th Order, 7-stage)";
|
||||
// "Nystrom stepper 4th order";
|
||||
|
||||
// Configurable
|
||||
G4bool forceFSALstepper= false; // Choice - true to enable !!
|
||||
@@ -118,10 +120,10 @@ G4ChordFinder::G4ChordFinder( G4MagneticField* theMagField,
|
||||
G4Mag_EqRhs *pEquation = new G4Mag_UsualEqRhs(theMagField);
|
||||
fEquation = pEquation;
|
||||
|
||||
// G4MagIntegratorStepper* regularStepper = nullptr;
|
||||
// G4VFSALIntegrationStepper* fsalSepper = nullptr; // for new-type FSAL steppers only
|
||||
// NewFsalStepperType* fsalStepper =nullptr;
|
||||
// G4MagIntegratorStepper* oldFSALStepper =nullptr;
|
||||
// G4MagIntegratorStepper* regularStepper = nullptr;
|
||||
// G4VFSALIntegrationStepper* fsalSepper = nullptr; // for new-type FSAL steppers only
|
||||
// NewFsalStepperType* fsalStepper = nullptr;
|
||||
// G4MagIntegratorStepper* oldFSALStepper = nullptr;
|
||||
|
||||
G4bool errorInStepperCreation = false;
|
||||
|
||||
|
||||
@@ -62,32 +62,18 @@ G4QuadrupoleMagField::~G4QuadrupoleMagField()
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Allow displaced origin and rotation
|
||||
// Extensions by Björn Riese (GSI)
|
||||
|
||||
void G4QuadrupoleMagField::GetFieldValue( const G4double y[7],
|
||||
G4double B[3] ) const
|
||||
G4double B[3] ) const
|
||||
// with displaced origin and rotation
|
||||
{
|
||||
G4ThreeVector r_global = G4ThreeVector(
|
||||
y[0] - fOrigin.x(),
|
||||
y[1] - fOrigin.y(),
|
||||
y[2] - fOrigin.z());
|
||||
|
||||
G4ThreeVector r_local = G4ThreeVector(
|
||||
fpMatrix->colX() * r_global,
|
||||
fpMatrix->colY() * r_global,
|
||||
fpMatrix->colZ() * r_global);
|
||||
|
||||
G4ThreeVector B_local = G4ThreeVector(
|
||||
fGradient * r_local.y(),
|
||||
fGradient * r_local.x(),
|
||||
0);
|
||||
|
||||
G4ThreeVector B_global = G4ThreeVector(
|
||||
fpMatrix->inverse().rowX() * B_local,
|
||||
fpMatrix->inverse().rowY() * B_local,
|
||||
fpMatrix->inverse().rowZ() * B_local);
|
||||
G4ThreeVector r_global = G4ThreeVector(
|
||||
y[0] - fOrigin.x(),
|
||||
y[1] - fOrigin.y(),
|
||||
y[2] - fOrigin.z());
|
||||
|
||||
const G4ThreeVector r_local = (*fpMatrix) * r_global;
|
||||
const G4ThreeVector B_local( fGradient * r_local.y(),fGradient * r_local.x(),0);
|
||||
const G4ThreeVector B_global = fpMatrix->inverse() * B_local;
|
||||
|
||||
B[0] = B_global.x() ;
|
||||
B[1] = B_global.y() ;
|
||||
|
||||
Reference in New Issue
Block a user