Changeset 1340 for trunk/source/track/include
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (15 years ago)
- Location:
- trunk/source/track/include
- Files:
-
- 9 edited
-
CVS/Entries (modified) (1 diff)
-
CVS/Tag (modified) (1 diff)
-
G4ParticleChangeForDecay.hh (modified) (2 diffs)
-
G4ParticleChangeForTransport.hh (modified) (2 diffs)
-
G4Step.hh (modified) (5 diffs)
-
G4Step.icc (modified) (5 diffs)
-
G4Track.hh (modified) (5 diffs)
-
G4Track.icc (modified) (3 diffs)
-
G4TrackVector.hh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/track/include/CVS/Entries
r1337 r1340 1 /G4FieldTrackUpdator.hh/1.2/Thu Sep 30 06:16:04 2010//T geant4-09-04-beta-012 /G4ForceCondition.hh/1.5/Thu Sep 30 06:16:04 2010//T geant4-09-04-beta-013 /G4GPILSelection.hh/1.4/Thu Sep 30 06:16:04 2010//T geant4-09-04-beta-014 /G4ParticleChange.hh/1.13/Thu Sep 30 06:16:04 2010//T geant4-09-04-beta-015 /G4ParticleChange.icc/1.14/Thu Sep 30 06:16:04 2010//T geant4-09-04-beta-016 /G4ParticleChangeFor Decay.hh/1.9/Thu Sep 30 06:16:04 2010//Tgeant4-09-04-beta-017 /G4ParticleChangeFor Gamma.hh/1.9/Thu Sep 30 06:16:04 2010//Tgeant4-09-04-beta-018 /G4ParticleChangeFor Loss.hh/1.22/Thu Sep 30 06:16:04 2010//Tgeant4-09-04-beta-019 /G4ParticleChangeForMSC. hh/1.9/Thu Sep 30 06:16:04 2010//Tgeant4-09-04-beta-0110 /G4ParticleChangeFor MSC.icc/1.7/Thu Sep 30 06:16:04 2010//Tgeant4-09-04-beta-0111 /G4ParticleChangeFor RadDecay.hh/1.7/Thu Sep 30 06:16:05 2010//Tgeant4-09-04-beta-0112 /G4 ParticleChangeForTransport.hh/1.16/Thu Sep 30 06:16:05 2010//Tgeant4-09-04-beta-0113 /G4 ParticleChangeForTransport.icc/1.13/Thu Sep 30 06:16:05 2010//Tgeant4-09-04-beta-0114 /G4Step .hh/1.19/Thu Sep 30 06:16:05 2010//Tgeant4-09-04-beta-0115 /G4Step .icc/1.19/Thu Sep 30 06:16:05 2010//Tgeant4-09-04-beta-0116 /G4 StepPoint.hh/1.19/Thu Sep 30 06:16:08 2010//Tgeant4-09-04-beta-0117 /G4 StepPoint.icc/1.14/Thu Sep 30 06:16:08 2010//Tgeant4-09-04-beta-0118 /G4 StepStatus.hh/1.4/Thu Sep 30 06:16:08 2010//Tgeant4-09-04-beta-0119 /G4 SteppingControl.hh/1.4/Thu Sep 30 06:16:08 2010//Tgeant4-09-04-beta-0120 /G4 Track.hh/1.19/Thu Sep 30 06:16:09 2010//Tgeant4-09-04-beta-0121 /G4 Track.icc/1.16/Thu Sep 30 06:16:09 2010//Tgeant4-09-04-beta-0122 /G4 TrackFastVector.hh/1.5/Thu Sep 30 06:16:09 2010//Tgeant4-09-04-beta-0123 /G4 TrackStatus.hh/1.4/Thu Sep 30 06:16:09 2010//Tgeant4-09-04-beta-0124 /G4 TrackVector.hh/1.2/Thu Sep 30 06:16:09 2010//Tgeant4-09-04-beta-0125 /G4 VParticleChange.hh/1.16/Thu Sep 30 06:16:09 2010//Tgeant4-09-04-beta-0126 /G4 VParticleChange.icc/1.16/Thu Sep 30 06:16:10 2010//Tgeant4-09-04-beta-0127 /G4 VUserTrackInformation.hh/1.9/Thu Sep 30 06:16:10 2010//Tgeant4-09-04-beta-011 /G4FieldTrackUpdator.hh/1.2/Thu Sep 30 06:16:04 2010//Ttrack-V09-03-09 2 /G4ForceCondition.hh/1.5/Thu Sep 30 06:16:04 2010//Ttrack-V09-03-09 3 /G4GPILSelection.hh/1.4/Thu Sep 30 06:16:04 2010//Ttrack-V09-03-09 4 /G4ParticleChange.hh/1.13/Thu Sep 30 06:16:04 2010//Ttrack-V09-03-09 5 /G4ParticleChange.icc/1.14/Thu Sep 30 06:16:04 2010//Ttrack-V09-03-09 6 /G4ParticleChangeForGamma.hh/1.9/Thu Sep 30 06:16:04 2010//Ttrack-V09-03-09 7 /G4ParticleChangeForLoss.hh/1.22/Thu Sep 30 06:16:04 2010//Ttrack-V09-03-09 8 /G4ParticleChangeForMSC.hh/1.9/Thu Sep 30 06:16:04 2010//Ttrack-V09-03-09 9 /G4ParticleChangeForMSC.icc/1.7/Thu Sep 30 06:16:04 2010//Ttrack-V09-03-09 10 /G4ParticleChangeForRadDecay.hh/1.7/Thu Sep 30 06:16:05 2010//Ttrack-V09-03-09 11 /G4ParticleChangeForTransport.icc/1.13/Thu Sep 30 06:16:05 2010//Ttrack-V09-03-09 12 /G4StepPoint.hh/1.19/Thu Sep 30 06:16:08 2010//Ttrack-V09-03-09 13 /G4StepPoint.icc/1.14/Thu Sep 30 06:16:08 2010//Ttrack-V09-03-09 14 /G4StepStatus.hh/1.4/Thu Sep 30 06:16:08 2010//Ttrack-V09-03-09 15 /G4SteppingControl.hh/1.4/Thu Sep 30 06:16:08 2010//Ttrack-V09-03-09 16 /G4TrackFastVector.hh/1.5/Thu Sep 30 06:16:09 2010//Ttrack-V09-03-09 17 /G4TrackStatus.hh/1.4/Thu Sep 30 06:16:09 2010//Ttrack-V09-03-09 18 /G4VParticleChange.hh/1.16/Thu Sep 30 06:16:09 2010//Ttrack-V09-03-09 19 /G4VParticleChange.icc/1.16/Thu Sep 30 06:16:10 2010//Ttrack-V09-03-09 20 /G4VUserTrackInformation.hh/1.9/Thu Sep 30 06:16:10 2010//Ttrack-V09-03-09 21 /G4ParticleChangeForDecay.hh/1.10/Fri Nov 5 10:05:20 2010//Ttrack-V09-03-09 22 /G4ParticleChangeForTransport.hh/1.17/Fri Nov 5 10:05:20 2010//Ttrack-V09-03-09 23 /G4Step.hh/1.22/Fri Nov 5 10:05:20 2010//Ttrack-V09-03-09 24 /G4Step.icc/1.22/Fri Nov 5 10:05:20 2010//Ttrack-V09-03-09 25 /G4Track.hh/1.22/Fri Nov 5 10:05:20 2010//Ttrack-V09-03-09 26 /G4Track.icc/1.20/Fri Nov 5 10:05:20 2010//Ttrack-V09-03-09 27 /G4TrackVector.hh/1.3/Fri Nov 5 10:05:20 2010//Ttrack-V09-03-09 28 28 D -
trunk/source/track/include/CVS/Tag
r1331 r1340 1 N geant4-09-04-beta-011 Ntrack-V09-03-09 -
trunk/source/track/include/G4ParticleChangeForDecay.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ParticleChangeForDecay.hh,v 1. 9 2006/06/29 21:14:19 gunterExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ParticleChangeForDecay.hh,v 1.10 2010/07/21 09:30:15 gcosmo Exp $ 28 // GEANT4 tag $Name: track-V09-03-09 $ 29 29 30 30 // … … 158 158 159 159 #endif 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 -
trunk/source/track/include/G4ParticleChangeForTransport.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4ParticleChangeForTransport.hh,v 1.1 6 2006/06/29 21:14:31 gunterExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4ParticleChangeForTransport.hh,v 1.17 2010/07/21 09:30:15 gcosmo Exp $ 28 // GEANT4 tag $Name: track-V09-03-09 $ 29 29 // 30 30 // … … 126 126 private: 127 127 G4bool isMomentumChanged; 128 // The flag which is set if mome tum is changed in this stepi128 // The flag which is set if momentum is changed in current step 129 129 G4Material* theMaterialChange; 130 130 const G4MaterialCutsCouple* theMaterialCutsCoupleChange; -
trunk/source/track/include/G4Step.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4Step.hh,v 1. 19 2008/01/12 12:00:25kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4Step.hh,v 1.22 2010/10/18 23:52:04 kurasige Exp $ 28 // GEANT4 tag $Name: track-V09-03-09 $ 29 29 // 30 30 // … … 121 121 void SetControlFlag(G4SteppingControl StepControlFlag); 122 122 123 // difference of position, time, momentum and energy 124 G4ThreeVector GetDeltaPosition() const; 125 G4double GetDeltaTime() const; 126 127 G4ThreeVector GetDeltaMomentum() const; 128 G4double GetDeltaEnergy() const; 129 130 // manipulation of total energy deposit 123 // manipulation of total energy deposit 131 124 void AddTotalEnergyDeposit(G4double value); 132 125 void ResetTotalEnergyDeposit(); … … 138 131 139 132 // Get/Set/Clear flag for initial/last step 133 // NOTE: following flags are not used 134 // will be ready in later release 140 135 G4bool IsFirstStepInVolume() const; 141 136 G4bool IsLastStepInVolume() const; … … 145 140 void SetLastStepFlag(); 146 141 void ClearLastStepFlag(); 142 143 // difference of position, time, momentum and energy 144 G4ThreeVector GetDeltaPosition() const; 145 G4double GetDeltaTime() const; 146 147 // These methods will be deleted 148 // NOTE: use GetTotalEnergyDeposit() to obtain 149 // energy loss in the material 150 // 151 G4ThreeVector GetDeltaMomentum() const; 152 G4double GetDeltaEnergy() const; 153 147 154 148 155 // Other member functions … … 191 198 // Secondary buckets 192 199 public: 193 G4TrackVector* GetSecondary() const; 200 // secodaries in the current step 201 const std::vector<const G4Track*>* GetSecondaryInCurrentStep() const; 202 203 // NOTE: Secondary bucket of the Step contains 204 // all secondaries during tracking the current track 205 // (i.e. NOT secondaries produced in the current step) 206 // all following methods give same object (i.e. G4TrackVector ) 207 // but 2nd one will create bucket in addition 208 const G4TrackVector* GetSecondary() const ; 194 209 G4TrackVector* GetfSecondary(); 195 210 G4TrackVector* NewSecondaryVector(); 211 212 // just delete secondary bucket 213 // NOTE: G4Track objects inside the bucket are not deleted 196 214 void DeleteSecondaryVector(); 215 216 // Add secondary tracks to the bucket 197 217 void SetSecondary( G4TrackVector* value); 198 private: 218 219 private: 220 // Secondaty bucket implemented by using std::vector of G4Track* 199 221 G4TrackVector* fSecondary; 200 222 -
trunk/source/track/include/G4Step.icc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4Step.icc,v 1. 19 2008/02/05 01:46:57kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4Step.icc,v 1.22 2010/10/18 23:52:04 kurasige Exp $ 28 // GEANT4 tag $Name: track-V09-03-09 $ 29 29 // 30 30 // … … 86 86 } 87 87 88 inline89 G4ThreeVector G4Step::GetDeltaMomentum() const90 {91 return fpPostStepPoint->GetMomentum()92 - fpPreStepPoint->GetMomentum();93 }94 95 inline96 G4double G4Step::GetDeltaEnergy() const97 {98 return fpPostStepPoint->GetKineticEnergy()99 - fpPreStepPoint->GetKineticEnergy();100 }101 88 102 89 inline … … 163 150 inline 164 151 void G4Step::CopyPostToPreStepPoint( ) 165 { 152 { 153 //This method is called at the beggining of each step 166 154 *(fpPreStepPoint) = *(fpPostStepPoint); 167 155 fpPostStepPoint->SetStepStatus(fUndefined); 168 } 156 // clear secondary in current 157 fSecondary->secondaryInCurrent.clear(); 158 } 169 159 170 160 … … 222 212 fpPreStepPoint->SetWeight(fpTrack->GetWeight()); 223 213 224 214 // clear secondary in current 215 fSecondary->secondaryInCurrent.clear(); 216 225 217 (*fpPostStepPoint) = (*fpPreStepPoint); 226 218 } … … 251 243 fpTrack->SetWeight(fpPostStepPoint->GetWeight()); 252 244 245 253 246 // set velocity 254 247 fpPostStepPoint->SetVelocity(fpTrack->GetVelocity()); 255 248 } 256 249 257 inline G4TrackVector* G4Step::GetfSecondary() { 250 inline 251 const std::vector<const G4Track*>* G4Step::GetSecondaryInCurrentStep() const 252 { 253 return &fSecondary->secondaryInCurrent; 254 } 255 256 inline const G4TrackVector* G4Step::GetSecondary() const 257 { 258 258 return fSecondary; 259 } 260 inline G4TrackVector* G4Step::GetSecondary() const { 259 } 260 261 inline G4TrackVector* G4Step::GetfSecondary() 262 { 261 263 return fSecondary; 262 } 263 inline void G4Step::SetSecondary(G4TrackVector* value) { 264 } 265 266 inline void G4Step::SetSecondary(G4TrackVector* value) 267 { 264 268 fSecondary=value; 265 } 266 inline G4TrackVector* G4Step::NewSecondaryVector() { 269 } 270 271 inline 272 G4TrackVector* G4Step::NewSecondaryVector() 273 { 267 274 fSecondary=new G4TrackVector(); 268 275 return fSecondary; 269 } 276 } 277 270 278 inline void G4Step::DeleteSecondaryVector() { 271 279 delete fSecondary; -
trunk/source/track/include/G4Track.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4Track.hh,v 1. 19 2008/10/24 08:22:20kurasige Exp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4Track.hh,v 1.22 2010/08/11 17:11:54 kurasige Exp $ 28 // GEANT4 tag $Name: track-V09-03-09 $ 29 29 // 30 30 // … … 58 58 #include "G4TouchableHandle.hh" // Include from 'geometry' 59 59 #include "G4VUserTrackInformation.hh" 60 61 #include "G4PhysicsLogVector.hh" 60 62 61 63 #include "G4Material.hh" … … 116 118 117 119 // particle definition 120 const G4ParticleDefinition* GetParticleDefinition() const; 121 // following method of GetDefinition remains 122 // because of backward compatiblity. It will be removed in future 118 123 G4ParticleDefinition* GetDefinition() const; 119 124 … … 235 240 private: 236 241 //--------- 242 // prepare velocity table 243 void PrepareVelocityTable(); 237 244 238 245 // Member data … … 277 284 278 285 G4VUserTrackInformation* fpUserInformation; 286 287 mutable G4Material* prev_mat; 288 mutable G4MaterialPropertyVector* groupvel; 289 mutable G4double prev_velocity; 290 mutable G4double prev_momentum; 291 292 static G4PhysicsLogVector* velTable; 293 static const G4double maxT; 294 static const G4double minT; 295 G4bool is_OpticalPhoton; 279 296 }; 280 #include "G4Step.hh" 297 281 298 #include "G4Track.icc" 282 299 -
trunk/source/track/include/G4Track.icc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4Track.icc,v 1. 16 2008/10/24 08:22:20 kurasigeExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4Track.icc,v 1.20 2010/10/27 07:53:29 gcosmo Exp $ 28 // GEANT4 tag $Name: track-V09-03-09 $ 29 29 // 30 30 //----------------------------------------------------------------- … … 38 38 extern G4DLLIMPORT G4Allocator<G4Track> aTrackAllocator; 39 39 #endif 40 41 // Operators42 43 inline void* G4Track::operator new(size_t)44 { void *aTrack;45 aTrack = (void *) aTrackAllocator.MallocSingle();46 return aTrack;47 }48 // Override "new" for "G4Allocator".49 50 inline void G4Track::operator delete(void *aTrack)51 { aTrackAllocator.FreeSingle((G4Track *) aTrack);}52 // Override "delete" for "G4Allocator".53 54 inline G4bool G4Track::operator==( const G4Track& s)55 { return (this==&s); }56 // Define "==" operator because "G4TrackVector" uses57 // "RWPtrOrderdVector" which requires this.58 59 // Get/Set functions60 // dynamic particle61 inline const G4DynamicParticle* G4Track::GetDynamicParticle() const62 { return fpDynamicParticle; }63 64 // particle definition65 inline G4ParticleDefinition* G4Track::GetDefinition() const66 { return fpDynamicParticle->GetDefinition(); }67 68 // parent track ID69 inline G4int G4Track::GetParentID() const70 { return fParentID; }71 72 inline void G4Track::SetParentID(const G4int aValue)73 { fParentID = aValue; }74 75 // current track ID76 inline G4int G4Track::GetTrackID() const77 { return fTrackID; }78 79 inline void G4Track::SetTrackID(const G4int aValue)80 { fTrackID = aValue; }81 82 // position83 inline const G4ThreeVector& G4Track::GetPosition() const84 { return fPosition; }85 86 inline void G4Track::SetPosition(const G4ThreeVector& aValue)87 { fPosition = aValue; }88 89 // global time90 inline G4double G4Track::GetGlobalTime() const91 { return fGlobalTime; }92 93 inline void G4Track::SetGlobalTime(const G4double aValue)94 { fGlobalTime = aValue; }95 // Time since the event in which the track belongs is created.96 97 // local time98 inline G4double G4Track::GetLocalTime() const99 { return fLocalTime; }100 101 inline void G4Track::SetLocalTime(const G4double aValue)102 { fLocalTime = aValue; }103 // Time since the current track is created.104 105 // proper time106 inline G4double G4Track::GetProperTime() const107 { return fpDynamicParticle->GetProperTime(); }108 109 inline void G4Track::SetProperTime(const G4double aValue)110 { fpDynamicParticle->SetProperTime(aValue); }111 // Proper time of the current track112 113 // volume114 inline G4VPhysicalVolume* G4Track::GetVolume() const115 { if ( fpTouchable ==0 ) return 0;116 return fpTouchable->GetVolume(); }117 118 inline G4VPhysicalVolume* G4Track::GetNextVolume() const119 { if ( fpNextTouchable ==0 ) return 0;120 return fpNextTouchable->GetVolume(); }121 122 // material123 inline124 const G4MaterialCutsCouple* G4Track::GetMaterialCutsCouple() const125 { return fpStep->GetPreStepPoint()->GetMaterialCutsCouple(); }126 127 inline128 const G4MaterialCutsCouple* G4Track::GetNextMaterialCutsCouple() const129 { return fpStep->GetPostStepPoint()->GetMaterialCutsCouple(); }130 131 // material132 inline G4Material* G4Track::GetMaterial() const133 { return fpStep->GetPreStepPoint()->GetMaterial(); }134 135 inline G4Material* G4Track::GetNextMaterial() const136 { return fpStep->GetPostStepPoint()->GetMaterial(); }137 138 139 // touchable140 inline const G4VTouchable* G4Track::GetTouchable() const141 {142 return fpTouchable();143 }144 145 inline const G4TouchableHandle& G4Track::GetTouchableHandle() const146 {147 return fpTouchable;148 }149 150 inline void G4Track::SetTouchableHandle( const G4TouchableHandle& apValue)151 {152 fpTouchable = apValue;153 }154 155 inline const G4VTouchable* G4Track::GetNextTouchable() const156 {157 return fpNextTouchable();158 }159 160 inline const G4TouchableHandle& G4Track::GetNextTouchableHandle() const161 {162 return fpNextTouchable;163 }164 165 inline void G4Track::SetNextTouchableHandle( const G4TouchableHandle& apValue)166 {167 fpNextTouchable = apValue;168 }169 170 171 // kinetic energy172 inline G4double G4Track::GetKineticEnergy() const173 { return fpDynamicParticle->GetKineticEnergy(); }174 175 inline void G4Track::SetKineticEnergy(const G4double aValue)176 { fpDynamicParticle->SetKineticEnergy(aValue); }177 178 // total energy179 inline G4double G4Track::GetTotalEnergy() const180 { return fpDynamicParticle->GetTotalEnergy(); }181 182 // momentum183 inline G4ThreeVector G4Track::GetMomentum() const184 { return fpDynamicParticle->GetMomentum(); }185 186 // momentum (direction)187 inline const G4ThreeVector& G4Track::GetMomentumDirection() const188 { return fpDynamicParticle->GetMomentumDirection(); }189 190 inline void G4Track::SetMomentumDirection(const G4ThreeVector& aValue)191 { fpDynamicParticle->SetMomentumDirection(aValue) ;}192 193 // polarization194 inline const G4ThreeVector& G4Track::GetPolarization() const195 { return fpDynamicParticle->GetPolarization(); }196 197 inline void G4Track::SetPolarization(const G4ThreeVector& aValue)198 { fpDynamicParticle->SetPolarization(aValue.x(),199 aValue.y(),200 aValue.z()); }201 202 // track status203 inline G4TrackStatus G4Track::GetTrackStatus() const204 { return fTrackStatus; }205 206 inline void G4Track::SetTrackStatus(const G4TrackStatus aTrackStatus)207 { fTrackStatus = aTrackStatus; }208 209 // track length210 inline G4double G4Track::GetTrackLength() const211 { return fTrackLength; }212 213 inline void G4Track::AddTrackLength(const G4double aValue)214 { fTrackLength += aValue; }215 // Accumulated track length216 217 // step number218 inline G4int G4Track::GetCurrentStepNumber() const219 { return fCurrentStepNumber; }220 221 inline void G4Track::IncrementCurrentStepNumber()222 { fCurrentStepNumber++; }223 224 // step length225 inline G4double G4Track::GetStepLength() const226 { return fStepLength; }227 228 inline void G4Track::SetStepLength(G4double value)229 { fStepLength = value; }230 231 // vertex (where this track was created) information232 inline const G4ThreeVector& G4Track::GetVertexPosition() const233 { return fVtxPosition; }234 235 inline void G4Track::SetVertexPosition(const G4ThreeVector& aValue)236 { fVtxPosition = aValue; }237 238 inline const G4ThreeVector& G4Track::GetVertexMomentumDirection() const239 { return fVtxMomentumDirection; }240 inline void G4Track::SetVertexMomentumDirection(const G4ThreeVector& aValue)241 { fVtxMomentumDirection = aValue ;}242 243 inline G4double G4Track::GetVertexKineticEnergy() const244 { return fVtxKineticEnergy; }245 246 inline void G4Track::SetVertexKineticEnergy(const G4double aValue)247 { fVtxKineticEnergy = aValue; }248 249 inline const G4LogicalVolume* G4Track::GetLogicalVolumeAtVertex() const250 { return fpLVAtVertex; }251 252 inline void G4Track::SetLogicalVolumeAtVertex(const G4LogicalVolume* aValue)253 { fpLVAtVertex = aValue; }254 255 inline const G4VProcess* G4Track::GetCreatorProcess() const256 { return fpCreatorProcess; }257 // If the pointer is 0, this means the track is created258 // by the event generator, i.e. the primary track.If it is not259 // 0, it points to the process which created this track.260 261 inline void G4Track::SetCreatorProcess(const G4VProcess* aValue)262 { fpCreatorProcess = aValue; }263 264 // flag for "Below Threshold"265 inline G4bool G4Track::IsBelowThreshold() const266 { return fBelowThreshold; }267 268 inline void G4Track::SetBelowThresholdFlag(G4bool value)269 { fBelowThreshold = value; }270 271 // flag for " Good for Tracking"272 inline G4bool G4Track::IsGoodForTracking() const273 { return fGoodForTracking; }274 275 inline void G4Track::SetGoodForTrackingFlag(G4bool value)276 { fGoodForTracking = value; }277 278 // track weight279 inline void G4Track::SetWeight(G4double aValue)280 { fWeight = aValue; }281 282 inline G4double G4Track::GetWeight() const283 { return fWeight; }284 285 // user information286 inline G4VUserTrackInformation* G4Track::GetUserInformation() const287 { return fpUserInformation; }288 inline void G4Track::SetUserInformation(G4VUserTrackInformation* aValue)289 { fpUserInformation = aValue; }290 291 292 40 293 41 //------------------------------------------------------------- … … 298 46 #include "G4Step.hh" 299 47 48 // Operators 49 50 inline void* G4Track::operator new(size_t) 51 { void *aTrack; 52 aTrack = (void *) aTrackAllocator.MallocSingle(); 53 return aTrack; 54 } 55 // Override "new" for "G4Allocator". 56 57 inline void G4Track::operator delete(void *aTrack) 58 { aTrackAllocator.FreeSingle((G4Track *) aTrack);} 59 // Override "delete" for "G4Allocator". 60 61 inline G4bool G4Track::operator==( const G4Track& s) 62 { return (this==&s); } 63 // Define "==" operator because "G4TrackVector" uses 64 // "RWPtrOrderdVector" which requires this. 65 66 // Get/Set functions 67 // dynamic particle 68 inline const G4DynamicParticle* G4Track::GetDynamicParticle() const 69 { return fpDynamicParticle; } 70 71 // particle definition 72 inline G4ParticleDefinition* G4Track::GetDefinition() const 73 { return fpDynamicParticle->GetDefinition(); } 74 75 // particle definition 76 inline const G4ParticleDefinition* G4Track::GetParticleDefinition() const 77 { return fpDynamicParticle->GetParticleDefinition(); } 78 79 // parent track ID 80 inline G4int G4Track::GetParentID() const 81 { return fParentID; } 82 83 inline void G4Track::SetParentID(const G4int aValue) 84 { fParentID = aValue; } 85 86 // current track ID 87 inline G4int G4Track::GetTrackID() const 88 { return fTrackID; } 89 90 inline void G4Track::SetTrackID(const G4int aValue) 91 { fTrackID = aValue; } 92 93 // position 94 inline const G4ThreeVector& G4Track::GetPosition() const 95 { return fPosition; } 96 97 inline void G4Track::SetPosition(const G4ThreeVector& aValue) 98 { fPosition = aValue; } 99 100 // global time 101 inline G4double G4Track::GetGlobalTime() const 102 { return fGlobalTime; } 103 104 inline void G4Track::SetGlobalTime(const G4double aValue) 105 { fGlobalTime = aValue; } 106 // Time since the event in which the track belongs is created. 107 108 // local time 109 inline G4double G4Track::GetLocalTime() const 110 { return fLocalTime; } 111 112 inline void G4Track::SetLocalTime(const G4double aValue) 113 { fLocalTime = aValue; } 114 // Time since the current track is created. 115 116 // proper time 117 inline G4double G4Track::GetProperTime() const 118 { return fpDynamicParticle->GetProperTime(); } 119 120 inline void G4Track::SetProperTime(const G4double aValue) 121 { fpDynamicParticle->SetProperTime(aValue); } 122 // Proper time of the current track 123 124 // volume 125 inline G4VPhysicalVolume* G4Track::GetVolume() const 126 { if ( fpTouchable ==0 ) return 0; 127 return fpTouchable->GetVolume(); } 128 129 inline G4VPhysicalVolume* G4Track::GetNextVolume() const 130 { if ( fpNextTouchable ==0 ) return 0; 131 return fpNextTouchable->GetVolume(); } 132 133 // material 134 inline 135 const G4MaterialCutsCouple* G4Track::GetMaterialCutsCouple() const 136 { return fpStep->GetPreStepPoint()->GetMaterialCutsCouple(); } 137 138 inline 139 const G4MaterialCutsCouple* G4Track::GetNextMaterialCutsCouple() const 140 { return fpStep->GetPostStepPoint()->GetMaterialCutsCouple(); } 141 142 // material 143 inline G4Material* G4Track::GetMaterial() const 144 { return fpStep->GetPreStepPoint()->GetMaterial(); } 145 146 inline G4Material* G4Track::GetNextMaterial() const 147 { return fpStep->GetPostStepPoint()->GetMaterial(); } 148 149 150 // touchable 151 inline const G4VTouchable* G4Track::GetTouchable() const 152 { 153 return fpTouchable(); 154 } 155 156 inline const G4TouchableHandle& G4Track::GetTouchableHandle() const 157 { 158 return fpTouchable; 159 } 160 161 inline void G4Track::SetTouchableHandle( const G4TouchableHandle& apValue) 162 { 163 fpTouchable = apValue; 164 } 165 166 inline const G4VTouchable* G4Track::GetNextTouchable() const 167 { 168 return fpNextTouchable(); 169 } 170 171 inline const G4TouchableHandle& G4Track::GetNextTouchableHandle() const 172 { 173 return fpNextTouchable; 174 } 175 176 inline void G4Track::SetNextTouchableHandle( const G4TouchableHandle& apValue) 177 { 178 fpNextTouchable = apValue; 179 } 180 181 182 // kinetic energy 183 inline G4double G4Track::GetKineticEnergy() const 184 { return fpDynamicParticle->GetKineticEnergy(); } 185 186 inline void G4Track::SetKineticEnergy(const G4double aValue) 187 { fpDynamicParticle->SetKineticEnergy(aValue); } 188 189 // total energy 190 inline G4double G4Track::GetTotalEnergy() const 191 { return fpDynamicParticle->GetTotalEnergy(); } 192 193 // momentum 194 inline G4ThreeVector G4Track::GetMomentum() const 195 { return fpDynamicParticle->GetMomentum(); } 196 197 // momentum (direction) 198 inline const G4ThreeVector& G4Track::GetMomentumDirection() const 199 { return fpDynamicParticle->GetMomentumDirection(); } 200 201 inline void G4Track::SetMomentumDirection(const G4ThreeVector& aValue) 202 { fpDynamicParticle->SetMomentumDirection(aValue) ;} 203 204 // polarization 205 inline const G4ThreeVector& G4Track::GetPolarization() const 206 { return fpDynamicParticle->GetPolarization(); } 207 208 inline void G4Track::SetPolarization(const G4ThreeVector& aValue) 209 { fpDynamicParticle->SetPolarization(aValue.x(), 210 aValue.y(), 211 aValue.z()); } 212 213 // track status 214 inline G4TrackStatus G4Track::GetTrackStatus() const 215 { return fTrackStatus; } 216 217 inline void G4Track::SetTrackStatus(const G4TrackStatus aTrackStatus) 218 { fTrackStatus = aTrackStatus; } 219 220 // track length 221 inline G4double G4Track::GetTrackLength() const 222 { return fTrackLength; } 223 224 inline void G4Track::AddTrackLength(const G4double aValue) 225 { fTrackLength += aValue; } 226 // Accumulated track length 227 228 // step number 229 inline G4int G4Track::GetCurrentStepNumber() const 230 { return fCurrentStepNumber; } 231 232 inline void G4Track::IncrementCurrentStepNumber() 233 { fCurrentStepNumber++; } 234 235 // step length 236 inline G4double G4Track::GetStepLength() const 237 { return fStepLength; } 238 239 inline void G4Track::SetStepLength(G4double value) 240 { fStepLength = value; } 241 242 // vertex (where this track was created) information 243 inline const G4ThreeVector& G4Track::GetVertexPosition() const 244 { return fVtxPosition; } 245 246 inline void G4Track::SetVertexPosition(const G4ThreeVector& aValue) 247 { fVtxPosition = aValue; } 248 249 inline const G4ThreeVector& G4Track::GetVertexMomentumDirection() const 250 { return fVtxMomentumDirection; } 251 inline void G4Track::SetVertexMomentumDirection(const G4ThreeVector& aValue) 252 { fVtxMomentumDirection = aValue ;} 253 254 inline G4double G4Track::GetVertexKineticEnergy() const 255 { return fVtxKineticEnergy; } 256 257 inline void G4Track::SetVertexKineticEnergy(const G4double aValue) 258 { fVtxKineticEnergy = aValue; } 259 260 inline const G4LogicalVolume* G4Track::GetLogicalVolumeAtVertex() const 261 { return fpLVAtVertex; } 262 263 inline void G4Track::SetLogicalVolumeAtVertex(const G4LogicalVolume* aValue) 264 { fpLVAtVertex = aValue; } 265 266 inline const G4VProcess* G4Track::GetCreatorProcess() const 267 { return fpCreatorProcess; } 268 // If the pointer is 0, this means the track is created 269 // by the event generator, i.e. the primary track.If it is not 270 // 0, it points to the process which created this track. 271 272 inline void G4Track::SetCreatorProcess(const G4VProcess* aValue) 273 { fpCreatorProcess = aValue; } 274 275 // flag for "Below Threshold" 276 inline G4bool G4Track::IsBelowThreshold() const 277 { return fBelowThreshold; } 278 279 inline void G4Track::SetBelowThresholdFlag(G4bool value) 280 { fBelowThreshold = value; } 281 282 // flag for " Good for Tracking" 283 inline G4bool G4Track::IsGoodForTracking() const 284 { return fGoodForTracking; } 285 286 inline void G4Track::SetGoodForTrackingFlag(G4bool value) 287 { fGoodForTracking = value; } 288 289 // track weight 290 inline void G4Track::SetWeight(G4double aValue) 291 { fWeight = aValue; } 292 293 inline G4double G4Track::GetWeight() const 294 { return fWeight; } 295 296 // user information 297 inline G4VUserTrackInformation* G4Track::GetUserInformation() const 298 { return fpUserInformation; } 299 inline void G4Track::SetUserInformation(G4VUserTrackInformation* aValue) 300 { fpUserInformation = aValue; } 301 300 302 inline const G4Step* G4Track::GetStep() const 301 303 { return fpStep; } 302 304 303 305 inline void G4Track::SetStep(const G4Step* aValue) 304 { fpStep = (aValue); } 305 306 307 308 309 306 { fpStep = aValue; } -
trunk/source/track/include/G4TrackVector.hh
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4TrackVector.hh,v 1. 2 2006/07/17 13:48:28 asaimExp $28 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // $Id: G4TrackVector.hh,v 1.3 2010/10/18 23:52:04 kurasige Exp $ 28 // GEANT4 tag $Name: track-V09-03-09 $ 29 29 // 30 30 //--------------------------------------------------------------- … … 47 47 48 48 #include <vector> 49 //#include "G4Track.hh" // Include form 'tracking'50 49 class G4Track; 50 class G4Step; 51 51 52 52 53 /////////////////////////////////////////////////// 53 typedef std::vector<G4Track*> G4TrackVector;54 //typedef std::vector<G4Track*> G4TrackVector; 54 55 /////////////////////////////////////////////////// 56 class G4TrackVector : public std::vector<G4Track*> 57 { 58 typedef G4Track* T; 59 60 // this class is used by G4Step!!! 61 friend class G4Step; 62 private: 63 std::vector<const G4Track*> secondaryInCurrent; 64 65 66 public: 67 virtual ~G4TrackVector(){ 68 secondaryInCurrent.clear(); 69 } 70 71 void push_back( const T& x){ 72 std::vector<G4Track*>::push_back(x); 73 secondaryInCurrent.push_back(x); 74 } 75 76 }; 77 55 78 56 79 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
