79 positionRecord =
new G4TrajectoryPointContainer();
99 fpRichPointContainer =
new G4TrajectoryPointContainer;
106 ParticleName = right.ParticleName;
107 PDGCharge = right.PDGCharge;
108 PDGEncoding = right.PDGEncoding;
109 fTrackID = right.fTrackID;
110 fParentID = right.fParentID;
111 initialKineticEnergy = right.initialKineticEnergy;
112 initialMomentum = right.initialMomentum;
113 positionRecord =
new G4TrajectoryPointContainer();
115 for (
auto& i : *right.positionRecord) {
120 fpInitialVolume = right.fpInitialVolume;
121 fpInitialNextVolume = right.fpInitialNextVolume;
122 fpCreatorProcess = right.fpCreatorProcess;
123 fCreatorModelID = right.fCreatorModelID;
124 fpFinalVolume = right.fpFinalVolume;
125 fpFinalNextVolume = right.fpFinalNextVolume;
126 fpEndingProcess = right.fpEndingProcess;
127 fFinalKineticEnergy = right.fFinalKineticEnergy;
128 fpRichPointContainer =
new G4TrajectoryPointContainer;
129 for (
auto& i : *right.fpRichPointContainer) {
137 if (fpRichPointContainer !=
nullptr) {
138 for (
auto& i : *fpRichPointContainer) {
141 fpRichPointContainer->clear();
142 delete fpRichPointContainer;
159 fFinalKineticEnergy =
166 if (secondTrajectory ==
nullptr)
return;
169 G4int ent = seco->GetPointEntries();
170 for (
G4int i = 1; i < ent; ++i) {
173 fpRichPointContainer->push_back((*(seco->fpRichPointContainer))[i]);
175 delete (*seco->fpRichPointContainer)[0];
176 seco->fpRichPointContainer->clear();
205 (*store)[ID] =
G4AttDef(ID,
"Track ID",
"Physics",
"",
"G4int");
208 (*store)[ID] =
G4AttDef(ID,
"Parent ID",
"Physics",
"",
"G4int");
211 (*store)[ID] =
G4AttDef(ID,
"Particle Name",
"Physics",
"",
"G4String");
214 (*store)[ID] =
G4AttDef(ID,
"Charge",
"Physics",
"e+",
"G4double");
217 (*store)[ID] =
G4AttDef(ID,
"PDG Encoding",
"Physics",
"",
"G4int");
220 (*store)[ID] =
G4AttDef(ID,
"Initial kinetic energy",
"Physics",
"G4BestUnit",
"G4double");
223 (*store)[ID] =
G4AttDef(ID,
"Initial momentum",
"Physics",
"G4BestUnit",
"G4ThreeVector");
226 (*store)[ID] =
G4AttDef(ID,
"Initial momentum magnitude",
"Physics",
"G4BestUnit",
"G4double");
229 (*store)[ID] =
G4AttDef(ID,
"No. of points",
"Physics",
"",
"G4int");
232 (*store)[ID] =
G4AttDef(ID,
"Initial Volume Path",
"Physics",
"",
"G4String");
235 (*store)[ID] =
G4AttDef(ID,
"Initial Next Volume Path",
"Physics",
"",
"G4String");
238 (*store)[ID] =
G4AttDef(ID,
"Creator Process Name",
"Physics",
"",
"G4String");
241 (*store)[ID] =
G4AttDef(ID,
"Creator Process Type Name",
"Physics",
"",
"G4String");
244 (*store)[ID] =
G4AttDef(ID,
"Creator Model ID",
"Physics",
"",
"G4int");
247 (*store)[ID] =
G4AttDef(ID,
"Creator Model Name",
"Physics",
"",
"G4String");
250 (*store)[ID] =
G4AttDef(ID,
"Final Volume Path",
"Physics",
"",
"G4String");
253 (*store)[ID] =
G4AttDef(ID,
"Final Next Volume Path",
"Physics",
"",
"G4String");
256 (*store)[ID] =
G4AttDef(ID,
"Ending Process Name",
"Physics",
"",
"G4String");
259 (*store)[ID] =
G4AttDef(ID,
"Ending Process Type Name",
"Physics",
"",
"G4String");
262 (*store)[ID] =
G4AttDef(ID,
"Final kinetic energy",
"Physics",
"G4BestUnit",
"G4double");
270 std::ostringstream oss;
272 for (
G4int i = depth; i >= 0; --i) {
274 if (i != 0) oss <<
'/';
283 auto values =
new std::vector<G4AttValue>;
286 values->push_back(
G4AttValue(
"PN", ParticleName,
""));
294 if (fpInitialVolume && (fpInitialVolume->GetVolume() !=
nullptr)) {
295 values->push_back(
G4AttValue(
"IVPath", Path(fpInitialVolume),
""));
298 values->push_back(
G4AttValue(
"IVPath",
"None",
""));
301 if (fpInitialNextVolume && (fpInitialNextVolume->GetVolume() !=
nullptr)) {
302 values->push_back(
G4AttValue(
"INVPath", Path(fpInitialNextVolume),
""));
305 values->push_back(
G4AttValue(
"INVPath",
"None",
""));
308 if (fpCreatorProcess !=
nullptr) {
309 values->push_back(
G4AttValue(
"CPN", fpCreatorProcess->GetProcessName(),
""));
314 values->push_back(
G4AttValue(
"CMN", creatorModelName,
""));
317 values->push_back(
G4AttValue(
"CPN",
"None",
""));
318 values->push_back(
G4AttValue(
"CPTN",
"None",
""));
319 values->push_back(
G4AttValue(
"CMID",
"None",
""));
320 values->push_back(
G4AttValue(
"CMN",
"None",
""));
323 if (fpFinalVolume && (fpFinalVolume->GetVolume() !=
nullptr)) {
324 values->push_back(
G4AttValue(
"FVPath", Path(fpFinalVolume),
""));
327 values->push_back(
G4AttValue(
"FVPath",
"None",
""));
330 if (fpFinalNextVolume && (fpFinalNextVolume->GetVolume() !=
nullptr)) {
331 values->push_back(
G4AttValue(
"FNVPath", Path(fpFinalNextVolume),
""));
334 values->push_back(
G4AttValue(
"FNVPath",
"None",
""));
337 if (fpEndingProcess !=
nullptr) {
338 values->push_back(
G4AttValue(
"EPN", fpEndingProcess->GetProcessName(),
""));
343 values->push_back(
G4AttValue(
"EPN",
"None",
""));
344 values->push_back(
G4AttValue(
"EPTN",
"None",
""));
G4TemplateAutoLock< G4Mutex > G4AutoLock
G4Allocator< G4RichTrajectory > *& aRichTrajectoryAllocator()
#define G4MUTEX_INITIALIZER
G4ReferenceCountedHandle< G4VTouchable > G4TouchableHandle
G4TouchableHandle is a type providing reference counting mechanism for any kind of touchable objects....
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
G4VPhysicalVolume * GetVolume(G4int depth=0) const
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