51 : fPosition(aValuePosition)
52 , fGlobalTime(aValueTime)
55 fpDynamicParticle = (apValueDynamicParticle)
78 delete fpDynamicParticle;
79 delete fpUserInformation;
80 ClearAuxiliaryTrackInformation();
88 fPosition = right.fPosition;
89 fGlobalTime = right.fGlobalTime;
90 fLocalTime = right.fLocalTime;
91 fTrackLength = right.fTrackLength;
92 fWeight = right.fWeight;
93 fStepLength = right.fStepLength;
100 fCurrentStepNumber = 0;
103 fVelocity = right.fVelocity;
106 delete fpDynamicParticle;
110 fTrackStatus = right.fTrackStatus;
111 fBelowThreshold = right.fBelowThreshold;
112 fGoodForTracking = right.fGoodForTracking;
119 fVtxPosition = right.fVtxPosition;
120 fpLVAtVertex = right.fpLVAtVertex;
121 fVtxKineticEnergy = right.fVtxKineticEnergy;
122 fVtxMomentumDirection = right.fVtxMomentumDirection;
125 fpCreatorProcess =
nullptr;
126 delete fpUserInformation;
127 fpUserInformation =
nullptr;
129 prev_mat = right.prev_mat;
130 groupvel = right.groupvel;
131 prev_velocity = right.prev_velocity;
132 prev_momentum = right.prev_momentum;
134 is_OpticalPhoton = right.is_OpticalPhoton;
135 useGivenVelocity = right.useGivenVelocity;
137 ClearAuxiliaryTrackInformation();
154 G4bool update_groupvel =
false;
155 if(fpStep !=
nullptr)
168 if((mat !=
nullptr) && ((mat != prev_mat) || (groupvel ==
nullptr)))
173 update_groupvel =
true;
177 if(groupvel !=
nullptr)
181 velocity = prev_velocity;
186 if(update_groupvel || (current_momentum != prev_momentum))
188 velocity = groupvel->
Value(current_momentum);
189 prev_velocity = velocity;
190 prev_momentum = current_momentum;
201 if(fpAuxiliaryTrackInformationMap ==
nullptr)
203 fpAuxiliaryTrackInformationMap =
204 new std::map<G4int, G4VAuxiliaryTrackInformation*>;
209 ED <<
"Process/model index <" << idx <<
"> is invalid.";
210 G4Exception(
"G4VAuxiliaryTrackInformation::G4VAuxiliaryTrackInformation()",
213 (*fpAuxiliaryTrackInformationMap)[idx] = info;
220 if(fpAuxiliaryTrackInformationMap ==
nullptr)
222 auto itr = fpAuxiliaryTrackInformationMap->find(idx);
223 if(itr == fpAuxiliaryTrackInformationMap->cend())
226 return (*itr).second;
232 if(fpAuxiliaryTrackInformationMap !=
nullptr
235 fpAuxiliaryTrackInformationMap->erase(idx);
242 if(fpAuxiliaryTrackInformationMap !=
nullptr)
250void G4Track::ClearAuxiliaryTrackInformation()
252 if(fpAuxiliaryTrackInformationMap ==
nullptr)
254 for(
auto itr = fpAuxiliaryTrackInformationMap->cbegin();
255 itr != fpAuxiliaryTrackInformationMap->cend(); ++itr)
259 delete fpAuxiliaryTrackInformationMap;
260 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, G4bool warning=false)
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
G4int GetPDGEncoding() const
static G4int GetIndex(const G4String &)
G4double Value(G4double theEnergy, std::size_t &lastidx) const
void SetAuxiliaryTrackInformation(G4int idx, G4VAuxiliaryTrackInformation *info) const
G4double CalculateVelocityForOpticalPhoton() const
void CopyTrackInfo(const G4Track &)
G4Material * GetMaterial() const
void RemoveAuxiliaryTrackInformation(G4int idx)
G4VAuxiliaryTrackInformation * GetAuxiliaryTrackInformation(G4int idx) const
G4Track & operator=(const G4Track &)
G4LogicalVolume * GetLogicalVolume() const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
#define G4ThreadLocalStatic