|
BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Class to load and use PTC 1 turn map. More...
#include <BDSPTCOneTurnMap.hh>

Data Structures | |
| struct | PTCMapTerm |
Public Member Functions | |
| BDSPTCOneTurnMap ()=delete | |
| Default constructor. | |
| BDSPTCOneTurnMap (const BDSPTCOneTurnMap &other)=default | |
| Copy constructor. | |
| BDSPTCOneTurnMap (BDSPTCOneTurnMap &&other) noexcept=default | |
| Move constructor. | |
| virtual | ~BDSPTCOneTurnMap () |
| Destructor. | |
| BDSPTCOneTurnMap (const G4String &maptableFile, const BDSParticleDefinition *designParticle) | |
| Main constructor with path to maptable file. | |
| G4bool | ShouldApplyToPrimary (G4double momentum, G4int turnstaken) |
| Decides whether or not this should be applied. Can add more. | |
| void | SetInitialPrimaryCoordinates (const BDSParticleCoordsFullGlobal &coords, G4bool offsetS0) |
| Load initial coordinates where the beam started and convert to PTC coordinates. | |
| void | UpdateCoordinates (G4ThreeVector localPosition, G4ThreeVector localMomentum, G4int turnstaken) |
| Update coordinates if the last turn is greater than the number of turns taken. | |
| void | GetThisTurn (G4double &x, G4double &px, G4double &y, G4double &py, G4double &pz, G4int turnstaken) |
| Return the coordinates for this turn. | |
Private Member Functions | |
| G4double | Evaluate (std::vector< PTCMapTerm > &terms, G4double x, G4double px, G4double y, G4double py, G4double deltaP) const |
Private Attributes | |
| G4double | initialPrimaryMomentum |
| G4bool | beamOffsetS0 |
| G4double | referenceMomentum |
| G4double | mass |
| std::set< G4int > | turnsScattered |
| G4int | lastTurnNumber |
| G4double | xLastTurn |
| G4double | pxLastTurn |
| G4double | yLastTurn |
| G4double | pyLastTurn |
| G4double | deltaPLastTurn |
| std::vector< PTCMapTerm > | xTerms |
| std::vector< PTCMapTerm > | yTerms |
| std::vector< PTCMapTerm > | pxTerms |
| std::vector< PTCMapTerm > | pyTerms |
| std::vector< PTCMapTerm > | deltaPTerms |
Class to load and use PTC 1 turn map.
This class uses PTC units internally for calculating the result of the map.
Definition at line 40 of file BDSPTCOneTurnMap.hh.
|
inlinevirtual |
Destructor.
Definition at line 56 of file BDSPTCOneTurnMap.hh.
| BDSPTCOneTurnMap::BDSPTCOneTurnMap | ( | const G4String & | maptableFile, |
| const BDSParticleDefinition * | designParticle | ||
| ) |
Main constructor with path to maptable file.
Definition at line 38 of file BDSPTCOneTurnMap.cc.
References BDS::GetFullPath(), BDSParticleDefinition::Mass(), and BDSParticleDefinition::Momentum().

|
private |
Definition at line 247 of file BDSPTCOneTurnMap.cc.
| void BDSPTCOneTurnMap::GetThisTurn | ( | G4double & | x, |
| G4double & | px, | ||
| G4double & | y, | ||
| G4double & | py, | ||
| G4double & | pz, | ||
| G4int | turnstaken | ||
| ) |
Return the coordinates for this turn.
Definition at line 127 of file BDSPTCOneTurnMap.cc.
| void BDSPTCOneTurnMap::SetInitialPrimaryCoordinates | ( | const BDSParticleCoordsFullGlobal & | coords, |
| G4bool | offsetS0 | ||
| ) |
Load initial coordinates where the beam started and convert to PTC coordinates.
Definition at line 107 of file BDSPTCOneTurnMap.cc.
References BDSGlobalConstants::Instance().
Referenced by BDSPrimaryGeneratorAction::GeneratePrimaries().


| G4bool BDSPTCOneTurnMap::ShouldApplyToPrimary | ( | G4double | momentum, |
| G4int | turnstaken | ||
| ) |
Decides whether or not this should be applied. Can add more.
Definition at line 267 of file BDSPTCOneTurnMap.cc.
References BDSTrajectoryPrimary::hasScatteredThisTurn.
| void BDSPTCOneTurnMap::UpdateCoordinates | ( | G4ThreeVector | localPosition, |
| G4ThreeVector | localMomentum, | ||
| G4int | turnstaken | ||
| ) |
Update coordinates if the last turn is greater than the number of turns taken.
Definition at line 320 of file BDSPTCOneTurnMap.cc.
|
private |
Definition at line 91 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 102 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 108 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 90 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 97 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 93 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 99 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 106 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 101 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 107 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 92 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 95 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 98 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 104 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 100 of file BDSPTCOneTurnMap.hh.
|
private |
Definition at line 105 of file BDSPTCOneTurnMap.hh.