56 ParticleName = right.ParticleName;
57 PDGCharge = right.PDGCharge;
58 PDGEncoding = right.PDGEncoding;
59 fTrackID = right.fTrackID;
60 fParentID = right.fParentID;
61 initialKineticEnergy = right.initialKineticEnergy;
62 initialMomentum = right.initialMomentum;
63 positionRecord =
new G4ClonedTrajectoryPointContainer();
65 for (
auto& i : *right.positionRecord) {
73 if (positionRecord !=
nullptr) {
74 for (
auto& i : *positionRecord) {
77 positionRecord->clear();
78 delete positionRecord;
104 (*store)[ID] =
G4AttDef(ID,
"Track ID",
"Physics",
"",
"G4int");
107 (*store)[PID] =
G4AttDef(PID,
"Parent ID",
"Physics",
"",
"G4int");
110 (*store)[PN] =
G4AttDef(PN,
"Particle Name",
"Physics",
"",
"G4String");
113 (*store)[Ch] =
G4AttDef(Ch,
"Charge",
"Physics",
"e+",
"G4double");
116 (*store)[PDG] =
G4AttDef(PDG,
"PDG Encoding",
"Physics",
"",
"G4int");
119 (*store)[IKE] =
G4AttDef(IKE,
"Initial kinetic energy",
"Physics",
"G4BestUnit",
"G4double");
122 (*store)[IMom] =
G4AttDef(IMom,
"Initial momentum",
"Physics",
"G4BestUnit",
"G4ThreeVector");
126 G4AttDef(IMag,
"Initial momentum magnitude",
"Physics",
"G4BestUnit",
"G4double");
129 (*store)[NTP] =
G4AttDef(NTP,
"No. of points",
"Physics",
"",
"G4int");
136 auto values =
new std::vector<G4AttValue>;
142 values->push_back(
G4AttValue(
"PN", ParticleName,
""));
175 if (secondTrajectory ==
nullptr)
return;
178 G4int ent = seco->GetPointEntries();
179 for (
G4int i = 1; i < ent; ++i)
181 positionRecord->push_back((*(seco->positionRecord))[i]);
183 delete (*seco->positionRecord)[0];
184 seco->positionRecord->clear();
G4Allocator< G4ClonedTrajectory > *& aClonedTrajectoryAllocator()
G4GLOB_DLL std::ostream G4cout
G4ClonedTrajectory()=default
G4int GetPointEntries() const override
G4ParticleDefinition * GetParticleDefinition()
void AppendStep(const G4Step *aStep) override
~G4ClonedTrajectory() override
std::vector< G4AttValue > * CreateAttValues() const override
void DrawTrajectory() const override
const std::map< G4String, G4AttDef > * GetAttDefs() const override
void MergeTrajectory(G4VTrajectory *secondTrajectory) override
void ShowTrajectory(std::ostream &os=G4cout) const override
static G4ParticleTable * GetParticleTable()
const G4ThreeVector & GetPosition() const
G4StepPoint * GetPostStepPoint() const
static G4String ConvertToString(G4bool boolVal)
virtual void ShowTrajectory(std::ostream &os=G4cout) const
virtual void DrawTrajectory() const
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)