18#ifndef BDSTRAJECTORY_H
19#define BDSTRAJECTORY_H
20#include "BDSTrajectoryOptions.hh"
21#include "BDSTrajectoryPoint.hh"
22#include "G4Trajectory.hh"
29class G4TrajectoryContainer;
30class G4VTrajectoryPoint;
32typedef std::vector<BDSTrajectoryPoint*> BDSTrajectoryPointsContainer;
54 inline void*
operator new(size_t);
55 inline void operator delete(
void*);
56 inline int operator == (
const BDSTrajectory& right)
const {
return (
this==&right);}
85 inline void SetTrajIndex(G4int trajIndexIn) {trajIndex = trajIndexIn;}
86 inline G4int GetTrajIndex()
const {
return trajIndex;}
90 inline void SetParentIndex(G4int parentIndexIn) {parentIndex = parentIndexIn;}
91 inline G4int GetParentIndex()
const {
return parentIndex;}
95 inline G4int GetParentStepIndex()
const {
return parentStepIndex;}
99 inline void SetDepth(G4int depthIn) {depth = depthIn;}
104 inline G4int GetCreatorProcessType()
const {
return creatorProcessType;}
105 inline G4int GetCreatorProcessSubType()
const {
return creatorProcessSubType;}
117 G4int creatorProcessType;
118 G4int creatorProcessSubType;
121 G4bool suppressTransportationAndNotInteractive;
126 G4int parentStepIndex;
135extern G4Allocator<BDSTrajectory> bdsTrajectoryAllocator;
137inline void* BDSTrajectory::operator
new(size_t)
140 aTrajectory = (
void*)bdsTrajectoryAllocator.MallocSingle();
144inline void BDSTrajectory::operator
delete(
void* aTrajectory)
145{bdsTrajectoryAllocator.FreeSingle((
BDSTrajectory*)aTrajectory);}
A Point in a trajectory with extra information.
Trajectory information from track including last scatter etc.
virtual int GetPointEntries() const
Get number of trajectory points in this trajectory.
BDSTrajectoryPoint * FirstInteraction() const
virtual void MergeTrajectory(G4VTrajectory *secondTrajectory)
Merge another trajectory into this one.
void SetTrajIndex(G4int trajIndexIn)
void SetParentStepIndex(G4int parentStepIndexIn)
The index of the step along the parent trajectory from which this one was created.
virtual G4VTrajectoryPoint * GetPoint(G4int i) const
Access a point - use this class's container.
BDSTrajectory(BDSTrajectory &)=delete
copy constructor is not needed
friend std::ostream & operator<<(std::ostream &out, BDSTrajectory const &t)
Output stream.
void SetParent(BDSTrajectory *parentIn)
Record the parent trajectory.
void CleanPoint(BDSTrajectoryPoint *point) const
virtual void AppendStep(const G4Step *aStep)
virtual G4bool IsPrimary() const
Method to identify which one is a primary. Overridden in derived class.
void SetParentIndex(G4int parentIndexIn)
BDSTrajectoryPointsContainer * fpBDSPointsContainer
G4int GetDepth() const
Depth in the tree. Will be filled later once all trajectories are created and sorted.