BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Integrator that ignores the field and uses the analytical solution to a multipole. More...
#include <BDSIntegratorMultipoleThin.hh>
Public Member Functions | |
BDSIntegratorMultipoleThin (BDSMagnetStrength const *strength, G4double brhoIn, G4Mag_EqRhs *eqOfMIn) | |
virtual void | Stepper (const G4double yIn[], const G4double dydx[], const G4double h, G4double yOut[], G4double yErr[]) |
void | OneStep (const G4ThreeVector &posIn, const G4ThreeVector &momUIn, const G4double momIn, G4ThreeVector &posOut, G4ThreeVector &momOut, G4double h) const |
![]() | |
BDSIntegratorMag (G4Mag_EqRhs *eqOfMIn, G4int nVariablesIn) | |
virtual G4double | DistChord () const |
Estimate maximum distance of curved solution and chord. | |
virtual G4int | IntegratorOrder () const |
Geant4 requires that the integrator order must be supplied by the derived class. | |
BDSIntegratorMag & | operator= (const BDSIntegratorMag &)=delete |
Assignment and copy constructor not implemented nor used. | |
BDSIntegratorMag (BDSIntegratorMag &)=delete | |
Assignment and copy constructor not implemented nor used. | |
![]() | |
void | AdvanceDriftMag (const G4double yIn[], const G4double h, G4double yOut[], G4double yErr[]) const |
Error array [6] all 0. | |
void | AdvanceDriftMag (const G4double yIn[], const G4ThreeVector &unitMomentum, const G4double h, G4double yOut[], G4double yErr[]) const |
![]() | |
G4VPhysicalVolume * | LocateGlobalPointAndSetup (const G4ThreeVector &point, const G4ThreeVector *direction=nullptr, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true, G4bool useCurvilinear=true) const |
A wrapper for the underlying static navigator instance located within this class. | |
G4VPhysicalVolume * | LocateGlobalPointAndSetup (G4Step const *const step, G4bool useCurvilinear=true) const |
BDSStep | ConvertToLocal (G4Step const *const step, G4bool useCurvilinear=true) const |
BDSStep | ConvertToLocal (const G4ThreeVector &globalPosition, const G4ThreeVector &globalDirection, const G4double stepLength=0, const G4bool useCurvilinear=true, const G4double marginLength=1) const |
BDSStep | ConvertToGlobalStep (const G4ThreeVector &localPosition, const G4ThreeVector &localDirection, const G4bool useCurvilinear=true) const |
G4ThreeVector | ConvertToLocal (const G4double globalPoint[3], const G4bool useCurvilinear=true) const |
G4ThreeVector | ConvertToLocal (const G4ThreeVector &globalPosition, const G4bool useCurvilinear=true) const |
Vector version - see notes above. | |
G4ThreeVector | ConvertToLocalNoSetup (const G4ThreeVector &globalPosition, const G4bool useCurvilinear=true) const |
Similar to above function but does NOT initialise the transforms. | |
G4ThreeVector | ConvertAxisToLocal (const G4ThreeVector &globalAxis, const G4bool useCurvilinear=true) const |
G4ThreeVector | ConvertAxisToLocal (const G4double globalPoint[3], const G4double globalAxis[3], const G4bool useCurvilinear=true) const |
G4ThreeVector | ConvertAxisToLocal (const G4ThreeVector &globalPoint, const G4ThreeVector &globalAxis, const G4bool useCurvilinear=true) const |
Vector version. | |
G4ThreeVector | ConvertAxisToGlobal (const G4ThreeVector &localAxis, const G4bool useCurvilinear=true) const |
std::pair< G4ThreeVector, G4ThreeVector > | ConvertAxisToGlobal (const std::pair< G4ThreeVector, G4ThreeVector > &localAxis, const G4bool useCurvilinear=true) const |
G4ThreeVector | ConvertToGlobal (const G4ThreeVector &localPosition, const G4bool useCurvilinear=true) const |
G4ThreeVector | ConvertAxisToGlobal (const G4ThreeVector &globalPosition, const G4ThreeVector &localAxis, const G4bool useCurvilinear=true) const |
G4ThreeVector | ConvertToGlobal (const G4ThreeVector &globalPosition, const G4ThreeVector &localPosition, const G4bool useCurvilinear=true) const |
BDSStep | GlobalToCurvilinear (const G4double fieldArcLength, const G4ThreeVector &unitField, const G4double angle, const G4ThreeVector &position, const G4ThreeVector &unitMomentum, const G4double h, const G4bool useCurvilinearWorld, const G4double FCof, const G4double tilt=0) |
BDSStep | GlobalToCurvilinear (const G4ThreeVector &position, const G4ThreeVector &unitMomentum, const G4double h, const G4bool useCurvilinearWorld) |
BDSStep | CurvilinearToGlobal (const G4ThreeVector &localPosition, const G4ThreeVector &localMomentum, const G4bool useCurvilinearWorld) |
BDSStep | CurvilinearToGlobal (const G4double fieldArcLength, const G4ThreeVector &unitField, const G4double angle, const G4ThreeVector &CLPosition, const G4ThreeVector &CLMomentum, const G4bool useCurvilinearWorld, const G4double FCof, const G4double tilt=0) |
Private Member Functions | |
BDSIntegratorMultipoleThin ()=delete | |
Private default constructor to enforce use of supplied constructor. | |
G4int | Factorial (G4int n) |
Calculate the factorial of n. | |
Private Attributes | |
G4double | brho |
Magnetic rigidity for momentum scaling. | |
G4double | b0l |
Dipole component. | |
std::list< double > | bnl |
Higher order components. | |
std::list< double > | bsl |
Higher order components. | |
std::vector< G4int > | nfact |
Higher order components. | |
Additional Inherited Members | |
![]() | |
static void | AttachWorldVolumeToNavigator (G4VPhysicalVolume *worldPVIn) |
Setup the navigator w.r.t. to a world volume - typically real world. | |
static void | AttachWorldVolumeToNavigatorCL (G4VPhysicalVolume *curvilinearWorldPVIn) |
static void | RegisterCurvilinearBridgeWorld (G4VPhysicalVolume *curvilinearBridgeWorldPVIn) |
static void | ResetNavigatorStates () |
![]() | |
static G4double | thinElementLength = -1 |
static G4double | nominalMatrixRelativeMomCut = -1 |
static G4bool | currentTrackIsPrimary = false |
![]() | |
void | ConvertToGlobal (const G4ThreeVector &localPos, const G4ThreeVector &localMom, G4double yOut[], G4double yErr[], const G4double momScaling=1.0) |
scaling of momentum in case localMom is a unit vector | |
void | SetDistChord (G4double distChordIn) |
Setter for distChord to private member. | |
![]() | |
G4Mag_EqRhs * | eqOfM |
const G4int | nVariables |
Cache of the number of variables. | |
G4MagIntegratorStepper * | backupStepper |
G4bool | zeroStrength |
G4double | backupStepperMomLimit |
![]() | |
G4AffineTransform | globalToLocal |
G4AffineTransform | localToGlobal |
G4AffineTransform | globalToLocalCL |
G4AffineTransform | localToGlobalCL |
G4bool | bridgeVolumeWasUsed |
![]() | |
static G4Navigator * | auxNavigator = new G4Navigator() |
static G4Navigator * | auxNavigatorCL = new G4Navigator() |
static G4Navigator * | auxNavigatorCLB = new G4Navigator() |
Integrator that ignores the field and uses the analytical solution to a multipole.
Definition at line 37 of file BDSIntegratorMultipoleThin.hh.
BDSIntegratorMultipoleThin::BDSIntegratorMultipoleThin | ( | BDSMagnetStrength const * | strength, |
G4double | brhoIn, | ||
G4Mag_EqRhs * | eqOfMIn | ||
) |
Definition at line 33 of file BDSIntegratorMultipoleThin.cc.
|
inlinevirtual |
Definition at line 44 of file BDSIntegratorMultipoleThin.hh.
|
private |
Calculate the factorial of n.
Definition at line 216 of file BDSIntegratorMultipoleThin.cc.
void BDSIntegratorMultipoleThin::OneStep | ( | const G4ThreeVector & | posIn, |
const G4ThreeVector & | momUIn, | ||
const G4double | momIn, | ||
G4ThreeVector & | posOut, | ||
G4ThreeVector & | momOut, | ||
G4double | h | ||
) | const |
Calculate a single step using thin multipole matrix. Unit momentum, momentum magnitude, and normalised bending radius are provided as arguments because they already calculated in the Stepper method.
Definition at line 122 of file BDSIntegratorMultipoleThin.cc.
References bnl, brho, bsl, BDSIntegratorMag::eqOfM, BDS::IsFinite(), and nfact.
Referenced by BDSIntegratorDipoleFringe::MultipoleStep(), and Stepper().
|
virtual |
The stepper for integration. The stepsize is fixed, equal to h. The reason for this is so that intermediate steps can be calculated and therefore the error ascertained or distance from the chord. Error calculation is not currently implemented.
Definition at line 63 of file BDSIntegratorMultipoleThin.cc.
References BDSIntegratorDrift::AdvanceDriftMag(), BDSIntegratorMag::backupStepperMomLimit, BDSIntegratorMag::ConvertToGlobal(), BDSAuxiliaryNavigator::ConvertToLocal(), BDSIntegratorMag::eqOfM, BDS::IsFiniteStrength(), OneStep(), BDSStep::PostStepPoint(), BDSStep::PreStepPoint(), BDSIntegratorMag::SetDistChord(), BDSIntegratorMag::thinElementLength, and BDSIntegratorMag::zeroStrength.
|
private |
Dipole component.
Definition at line 76 of file BDSIntegratorMultipoleThin.hh.
|
private |
Higher order components.
Definition at line 78 of file BDSIntegratorMultipoleThin.hh.
Referenced by OneStep().
|
private |
Magnetic rigidity for momentum scaling.
Definition at line 73 of file BDSIntegratorMultipoleThin.hh.
Referenced by OneStep().
|
private |
Higher order components.
Definition at line 79 of file BDSIntegratorMultipoleThin.hh.
Referenced by OneStep().
|
private |
Higher order components.
Definition at line 80 of file BDSIntegratorMultipoleThin.hh.
Referenced by OneStep().