File indexing completed on 2025-01-18 09:59:02
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
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051 #ifndef G4RICHTRAJECTORYPOINT_HH
0052 #define G4RICHTRAJECTORYPOINT_HH
0053
0054 #include "G4StepStatus.hh"
0055 #include "G4ThreeVector.hh"
0056 #include "G4TouchableHandle.hh"
0057 #include "G4TrajectoryPoint.hh"
0058
0059 #include "trkgdefs.hh"
0060
0061 #include <vector>
0062
0063 class G4Track;
0064 class G4Step;
0065 class G4VProcess;
0066
0067 class G4RichTrajectoryPoint : public G4TrajectoryPoint
0068 {
0069 public:
0070
0071
0072 G4RichTrajectoryPoint();
0073 G4RichTrajectoryPoint(const G4Track*);
0074 G4RichTrajectoryPoint(const G4Step*);
0075 G4RichTrajectoryPoint(const G4RichTrajectoryPoint& right);
0076 ~G4RichTrajectoryPoint() override;
0077
0078
0079
0080 G4RichTrajectoryPoint& operator=(const G4RichTrajectoryPoint&) = delete;
0081 inline G4bool operator==(const G4RichTrajectoryPoint& right) const;
0082 inline void* operator new(size_t);
0083 inline void operator delete(void* aRichTrajectoryPoint);
0084
0085
0086
0087 inline const std::vector<G4ThreeVector>* GetAuxiliaryPoints() const override;
0088 const std::map<G4String, G4AttDef>* GetAttDefs() const override;
0089 std::vector<G4AttValue>* CreateAttValues() const override;
0090
0091 private:
0092
0093
0094 std::vector<G4ThreeVector>* fpAuxiliaryPointVector = nullptr;
0095 G4double fTotEDep = 0.0;
0096 G4double fRemainingEnergy = 0.0;
0097 const G4VProcess* fpProcess = nullptr;
0098 G4StepStatus fPreStepPointStatus = fUndefined;
0099 G4StepStatus fPostStepPointStatus = fUndefined;
0100 G4double fPreStepPointGlobalTime = 0.0;
0101 G4double fPostStepPointGlobalTime = 0.0;
0102 G4TouchableHandle fpPreStepPointVolume;
0103 G4TouchableHandle fpPostStepPointVolume;
0104 G4double fPreStepPointWeight = 0.0;
0105 G4double fPostStepPointWeight = 0.0;
0106 };
0107
0108 extern G4TRACKING_DLL G4Allocator<G4RichTrajectoryPoint>*& aRichTrajectoryPointAllocator();
0109
0110 inline void* G4RichTrajectoryPoint::operator new(size_t)
0111 {
0112 if (aRichTrajectoryPointAllocator() == nullptr) {
0113 aRichTrajectoryPointAllocator() = new G4Allocator<G4RichTrajectoryPoint>;
0114 }
0115 return (void*)aRichTrajectoryPointAllocator()->MallocSingle();
0116 }
0117
0118 inline void G4RichTrajectoryPoint::operator delete(void* aRichTrajectoryPoint)
0119 {
0120 aRichTrajectoryPointAllocator()->FreeSingle((G4RichTrajectoryPoint*)aRichTrajectoryPoint);
0121 }
0122
0123 inline G4bool G4RichTrajectoryPoint::operator==(const G4RichTrajectoryPoint& r) const
0124 {
0125 return (this == &r);
0126 }
0127
0128 inline const std::vector<G4ThreeVector>* G4RichTrajectoryPoint::GetAuxiliaryPoints() const
0129 {
0130 return fpAuxiliaryPointVector;
0131 }
0132
0133 #endif