BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
Trajectory information for only the primary. More...
#include <BDSTrajectoryPrimary.hh>
Public Member Functions | |
BDSTrajectoryPrimary (const G4Track *aTrack, G4bool interactive, const BDS::TrajectoryOptions &storageOptionsIn, G4bool storeTrajectoryPointsIn) | |
BDSTrajectoryPrimary (BDSTrajectoryPrimary &)=delete | |
copy constructor is not needed | |
virtual G4bool | IsPrimary () const |
Override and return true always. | |
void * | operator new (size_t) |
void | operator delete (void *) |
int | operator== (const BDSTrajectoryPrimary &right) const |
virtual void | AppendStep (const G4Step *aStep) |
virtual void | MergeTrajectory (G4VTrajectory *secondTrajectory) |
G4bool | HasHitSomething () const |
const BDSTrajectoryPoint * | FirstHit () const |
Accessor. | |
const BDSTrajectoryPoint * | LastPoint () const |
Accessor. | |
![]() | |
BDSTrajectory (const G4Track *aTrack, G4bool interactiveIn, const BDS::TrajectoryOptions &storageOptionsIn) | |
BDSTrajectory (BDSTrajectory &)=delete | |
copy constructor is not needed | |
void * | operator new (size_t) |
void | operator delete (void *) |
int | operator== (const BDSTrajectory &right) const |
virtual void | AppendStep (const G4Step *aStep) |
void | AppendStep (const BDSTrajectoryPoint *pointIn) |
void | CleanPoint (BDSTrajectoryPoint *point) const |
virtual void | MergeTrajectory (G4VTrajectory *secondTrajectory) |
Merge another trajectory into this one. | |
virtual G4VTrajectoryPoint * | GetPoint (G4int i) const |
Access a point - use this class's container. | |
virtual int | GetPointEntries () const |
Get number of trajectory points in this trajectory. | |
virtual G4bool | IsPrimary () const |
Method to identify which one is a primary. Overridden in derived class. | |
void | SetTrajIndex (G4int trajIndexIn) |
G4int | GetTrajIndex () const |
void | SetParentIndex (G4int parentIndexIn) |
G4int | GetParentIndex () const |
void | SetParentStepIndex (G4int parentStepIndexIn) |
The index of the step along the parent trajectory from which this one was created. | |
G4int | GetParentStepIndex () const |
G4int | GetDepth () const |
Depth in the tree. Will be filled later once all trajectories are created and sorted. | |
void | SetDepth (G4int depthIn) |
void | SetParent (BDSTrajectory *parentIn) |
Record the parent trajectory. | |
BDSTrajectory * | GetParent () const |
G4int | GetCreatorProcessType () const |
G4int | GetCreatorProcessSubType () const |
BDSTrajectoryPoint * | FirstInteraction () const |
BDSTrajectoryPoint * | LastInteraction () const |
Static Public Attributes | |
static G4bool | hasScatteredThisTurn = false |
Protected Attributes | |
BDSTrajectoryPoint * | firstHit |
Point owned by this class for the first scattering point. | |
BDSTrajectoryPoint * | lastPoint |
Point owned by this class for the last-most point. | |
![]() | |
G4int | creatorProcessType |
G4int | creatorProcessSubType |
G4double | weight |
G4bool | interactive |
G4bool | suppressTransportationAndNotInteractive |
const BDS::TrajectoryOptions | storageOptions |
BDSTrajectory * | parent |
G4int | trajIndex |
G4int | parentIndex |
G4int | parentStepIndex |
G4int | depth |
BDSTrajectoryPointsContainer * | fpBDSPointsContainer |
Private Member Functions | |
BDSTrajectoryPrimary ()=delete | |
No default constructor required. | |
Private Attributes | |
const G4bool | storeTrajectoryPoints |
Whether to use base class to store all points. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, BDSTrajectoryPrimary const &t) |
Output stream. | |
Trajectory information for only the primary.
Similar to BDSTrajectory but keeps two separate BDSTrajectoryPoints. One for the end of the trajectory (last hit), and one for the first scattering point (first 'hit').
Definition at line 48 of file BDSTrajectoryPrimary.hh.
BDSTrajectoryPrimary::BDSTrajectoryPrimary | ( | const G4Track * | aTrack, |
G4bool | interactive, | ||
const BDS::TrajectoryOptions & | storageOptionsIn, | ||
G4bool | storeTrajectoryPointsIn | ||
) |
Definition at line 36 of file BDSTrajectoryPrimary.cc.
|
virtual |
Definition at line 48 of file BDSTrajectoryPrimary.cc.
|
virtual |
Append a step point to this trajectory. This is required for the trajectory points to show up in the visualisation correctly.
Reimplemented from BDSTrajectory.
Definition at line 54 of file BDSTrajectoryPrimary.cc.
References BDSTrajectory::AppendStep(), firstHit, hasScatteredThisTurn, BDSTrajectoryPoint::IsScatteringPoint(), lastPoint, and storeTrajectoryPoints.
|
inline |
|
inline |
Whether this primary trajectory has hit an object (ie physics process invoked). Judged by casting first hit pointer to Boolean.
Definition at line 87 of file BDSTrajectoryPrimary.hh.
References firstHit.
|
inlinevirtual |
Override and return true always.
Reimplemented from BDSTrajectory.
Definition at line 62 of file BDSTrajectoryPrimary.hh.
|
inline |
|
virtual |
Merge another trajectory into this one. The first hit will always be lower in this one but the lastpoint could be later, so copy that. Must implement this function to avoid double deletion if trajectory is merged.
Reimplemented from BDSTrajectory.
Definition at line 85 of file BDSTrajectoryPrimary.cc.
References lastPoint, and BDSTrajectory::MergeTrajectory().
|
inline |
Definition at line 112 of file BDSTrajectoryPrimary.hh.
|
inline |
Definition at line 105 of file BDSTrajectoryPrimary.hh.
|
inline |
Definition at line 66 of file BDSTrajectoryPrimary.hh.
|
friend |
Output stream.
Definition at line 102 of file BDSTrajectoryPrimary.cc.
|
protected |
Point owned by this class for the first scattering point.
Definition at line 94 of file BDSTrajectoryPrimary.hh.
Referenced by AppendStep(), FirstHit(), and HasHitSomething().
|
static |
Whether this primary has scattered on this turn. It should be reset at the end of each turn. This is static so it can be done externally.
Definition at line 91 of file BDSTrajectoryPrimary.hh.
Referenced by AppendStep(), and BDSPTCOneTurnMap::ShouldApplyToPrimary().
|
protected |
Point owned by this class for the last-most point.
Definition at line 95 of file BDSTrajectoryPrimary.hh.
Referenced by AppendStep(), LastPoint(), and MergeTrajectory().
|
private |
Whether to use base class to store all points.
Definition at line 98 of file BDSTrajectoryPrimary.hh.
Referenced by AppendStep().