19#ifndef BDSPTCONETURNMAP_H
20#define BDSPTCONETURNMAP_H
22#include "BDSParticleCoordsFullGlobal.hh"
71 G4ThreeVector localMomentum,
83 G4double Evaluate(std::vector<PTCMapTerm>& terms,
88 G4double deltaP)
const;
90 G4double initialPrimaryMomentum;
92 G4double referenceMomentum;
95 std::set<G4int> turnsScattered;
102 G4double deltaPLastTurn;
104 std::vector<PTCMapTerm> xTerms;
105 std::vector<PTCMapTerm> yTerms;
106 std::vector<PTCMapTerm> pxTerms;
107 std::vector<PTCMapTerm> pyTerms;
108 std::vector<PTCMapTerm> deltaPTerms;
Class to load and use PTC 1 turn map.
G4bool ShouldApplyToPrimary(G4double momentum, G4int turnstaken)
Decides whether or not this should be applied. Can add more.
virtual ~BDSPTCOneTurnMap()
Destructor.
BDSPTCOneTurnMap(BDSPTCOneTurnMap &&other) noexcept=default
Move constructor.
void GetThisTurn(G4double &x, G4double &px, G4double &y, G4double &py, G4double &pz, G4int turnstaken)
Return the coordinates for this turn.
BDSPTCOneTurnMap()=delete
Default constructor.
void UpdateCoordinates(G4ThreeVector localPosition, G4ThreeVector localMomentum, G4int turnstaken)
Update coordinates if the last turn is greater than the number of turns taken.
void SetInitialPrimaryCoordinates(const BDSParticleCoordsFullGlobal &coords, G4bool offsetS0)
Load initial coordinates where the beam started and convert to PTC coordinates.
BDSPTCOneTurnMap(const BDSPTCOneTurnMap &other)=default
Copy constructor.
A set of particle coordinates in both local and global.
Wrapper for particle definition.