File indexing completed on 2025-01-18 09:59:04
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
0033
0034
0035
0036
0037
0038 #ifndef G4SCINTILLATIONTRACKINFORMATION_H
0039 #define G4SCINTILLATIONTRACKINFORMATION_H
0040
0041 #include "G4Allocator.hh"
0042 #include "G4VUserTrackInformation.hh"
0043
0044
0045 enum G4ScintillationType
0046 {
0047 Fast,
0048 Medium,
0049 Slow
0050 };
0051
0052 class G4ScintillationTrackInformation : public G4VUserTrackInformation
0053 {
0054 public:
0055 explicit G4ScintillationTrackInformation(
0056 const G4ScintillationType& aType = Slow);
0057 virtual ~G4ScintillationTrackInformation();
0058
0059
0060 void* operator new(size_t);
0061 void operator delete(void* aScintillationTI);
0062
0063
0064 G4ScintillationTrackInformation(const G4ScintillationTrackInformation&);
0065 G4ScintillationTrackInformation& operator=(
0066 const G4ScintillationTrackInformation&);
0067
0068 virtual void Print() const override;
0069
0070 const G4ScintillationType& GetScintillationType() const
0071 {
0072 return scintillationType;
0073 }
0074
0075
0076
0077
0078 static G4bool IsScintillationTrackInformation(
0079 const G4VUserTrackInformation* const);
0080 static G4ScintillationTrackInformation* Cast(
0081 const G4VUserTrackInformation* const);
0082
0083 private:
0084 G4ScintillationType scintillationType;
0085
0086 static const G4String BaseType;
0087 };
0088
0089
0090
0091
0092
0093
0094 class G4ScintillationTrackInformation;
0095
0096 #if defined G4EM_ALLOC_EXPORT
0097 extern G4DLLEXPORT G4Allocator<G4ScintillationTrackInformation>*&
0098 aScintillationTIAllocator();
0099 #else
0100 extern G4DLLIMPORT G4Allocator<G4ScintillationTrackInformation>*&
0101 aScintillationTIAllocator();
0102 #endif
0103
0104 inline void* G4ScintillationTrackInformation::operator new(size_t)
0105 {
0106 if(aScintillationTIAllocator() == nullptr)
0107 {
0108 aScintillationTIAllocator() =
0109 new G4Allocator<G4ScintillationTrackInformation>;
0110 }
0111 return (void*) aScintillationTIAllocator()->MallocSingle();
0112 }
0113
0114 inline void G4ScintillationTrackInformation::operator delete(
0115 void* aScintillationTI)
0116 {
0117 aScintillationTIAllocator()->FreeSingle(
0118 (G4ScintillationTrackInformation*) aScintillationTI);
0119 }
0120
0121 #endif