19#include "BDSTrajectory.hh"
20#include "BDSTrajectoryPoint.hh"
23#include "G4Allocator.hh"
26#include "G4VProcess.hh"
27#include "G4TrajectoryContainer.hh"
32G4Allocator<BDSTrajectory> bdsTrajectoryAllocator;
34BDSTrajectory::BDSTrajectory(
const G4Track* aTrack,
38 interactive(interactiveIn),
39 storageOptions(storageOptionsIn),
46 suppressTransportationAndNotInteractive = storageOptionsIn.suppressTransportationSteps && !interactiveIn;
47 const G4VProcess* proc = aTrack->GetCreatorProcess();
50 creatorProcessType = aTrack->GetCreatorProcess()->GetProcessType();
51 creatorProcessSubType = aTrack->GetCreatorProcess()->GetProcessSubType();
55 creatorProcessType = -1;
56 creatorProcessSubType = -1;
58 weight = aTrack->GetWeight();
61 fpBDSPointsContainer =
new BDSTrajectoryPointsContainer();
64 storageOptions.storeLocal,
65 storageOptions.storeLinks,
66 storageOptions.storeIon));
69BDSTrajectory::~BDSTrajectory()
80 if (suppressTransportationAndNotInteractive)
86 {(*fpBDSPointsContainer)[0]->SetMaterial(pointIn->
GetMaterial());}
95 {(*fpBDSPointsContainer)[0]->SetMaterial(pointIn->
GetMaterial());}
103 if (!storageOptions.storeIon)
104 {point->DeleteExtraIon();}
105 if (!storageOptions.storeLinks)
106 {point->DeleteExtraLinks();}
107 if (!storageOptions.storeLocal)
108 {point->DeleteExtraLocal();}
121 {(*fpBDSPointsContainer)[0]->SetMaterial(aStep->GetTrack()->GetMaterial());}
122 if (suppressTransportationAndNotInteractive)
127 auto postStepPoint = aStep->GetPostStepPoint();
128 const G4VProcess* postProcess = postStepPoint->GetProcessDefinedStep();
131 G4int postProcessType = postProcess->GetProcessType();
132 if(postProcessType != 1 &&
133 postProcessType != 10 )
136 storageOptions.storeLocal,
137 storageOptions.storeLinks,
138 storageOptions.storeIon));
145 storageOptions.storeLocal,
146 storageOptions.storeLinks,
147 storageOptions.storeIon));
153 if(!secondTrajectory)
159 for (G4int i = 1; i < ent; ++i)
175 G4cout << __METHOD_NAME__ <<
"no interaction" << G4endl;
190 G4cout << __METHOD_NAME__ <<
"no interaction" << G4endl;
198 {out << *(static_cast<BDSTrajectoryPoint*>(t.
GetPoint(i))) << G4endl;}
A Point in a trajectory with extra information.
G4bool NotTransportationLimitedStep() const
Return true if step isn't defined by transportation processes.
G4bool IsScatteringPoint() const
G4Material * GetMaterial() const
Accessor.
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.
virtual G4VTrajectoryPoint * GetPoint(G4int i) const
Access a point - use this class's container.
void CleanPoint(BDSTrajectoryPoint *point) const
virtual void AppendStep(const G4Step *aStep)
BDSTrajectoryPointsContainer * fpBDSPointsContainer