61 : fCurrentStepNumber(0), fPosition(aValuePosition),
62 fGlobalTime(aValueTime), fLocalTime(0.),
64 fParentID(0), fTrackID(0),
66 fpDynamicParticle(apValueDynamicParticle),
68 fBelowThreshold(false), fGoodForTracking(false),
69 fStepLength(0.0), fWeight(1.0),
71 fVtxKineticEnergy(0.0),
72 fpLVAtVertex(0), fpCreatorProcess(0),
73 fCreatorModelIndex(-1),
75 prev_mat(0), groupvel(0),
76 prev_velocity(0.0), prev_momentum(0.0),
77 is_OpticalPhoton(false),
78 useGivenVelocity(false),
79 fpAuxiliaryTrackInformationMap(0)
89 is_OpticalPhoton = (fpDynamicParticle->
GetDefinition() == fOpticalPhoton);
100 : fCurrentStepNumber(0),
101 fGlobalTime(0), fLocalTime(0.),
103 fParentID(0), fTrackID(0),
105 fpDynamicParticle(0),
107 fBelowThreshold(false), fGoodForTracking(false),
108 fStepLength(0.0), fWeight(1.0),
110 fVtxKineticEnergy(0.0),
111 fpLVAtVertex(0), fpCreatorProcess(0),
112 fCreatorModelIndex(-1),
113 fpUserInformation(0),
114 prev_mat(0), groupvel(0),
115 prev_velocity(0.0), prev_momentum(0.0),
116 is_OpticalPhoton(false),
117 useGivenVelocity(false),
118 fpAuxiliaryTrackInformationMap(0)
125 : fCurrentStepNumber(0),
126 fGlobalTime(0), fLocalTime(0.),
128 fParentID(0), fTrackID(0),
130 fpDynamicParticle(0),
132 fBelowThreshold(false), fGoodForTracking(false),
133 fStepLength(0.0), fWeight(1.0),
135 fVtxKineticEnergy(0.0),
136 fpLVAtVertex(0), fpCreatorProcess(0),
137 fCreatorModelIndex(-1),
138 fpUserInformation(0),
139 prev_mat(0), groupvel(0),
140 prev_velocity(0.0), prev_momentum(0.0),
141 is_OpticalPhoton(false),
142 useGivenVelocity(false),
143 fpAuxiliaryTrackInformationMap(0)
152 delete fpDynamicParticle;
153 delete fpUserInformation;
154 ClearAuxiliaryTrackInformation();
161 if (
this != &right) {
162 fPosition = right.fPosition;
163 fGlobalTime = right.fGlobalTime;
164 fLocalTime = right.fLocalTime;
165 fTrackLength = right.fTrackLength;
166 fWeight = right.fWeight;
167 fStepLength = right.fStepLength;
174 fCurrentStepNumber = 0;
177 fVelocity = right.fVelocity;
183 fTrackStatus = right.fTrackStatus;
184 fBelowThreshold = right.fBelowThreshold;
185 fGoodForTracking = right.fGoodForTracking;
192 fVtxPosition = right.fVtxPosition;
193 fpLVAtVertex = right.fpLVAtVertex;
194 fVtxKineticEnergy = right.fVtxKineticEnergy;
195 fVtxMomentumDirection = right.fVtxMomentumDirection;
198 fpCreatorProcess = 0;
199 fpUserInformation = 0;
201 prev_mat = right.prev_mat;
202 groupvel = right.groupvel;
203 prev_velocity = right.prev_velocity;
204 prev_momentum = right.prev_momentum;
206 is_OpticalPhoton = right.is_OpticalPhoton;
207 useGivenVelocity = right.useGivenVelocity;
209 fpAuxiliaryTrackInformationMap = 0;
225 if (useGivenVelocity)
return fVelocity;
245 velocity =
c_light*std::sqrt(T*(T+2.))/(T+1.0);
247 velocity = velTable->
Value(T);
263 G4bool update_groupvel =
false;
273 if ((mat != 0) && ((mat != prev_mat)||(groupvel==0))) {
277 update_groupvel =
true;
281 if (groupvel != 0 ) {
284 velocity = prev_velocity;
289 if( update_groupvel || (current_momentum != prev_momentum) ) {
291 groupvel->
Value(current_momentum);
292 prev_velocity = velocity;
293 prev_momentum = current_momentum;
327 if(!fpAuxiliaryTrackInformationMap)
328 { fpAuxiliaryTrackInformationMap =
new std::map<G4int,G4VAuxiliaryTrackInformation*>; }
332 ED <<
"Process/model index <" << idx <<
"> is invalid.";
333 G4Exception(
"G4VAuxiliaryTrackInformation::G4VAuxiliaryTrackInformation()",
"TRACK0982",
336 (*fpAuxiliaryTrackInformationMap)[idx] =
info;
343 if(!fpAuxiliaryTrackInformationMap)
return 0;
344 std::map<G4int,G4VAuxiliaryTrackInformation*>::iterator itr
345 = fpAuxiliaryTrackInformationMap->find(idx);
346 if(itr==fpAuxiliaryTrackInformationMap->end())
return 0;
347 else return (*itr).second;
355 fpAuxiliaryTrackInformationMap->erase(idx);
362 if(fpAuxiliaryTrackInformationMap)
370 void G4Track::ClearAuxiliaryTrackInformation()
373 if(!fpAuxiliaryTrackInformationMap)
return;
374 for(std::map<G4int,G4VAuxiliaryTrackInformation*>::iterator itr=fpAuxiliaryTrackInformationMap->begin();
375 itr!=fpAuxiliaryTrackInformationMap->end(); itr++)
376 {
delete (*itr).second; }
377 delete fpAuxiliaryTrackInformationMap;
378 fpAuxiliaryTrackInformationMap = 0;
const XML_Char XML_Encoding * info
static G4VelocityTable * GetVelocityTable()
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4Material * GetMaterial() const
G4ThreadLocal G4Allocator< G4Track > * aTrackAllocator
std::ostringstream G4ExceptionDescription
G4double GetKineticEnergy() const
static G4double GetMinTOfVelocityTable()
void RemoveAuxiliaryTrackInformation(G4int idx)
void SetAuxiliaryTrackInformation(G4int idx, G4VAuxiliaryTrackInformation *info) const
G4ParticleDefinition * GetDefinition() const
const G4ThreeVector const G4double const
G4double GetTotalMomentum() const
G4double CalculateVelocityForOpticalPhoton() const
static G4int GetNbinOfVelocityTable()
G4double Value(G4double theEnergy, size_t &lastidx) const
G4double CalculateVelocity() const
static void SetVelocityTableProperties(G4double t_max, G4double t_min, G4int nbin)
G4Material * GetMaterial() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VAuxiliaryTrackInformation * GetAuxiliaryTrackInformation(G4int idx) const
static G4int GetNbinOfVelocityTable()
G4LogicalVolume * GetLogicalVolume() const
static G4ParticleTable * GetParticleTable()
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
static G4double GetMinTOfVelocityTable()
static void SetVelocityTableProperties(G4double t_max, G4double t_min, G4int nbin)
static G4double GetMaxTOfVelocityTable()
static G4double GetMaxTOfVelocityTable()
G4double Value(G4double theEnergy)
static G4int GetIndex(const G4String &)
G4MaterialPropertyVector * GetProperty(const char *key)
void CopyTrackInfo(const G4Track &)