File indexing completed on 2025-02-23 09:22:42
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
0030
0031
0032 #ifndef RE01TrackInformation_h
0033 #define RE01TrackInformation_h 1
0034
0035 #include "G4Allocator.hh"
0036 #include "G4ParticleDefinition.hh"
0037 #include "G4ThreeVector.hh"
0038 #include "G4Track.hh"
0039 #include "G4VUserTrackInformation.hh"
0040 #include "globals.hh"
0041
0042 class RE01TrackInformation : public G4VUserTrackInformation
0043 {
0044 public:
0045 RE01TrackInformation();
0046 RE01TrackInformation(const G4Track* aTrack);
0047 RE01TrackInformation(const RE01TrackInformation* aTrackInfo);
0048 virtual ~RE01TrackInformation();
0049
0050 inline void* operator new(size_t);
0051 inline void operator delete(void* aTrackInfo);
0052
0053 RE01TrackInformation& operator=(const RE01TrackInformation& right);
0054
0055 void SetSourceTrackInformation(const G4Track* aTrack);
0056 virtual void Print() const;
0057
0058 public:
0059 inline G4int GetTrackingStatus() const { return fTrackingStatus; }
0060 inline void SetTrackingStatus(G4int i) { fTrackingStatus = i; }
0061 inline G4int GetSourceTrackID() const { return fSourceTrackID; }
0062 inline void SetSuspendedStepID(G4int i) { fSuspendedStepID = i; }
0063 inline G4int GetSuspendedStepID() const { return fSuspendedStepID; }
0064
0065 private:
0066
0067 G4int fOriginalTrackID;
0068 G4ParticleDefinition* fParticleDefinition;
0069 G4ThreeVector fOriginalPosition;
0070 G4ThreeVector fOriginalMomentum;
0071 G4double fOriginalEnergy;
0072 G4double fOriginalTime;
0073
0074 G4int fTrackingStatus;
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084 G4int fSourceTrackID;
0085 G4ParticleDefinition* fSourceDefinition;
0086 G4ThreeVector fSourcePosition;
0087 G4ThreeVector fSourceMomentum;
0088 G4double fSourceEnergy;
0089 G4double fSourceTime;
0090 G4int fSuspendedStepID;
0091 };
0092
0093 extern G4ThreadLocal G4Allocator<RE01TrackInformation>* aTrackInformationAllocator;
0094
0095 inline void* RE01TrackInformation::operator new(size_t)
0096 {
0097 if (!aTrackInformationAllocator)
0098 aTrackInformationAllocator = new G4Allocator<RE01TrackInformation>;
0099 return (void*)aTrackInformationAllocator->MallocSingle();
0100 }
0101
0102 inline void RE01TrackInformation::operator delete(void* aTrackInfo)
0103 {
0104 aTrackInformationAllocator->FreeSingle((RE01TrackInformation*)aTrackInfo);
0105 }
0106
0107 #endif