BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Friends
BDSTrajectory Class Reference

Trajectory information from track including last scatter etc. More...

#include <BDSTrajectory.hh>

Inheritance diagram for BDSTrajectory:
Inheritance graph
Collaboration diagram for BDSTrajectory:
Collaboration graph

Public Member Functions

 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.
 
BDSTrajectoryGetParent () const
 
G4int GetCreatorProcessType () const
 
G4int GetCreatorProcessSubType () const
 
BDSTrajectoryPointFirstInteraction () const
 
BDSTrajectoryPointLastInteraction () const
 

Protected Attributes

G4int creatorProcessType
 
G4int creatorProcessSubType
 
G4double weight
 
G4bool interactive
 
G4bool suppressTransportationAndNotInteractive
 
const BDS::TrajectoryOptions storageOptions
 
BDSTrajectoryparent
 
G4int trajIndex
 
G4int parentIndex
 
G4int parentStepIndex
 
G4int depth
 
BDSTrajectoryPointsContainer * fpBDSPointsContainer
 

Friends

std::ostream & operator<< (std::ostream &out, BDSTrajectory const &t)
 Output stream.
 

Detailed Description

Trajectory information from track including last scatter etc.

BDSTrajectory stores BDSTrajectoryPoints

Author
S. Boogert

Definition at line 43 of file BDSTrajectory.hh.

Constructor & Destructor Documentation

◆ BDSTrajectory()

BDSTrajectory::BDSTrajectory ( const G4Track *  aTrack,
G4bool  interactiveIn,
const BDS::TrajectoryOptions storageOptionsIn 
)

Definition at line 35 of file BDSTrajectory.cc.

◆ ~BDSTrajectory()

BDSTrajectory::~BDSTrajectory ( )
virtual

Definition at line 70 of file BDSTrajectory.cc.

Member Function Documentation

◆ AppendStep() [1/2]

void BDSTrajectory::AppendStep ( const BDSTrajectoryPoint pointIn)

Append a step point. Use a pre-made BDSTrajectoryPoint to save creating it again, which involves coordinate transforms.

Definition at line 79 of file BDSTrajectory.cc.

References CleanPoint(), fpBDSPointsContainer, BDSTrajectoryPoint::GetMaterial(), and BDSTrajectoryPoint::NotTransportationLimitedStep().

Here is the call graph for this function:

◆ AppendStep() [2/2]

void BDSTrajectory::AppendStep ( const G4Step *  aStep)
virtual

Append a step point to this trajectory. This is required for the trajectory points to show up in the visualisation correctly.

Reimplemented in BDSTrajectoryPrimary.

Definition at line 112 of file BDSTrajectory.cc.

References fpBDSPointsContainer.

Referenced by BDSTrajectoryPrimary::AppendStep().

Here is the caller graph for this function:

◆ CleanPoint()

void BDSTrajectory::CleanPoint ( BDSTrajectoryPoint point) const

Apply the options to store a trajectory extra delete them if not storing them. Used to compensate when copying a fuller primary trajectory point that will always have extra information, but may not be needed when appending to the primary trajectory.

Definition at line 102 of file BDSTrajectory.cc.

Referenced by AppendStep().

Here is the caller graph for this function:

◆ FirstInteraction()

BDSTrajectoryPoint * BDSTrajectory::FirstInteraction ( ) const

Find the first point in a trajectory where the post step process isn't fTransportation AND the post step process isn't fGeneral in combination with the post step process subtype isn't step_limiter.

Definition at line 166 of file BDSTrajectory.cc.

References GetPoint(), GetPointEntries(), and BDSTrajectoryPoint::IsScatteringPoint().

Here is the call graph for this function:

◆ GetCreatorProcessSubType()

G4int BDSTrajectory::GetCreatorProcessSubType ( ) const
inline

Definition at line 106 of file BDSTrajectory.hh.

◆ GetCreatorProcessType()

G4int BDSTrajectory::GetCreatorProcessType ( ) const
inline

Definition at line 105 of file BDSTrajectory.hh.

◆ GetDepth()

G4int BDSTrajectory::GetDepth ( ) const
inline

Depth in the tree. Will be filled later once all trajectories are created and sorted.

Definition at line 99 of file BDSTrajectory.hh.

◆ GetParent()

BDSTrajectory * BDSTrajectory::GetParent ( ) const
inline

Definition at line 104 of file BDSTrajectory.hh.

◆ GetParentIndex()

G4int BDSTrajectory::GetParentIndex ( ) const
inline

Definition at line 92 of file BDSTrajectory.hh.

◆ GetParentStepIndex()

G4int BDSTrajectory::GetParentStepIndex ( ) const
inline

Definition at line 96 of file BDSTrajectory.hh.

◆ GetPoint()

virtual G4VTrajectoryPoint * BDSTrajectory::GetPoint ( G4int  i) const
inlinevirtual

Access a point - use this class's container.

Definition at line 76 of file BDSTrajectory.hh.

References fpBDSPointsContainer.

Referenced by BDSOutputROOTEventTrajectory::FillIndividualTrajectory(), FirstInteraction(), and BDSEventAction::IdentifyTrajectoriesForStorage().

Here is the caller graph for this function:

◆ GetPointEntries()

virtual int BDSTrajectory::GetPointEntries ( ) const
inlinevirtual

Get number of trajectory points in this trajectory.

Definition at line 79 of file BDSTrajectory.hh.

References fpBDSPointsContainer.

Referenced by FirstInteraction(), BDSEventAction::IdentifyTrajectoriesForStorage(), and MergeTrajectory().

Here is the caller graph for this function:

◆ GetTrajIndex()

G4int BDSTrajectory::GetTrajIndex ( ) const
inline

Definition at line 87 of file BDSTrajectory.hh.

◆ IsPrimary()

virtual G4bool BDSTrajectory::IsPrimary ( ) const
inlinevirtual

Method to identify which one is a primary. Overridden in derived class.

Reimplemented in BDSTrajectoryPrimary.

Definition at line 82 of file BDSTrajectory.hh.

◆ LastInteraction()

BDSTrajectoryPoint * BDSTrajectory::LastInteraction ( ) const

Definition at line 181 of file BDSTrajectory.cc.

◆ MergeTrajectory()

void BDSTrajectory::MergeTrajectory ( G4VTrajectory *  secondTrajectory)
virtual

Merge another trajectory into this one.

Reimplemented in BDSTrajectoryPrimary.

Definition at line 152 of file BDSTrajectory.cc.

References fpBDSPointsContainer, and GetPointEntries().

Referenced by BDSTrajectoryPrimary::MergeTrajectory().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator delete()

void BDSTrajectory::operator delete ( void *  aTrajectory)
inline

Definition at line 145 of file BDSTrajectory.hh.

◆ operator new()

void * BDSTrajectory::operator new ( size_t  )
inline

Definition at line 138 of file BDSTrajectory.hh.

◆ operator==()

int BDSTrajectory::operator== ( const BDSTrajectory right) const
inline

Definition at line 57 of file BDSTrajectory.hh.

◆ SetDepth()

void BDSTrajectory::SetDepth ( G4int  depthIn)
inline

Definition at line 100 of file BDSTrajectory.hh.

◆ SetParent()

void BDSTrajectory::SetParent ( BDSTrajectory parentIn)
inline

Record the parent trajectory.

Definition at line 103 of file BDSTrajectory.hh.

Referenced by BDSEventAction::IdentifyTrajectoriesForStorage().

Here is the caller graph for this function:

◆ SetParentIndex()

void BDSTrajectory::SetParentIndex ( G4int  parentIndexIn)
inline

Record the TrajIndex (i.e. output index) of the trajectory of the parent trajectory for this one.

Definition at line 91 of file BDSTrajectory.hh.

◆ SetParentStepIndex()

void BDSTrajectory::SetParentStepIndex ( G4int  parentStepIndexIn)
inline

The index of the step along the parent trajectory from which this one was created.

Definition at line 95 of file BDSTrajectory.hh.

◆ SetTrajIndex()

void BDSTrajectory::SetTrajIndex ( G4int  trajIndexIn)
inline

The index of the trajectory assigned in the output from the reduced set of indices. This is why it will not be the same as the track ID.

Definition at line 86 of file BDSTrajectory.hh.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
BDSTrajectory const &  t 
)
friend

Output stream.

Definition at line 196 of file BDSTrajectory.cc.

Field Documentation

◆ creatorProcessSubType

G4int BDSTrajectory::creatorProcessSubType
protected

Definition at line 119 of file BDSTrajectory.hh.

◆ creatorProcessType

G4int BDSTrajectory::creatorProcessType
protected

Definition at line 118 of file BDSTrajectory.hh.

◆ depth

G4int BDSTrajectory::depth
protected

Definition at line 128 of file BDSTrajectory.hh.

◆ fpBDSPointsContainer

BDSTrajectoryPointsContainer* BDSTrajectory::fpBDSPointsContainer
protected

Container of all points. This is really a vector so all memory is dynamically allocated and there's no need to make this dynamically allocated itself a la all Geant4 examples.

Definition at line 133 of file BDSTrajectory.hh.

Referenced by AppendStep(), GetPoint(), GetPointEntries(), and MergeTrajectory().

◆ interactive

G4bool BDSTrajectory::interactive
protected

Definition at line 121 of file BDSTrajectory.hh.

◆ parent

BDSTrajectory* BDSTrajectory::parent
protected

Definition at line 124 of file BDSTrajectory.hh.

◆ parentIndex

G4int BDSTrajectory::parentIndex
protected

Definition at line 126 of file BDSTrajectory.hh.

◆ parentStepIndex

G4int BDSTrajectory::parentStepIndex
protected

Definition at line 127 of file BDSTrajectory.hh.

◆ storageOptions

const BDS::TrajectoryOptions BDSTrajectory::storageOptions
protected

Definition at line 123 of file BDSTrajectory.hh.

◆ suppressTransportationAndNotInteractive

G4bool BDSTrajectory::suppressTransportationAndNotInteractive
protected

Definition at line 122 of file BDSTrajectory.hh.

◆ trajIndex

G4int BDSTrajectory::trajIndex
protected

Definition at line 125 of file BDSTrajectory.hh.

◆ weight

G4double BDSTrajectory::weight
protected

Definition at line 120 of file BDSTrajectory.hh.


The documentation for this class was generated from the following files: