File indexing completed on 2026-03-31 07:50:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef RE01TrackInformation_h
0030 #define RE01TrackInformation_h 1
0031
0032 #include "G4Allocator.hh"
0033 #include "G4ParticleDefinition.hh"
0034 #include "G4ThreeVector.hh"
0035 #include "G4Track.hh"
0036 #include "G4VUserTrackInformation.hh"
0037 #include "globals.hh"
0038
0039 class RE01TrackInformation : public G4VUserTrackInformation
0040 {
0041 public:
0042 RE01TrackInformation();
0043 RE01TrackInformation(const G4Track* aTrack);
0044 RE01TrackInformation(const RE01TrackInformation* aTrackInfo);
0045 virtual ~RE01TrackInformation();
0046
0047 inline void* operator new(size_t);
0048 inline void operator delete(void* aTrackInfo);
0049
0050 RE01TrackInformation& operator=(const RE01TrackInformation& right);
0051
0052 void SetSourceTrackInformation(const G4Track* aTrack);
0053 virtual void Print() const;
0054
0055 public:
0056 inline G4int GetTrackingStatus() const { return fTrackingStatus; }
0057 inline void SetTrackingStatus(G4int i) { fTrackingStatus = i; }
0058 inline G4int GetSourceTrackID() const { return fSourceTrackID; }
0059 inline void SetSuspendedStepID(G4int i) { fSuspendedStepID = i; }
0060 inline G4int GetSuspendedStepID() const { return fSuspendedStepID; }
0061
0062 private:
0063
0064 G4int fOriginalTrackID;
0065 G4ParticleDefinition* fParticleDefinition;
0066 G4ThreeVector fOriginalPosition;
0067 G4ThreeVector fOriginalMomentum;
0068 G4double fOriginalEnergy;
0069 G4double fOriginalTime;
0070
0071 G4int fTrackingStatus;
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081 G4int fSourceTrackID;
0082 G4ParticleDefinition* fSourceDefinition;
0083 G4ThreeVector fSourcePosition;
0084 G4ThreeVector fSourceMomentum;
0085 G4double fSourceEnergy;
0086 G4double fSourceTime;
0087 G4int fSuspendedStepID;
0088 };
0089
0090 extern G4ThreadLocal G4Allocator<RE01TrackInformation>* aTrackInformationAllocator;
0091
0092 inline void* RE01TrackInformation::operator new(size_t)
0093 {
0094 if (!aTrackInformationAllocator)
0095 aTrackInformationAllocator = new G4Allocator<RE01TrackInformation>;
0096 return (void*)aTrackInformationAllocator->MallocSingle();
0097 }
0098
0099 inline void RE01TrackInformation::operator delete(void* aTrackInfo)
0100 {
0101 aTrackInformationAllocator->FreeSingle((RE01TrackInformation*)aTrackInfo);
0102 }
0103
0104 #endif