79 positionRecord =
new G4TrajectoryPointContainer();
99 fpRichPointContainer =
new G4TrajectoryPointContainer;
105 ParticleName = right.ParticleName;
106 PDGCharge = right.PDGCharge;
107 PDGEncoding = right.PDGEncoding;
108 fTrackID = right.fTrackID;
109 fParentID = right.fParentID;
110 initialKineticEnergy = right.initialKineticEnergy;
111 initialMomentum = right.initialMomentum;
112 positionRecord =
new G4TrajectoryPointContainer();
114 for (
auto& i : *right.positionRecord) {
119 fpInitialVolume = right.fpInitialVolume;
120 fpInitialNextVolume = right.fpInitialNextVolume;
121 fpCreatorProcess = right.fpCreatorProcess;
122 fCreatorModelID = right.fCreatorModelID;
123 fpFinalVolume = right.fpFinalVolume;
124 fpFinalNextVolume = right.fpFinalNextVolume;
125 fpEndingProcess = right.fpEndingProcess;
126 fFinalKineticEnergy = right.fFinalKineticEnergy;
127 fpRichPointContainer =
new G4TrajectoryPointContainer;
128 for (
auto& i : *right.fpRichPointContainer) {
136 if (fpRichPointContainer !=
nullptr) {
137 for (
auto& i : *fpRichPointContainer) {
140 fpRichPointContainer->clear();
141 delete fpRichPointContainer;
158 fFinalKineticEnergy =
165 if (secondTrajectory ==
nullptr)
return;
168 G4int ent = seco->GetPointEntries();
169 for (
G4int i = 1; i < ent; ++i) {
172 fpRichPointContainer->push_back((*(seco->fpRichPointContainer))[i]);
174 delete (*seco->fpRichPointContainer)[0];
175 seco->fpRichPointContainer->clear();
204 (*store)[ID] =
G4AttDef(ID,
"Track ID",
"Physics",
"",
"G4int");
207 (*store)[ID] =
G4AttDef(ID,
"Parent ID",
"Physics",
"",
"G4int");
210 (*store)[ID] =
G4AttDef(ID,
"Particle Name",
"Physics",
"",
"G4String");
213 (*store)[ID] =
G4AttDef(ID,
"Charge",
"Physics",
"e+",
"G4double");
216 (*store)[ID] =
G4AttDef(ID,
"PDG Encoding",
"Physics",
"",
"G4int");
219 (*store)[ID] =
G4AttDef(ID,
"Initial kinetic energy",
"Physics",
"G4BestUnit",
"G4double");
222 (*store)[ID] =
G4AttDef(ID,
"Initial momentum",
"Physics",
"G4BestUnit",
"G4ThreeVector");
225 (*store)[ID] =
G4AttDef(ID,
"Initial momentum magnitude",
"Physics",
"G4BestUnit",
"G4double");
228 (*store)[ID] =
G4AttDef(ID,
"No. of points",
"Physics",
"",
"G4int");
231 (*store)[ID] =
G4AttDef(ID,
"Initial Volume Path",
"Physics",
"",
"G4String");
234 (*store)[ID] =
G4AttDef(ID,
"Initial Next Volume Path",
"Physics",
"",
"G4String");
237 (*store)[ID] =
G4AttDef(ID,
"Creator Process Name",
"Physics",
"",
"G4String");
240 (*store)[ID] =
G4AttDef(ID,
"Creator Process Type Name",
"Physics",
"",
"G4String");
243 (*store)[ID] =
G4AttDef(ID,
"Creator Model ID",
"Physics",
"",
"G4int");
246 (*store)[ID] =
G4AttDef(ID,
"Creator Model Name",
"Physics",
"",
"G4String");
249 (*store)[ID] =
G4AttDef(ID,
"Final Volume Path",
"Physics",
"",
"G4String");
252 (*store)[ID] =
G4AttDef(ID,
"Final Next Volume Path",
"Physics",
"",
"G4String");
255 (*store)[ID] =
G4AttDef(ID,
"Ending Process Name",
"Physics",
"",
"G4String");
258 (*store)[ID] =
G4AttDef(ID,
"Ending Process Type Name",
"Physics",
"",
"G4String");
261 (*store)[ID] =
G4AttDef(ID,
"Final kinetic energy",
"Physics",
"G4BestUnit",
"G4double");
269 std::ostringstream oss;
271 for (
G4int i = depth; i >= 0; --i) {
273 if (i != 0) oss <<
'/';
282 auto values =
new std::vector<G4AttValue>;
285 values->push_back(
G4AttValue(
"PN", ParticleName,
""));
293 if (fpInitialVolume && (fpInitialVolume->GetVolume() !=
nullptr)) {
294 values->push_back(
G4AttValue(
"IVPath", Path(fpInitialVolume),
""));
297 values->push_back(
G4AttValue(
"IVPath",
"None",
""));
300 if (fpInitialNextVolume && (fpInitialNextVolume->GetVolume() !=
nullptr)) {
301 values->push_back(
G4AttValue(
"INVPath", Path(fpInitialNextVolume),
""));
304 values->push_back(
G4AttValue(
"INVPath",
"None",
""));
307 if (fpCreatorProcess !=
nullptr) {
308 values->push_back(
G4AttValue(
"CPN", fpCreatorProcess->GetProcessName(),
""));
313 values->push_back(
G4AttValue(
"CMN", creatorModelName,
""));
316 values->push_back(
G4AttValue(
"CPN",
"None",
""));
317 values->push_back(
G4AttValue(
"CPTN",
"None",
""));
318 values->push_back(
G4AttValue(
"CMID",
"None",
""));
319 values->push_back(
G4AttValue(
"CMN",
"None",
""));
322 if (fpFinalVolume && (fpFinalVolume->GetVolume() !=
nullptr)) {
323 values->push_back(
G4AttValue(
"FVPath", Path(fpFinalVolume),
""));
326 values->push_back(
G4AttValue(
"FVPath",
"None",
""));
329 if (fpFinalNextVolume && (fpFinalNextVolume->GetVolume() !=
nullptr)) {
330 values->push_back(
G4AttValue(
"FNVPath", Path(fpFinalNextVolume),
""));
333 values->push_back(
G4AttValue(
"FNVPath",
"None",
""));
336 if (fpEndingProcess !=
nullptr) {
337 values->push_back(
G4AttValue(
"EPN", fpEndingProcess->GetProcessName(),
""));
342 values->push_back(
G4AttValue(
"EPN",
"None",
""));
343 values->push_back(
G4AttValue(
"EPTN",
"None",
""));
G4TemplateAutoLock< G4Mutex > G4AutoLock
G4Allocator< G4RichTrajectory > *& aRichTrajectoryAllocator()
#define G4MUTEX_INITIALIZER
G4ReferenceCountedHandle< G4VTouchable > G4TouchableHandle
G4GLOB_DLL std::ostream G4cout
G4int GetPDGEncoding() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
static G4ParticleTable * GetParticleTable()
static const G4String GetModelNameFromID(const G4int modelID)
void AppendStep(const G4Step *aStep) override
const std::map< G4String, G4AttDef > * GetAttDefs() const override
G4int GetPointEntries() const override
void DrawTrajectory() const override
G4VTrajectory * CloneForMaster() const override
friend class G4ClonedRichTrajectory
G4ParticleDefinition * GetParticleDefinition()
void MergeTrajectory(G4VTrajectory *secondTrajectory) override
~G4RichTrajectory() override
G4RichTrajectory()=default
void ShowTrajectory(std::ostream &os=G4cout) const override
std::vector< G4AttValue > * CreateAttValues() const override
const G4VProcess * GetProcessDefinedStep() const
G4double GetKineticEnergy() const
G4Track * GetTrack() const
G4StepPoint * GetPreStepPoint() const
G4double GetTotalEnergyDeposit() const
G4StepPoint * GetPostStepPoint() const
G4int GetCopyNumber(G4int depth=0) const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
virtual G4int GetHistoryDepth() const
const G4TouchableHandle & GetNextTouchableHandle() const
const G4VProcess * GetCreatorProcess() const
G4int GetCreatorModelID() const
G4int GetCurrentStepNumber() const
G4ThreeVector GetMomentum() const
G4ParticleDefinition * GetDefinition() const
const G4TouchableHandle & GetTouchableHandle() const
G4double GetKineticEnergy() const
G4int GetParentID() const
static G4String ConvertToString(G4bool boolVal)
const G4String & GetName() const
static const G4String & GetProcessTypeName(G4ProcessType)
virtual void ShowTrajectory(std::ostream &os=G4cout) const
virtual void DrawTrajectory() const
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)
#define G4ThreadLocalStatic