19#ifndef BDSTRAJECTORYPOINT_H
20#define BDSTRAJECTORYPOINT_H
21#include "BDSTrajectoryPointIon.hh"
22#include "BDSTrajectoryPointLocal.hh"
23#include "BDSTrajectoryPointLink.hh"
26#include "G4Allocator.hh"
27#include "G4TrajectoryPoint.hh"
53 G4bool storeExtrasLocalIn,
54 G4bool storeExtrasLinkIn,
55 G4bool storeExtrasIonIn);
60 G4bool storeExtrasLocalIn,
61 G4bool storeExtrasLinkIn,
62 G4bool storeExtrasIonIn);
69 inline void *
operator new(size_t);
70 inline void operator delete(
void *aTrajectoryPoint);
73 inline void DeleteExtraLocal() {
delete extraLocal; extraLocal =
nullptr;}
74 inline void DeleteExtraLinks() {
delete extraLink; extraLink =
nullptr;}
75 inline void DeleteExtraIon() {
delete extraIon; extraIon =
nullptr;}
91 G4double totalEnergyDeposit);
121 inline G4ThreeVector
GetPositionLocal()
const {
return extraLocal ? extraLocal->positionLocal : G4ThreeVector();}
122 inline G4ThreeVector
GetMomentumLocal()
const {
return extraLocal ? extraLocal->momentumLocal : G4ThreeVector();}
126 inline G4int
GetCharge()
const {
return extraLink ? extraLink->charge : 0;}
128 inline G4int
GetTurnsTaken()
const {
return extraLink ? extraLink->turnsTaken : 0;}
129 inline G4double
GetMass()
const {
return extraLink ? extraLink->mass : 0;}
130 inline G4double
GetRigidity()
const {
return extraLink ? extraLink->rigidity : 0;}
134 inline G4bool
GetIsIon()
const {
return extraIon ? extraIon->isIon :
false;}
135 inline G4int
GetIonA()
const {
return extraIon ? extraIon->ionA : 0;}
136 inline G4int
GetIonZ()
const {
return extraIon ? extraIon->ionZ : 0;}
137 inline G4int
GetNElectrons()
const {
return extraIon ? extraIon->nElectrons : 0;}
204extern G4Allocator<BDSTrajectoryPoint> bdsTrajectoryPointAllocator;
206inline void* BDSTrajectoryPoint::operator
new(size_t)
208 void *aTrajectoryPoint;
209 aTrajectoryPoint = (
void *) bdsTrajectoryPointAllocator.MallocSingle();
210 return aTrajectoryPoint;
213inline void BDSTrajectoryPoint::operator
delete(
void *aTrajectoryPoint)
Extra G4Navigator to get coordinate transforms.
A vector of BDSBeamlineElement instances - a beamline.
Extra information recorded for a single piece of energy deposition.
Extra information recorded for a single piece of Trajectory Link information.
Extra information recorded for a single piece of energy deposition.
A Point in a trajectory with extra information.
G4double preS
Global curvilinear S coordinate of pre-step point.
G4double GetKineticEnergy() const
Accessor for the extra information links.
G4double GetPreEnergy() const
Accessor.
G4double GetPostS() const
Accessor.
G4int GetCharge() const
Accessor for the extra information links.
G4ThreeVector postMomentum
Momentum of post-step point.
BDSBeamline * beamline
Beam line (if any) point belongs to (always mass world).
BDSBeamline * GetBeamLine() const
Accessor.
void StoreExtrasIon(const G4Track *track)
Utility function to prepare and fill extra ion variables.
G4int beamlineIndex
Index to beam line element in the mass world beam line.
G4double GetPreGlobalTime() const
Accessor.
G4bool operator>=(const BDSTrajectoryPoint &other) const
Comparison operator.
friend std::ostream & operator<<(std::ostream &out, BDSTrajectoryPoint const &p)
Output stream.
G4int GetPostProcessType() const
Accessor.
G4bool operator<(const BDSTrajectoryPoint &other) const
Comparison operator.
G4ThreeVector GetMomentumLocal() const
Accessor.
void SetMaterial(G4Material *materialIn)
G4int GetPreProcessSubType() const
Accessor.
G4bool GetIsIon() const
Accessor for the extra information ions.
G4double PostPosR() const
Return the transverse local radius in x,y.
G4ThreeVector GetPostPosLocal() const
Accessor.
G4double GetPreWeight() const
Accessor.
G4double postGlobalTime
Time since event started of post-step point.
G4double GetRigidity() const
Accessor for the extra information links.
G4double postEnergy
Kinetic energy of post step point.
G4int GetTurnsTaken() const
Accessor for the extra information links.
G4double PrePosR() const
Return the transverse local radius in x,y.
G4double GetEnergyDeposit() const
Accessor.
G4bool operator<=(const BDSTrajectoryPoint &other) const
Comparison operator.
void StoreExtrasLink(const G4Track *track)
Utility function to prepare and fill extra link variables.
G4double GetMass() const
Accessor for the extra information links.
static BDSAuxiliaryNavigator * auxNavigator
G4double GetPreS() const
Accessor.
G4Material * material
Material point for pre-step point.
G4bool operator>(const BDSTrajectoryPoint &other) const
Comparison operator.
BDSTrajectoryPoint()
Default constructor.
G4double postWeight
Weight associated with post step point.
G4int GetPreProcessType() const
Accessor.
G4ThreeVector prePosLocal
Local coordinates of pre-step point.
G4int GetIonZ() const
Accessor for the extra information ions.
G4ThreeVector GetPositionLocal() const
Accessor for the extra information local.
G4int postProcessSubType
Process sub type of post step point.
G4ThreeVector postPosLocal
Local coordinates of post-step point.
G4double GetPostEnergy() const
Accessor.
G4double GetPostWeight() const
Accessor.
G4int GetPostProcessSubType() const
Accessor.
G4bool NotTransportationLimitedStep() const
Return true if step isn't defined by transportation processes.
G4ThreeVector GetPostMomentum() const
Accessor.
G4int preProcessType
Process type of pre-step point.
G4double energyDeposit
Total energy deposited during step.
G4bool IsScatteringPoint() const
G4int GetBeamLineIndex() const
Accessor.
G4double preWeight
Weight associated with pre-step point.
G4int GetNElectrons() const
Accessor for the extra information ions.
G4int GetIonA() const
Accessor for the extra information ions.
G4double GetPostGlobalTime() const
Accessor.
G4ThreeVector preMomentum
Momentum of pre-step point.
G4Material * GetMaterial() const
Accessor.
void InitialiseVariables()
G4int preProcessSubType
Process sub type of pre-step point.
G4double preGlobalTime
Time since event started of pre-step point.
G4ThreeVector GetPreMomentum() const
Accessor.
G4ThreeVector GetPrePosLocal() const
Accessor.
G4double preEnergy
Kinetic energy of pre-step point.
G4double postS
Global curvilinear S coordinate of post step point.
G4int postProcessType
Process type of post step point.
static G4double dEThresholdForScattering