50 : fPosition(aValuePosition)
51 , fGlobalTime(aValueTime)
54 fpDynamicParticle = (apValueDynamicParticle) !=
nullptr
77 delete fpDynamicParticle;
78 delete fpUserInformation;
79 ClearAuxiliaryTrackInformation();
87 fPosition = right.fPosition;
88 fGlobalTime = right.fGlobalTime;
89 fLocalTime = right.fLocalTime;
90 fTrackLength = right.fTrackLength;
91 fWeight = right.fWeight;
92 fStepLength = right.fStepLength;
95 fpTouchable = right.fpTouchable;
96 fpNextTouchable = right.fpNextTouchable;
97 fpOriginTouchable = right.fpOriginTouchable;
104 fCurrentStepNumber = 0;
107 fCreatorModelID = right.fCreatorModelID;
110 fParentResonanceDef = right.fParentResonanceDef;
111 fParentResonanceID = right.fParentResonanceID;
114 fVelocity = right.fVelocity;
117 delete fpDynamicParticle;
121 fTrackStatus = right.fTrackStatus;
122 fBelowThreshold = right.fBelowThreshold;
123 fGoodForTracking = right.fGoodForTracking;
130 fVtxPosition = right.fVtxPosition;
131 fpLVAtVertex = right.fpLVAtVertex;
132 fVtxKineticEnergy = right.fVtxKineticEnergy;
133 fVtxMomentumDirection = right.fVtxMomentumDirection;
136 fpCreatorProcess =
nullptr;
137 delete fpUserInformation;
138 fpUserInformation =
nullptr;
140 prev_mat = right.prev_mat;
141 groupvel = right.groupvel;
142 prev_velocity = right.prev_velocity;
143 prev_momentum = right.prev_momentum;
145 is_OpticalPhoton = right.is_OpticalPhoton;
146 useGivenVelocity = right.useGivenVelocity;
148 ClearAuxiliaryTrackInformation();
165 G4bool update_groupvel =
false;
166 if(fpStep !=
nullptr)
179 if((mat !=
nullptr) && ((mat != prev_mat) || (groupvel ==
nullptr)))
184 update_groupvel =
true;
188 if(groupvel !=
nullptr)
192 velocity = prev_velocity;
197 if(update_groupvel || (current_momentum != prev_momentum))
199 velocity = groupvel->
Value(current_momentum);
200 prev_velocity = velocity;
201 prev_momentum = current_momentum;
212 if(fpAuxiliaryTrackInformationMap ==
nullptr)
214 fpAuxiliaryTrackInformationMap =
215 new std::map<G4int, G4VAuxiliaryTrackInformation*>;
220 ED <<
"Process/model ID <" <<
id <<
"> is invalid.";
221 G4Exception(
"G4VAuxiliaryTrackInformation::G4VAuxiliaryTrackInformation()",
224 (*fpAuxiliaryTrackInformationMap)[id] = info;
231 if(fpAuxiliaryTrackInformationMap ==
nullptr)
234 auto itr = fpAuxiliaryTrackInformationMap->find(
id);
235 if(itr == fpAuxiliaryTrackInformationMap->cend())
237 return (*itr).second;
243 if(fpAuxiliaryTrackInformationMap !=
nullptr &&
244 fpAuxiliaryTrackInformationMap->find(
id) != fpAuxiliaryTrackInformationMap->cend())
246 fpAuxiliaryTrackInformationMap->erase(
id);
253 if(fpAuxiliaryTrackInformationMap !=
nullptr)
261void G4Track::ClearAuxiliaryTrackInformation()
263 if(fpAuxiliaryTrackInformationMap ==
nullptr)
265 for(
const auto& itr : *fpAuxiliaryTrackInformationMap)
269 delete fpAuxiliaryTrackInformationMap;
270 fpAuxiliaryTrackInformationMap =
nullptr;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4Allocator< G4Track > *& aTrackAllocator()
G4ParticleDefinition * GetDefinition() const
G4double GetTotalMomentum() const
G4Material * GetMaterial() const
G4MaterialPropertyVector * GetProperty(const char *key) const
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
G4int GetPDGEncoding() const
static G4int GetModelIndex(const G4int modelID)
static G4int GetModelID(const G4int modelIndex)
G4double Value(const G4double energy, std::size_t &lastidx) const
G4double CalculateVelocityForOpticalPhoton() const
void SetAuxiliaryTrackInformation(G4int id, G4VAuxiliaryTrackInformation *info) const
void CopyTrackInfo(const G4Track &)
void RemoveAuxiliaryTrackInformation(G4int id)
G4VAuxiliaryTrackInformation * GetAuxiliaryTrackInformation(G4int id) const
G4Material * GetMaterial() const
G4Track & operator=(const G4Track &)
G4LogicalVolume * GetLogicalVolume() const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
#define G4ThreadLocalStatic