Warning, file /geant4/examples/extended/optical/wls/include/WLSTrajectoryPoint.hh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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 WLSTrajectoryPoint_h
0030 #define WLSTrajectoryPoint_h 1
0031
0032 #include "G4Allocator.hh"
0033 #include "G4StepStatus.hh"
0034 #include "G4ThreeVector.hh"
0035 #include "G4TrajectoryPoint.hh"
0036 #include "globals.hh"
0037
0038 class G4Track;
0039 class G4Step;
0040 class G4VProcess;
0041
0042 class WLSTrajectoryPoint : public G4TrajectoryPoint
0043 {
0044 public:
0045 WLSTrajectoryPoint() = default;
0046 WLSTrajectoryPoint(const G4Track*);
0047 WLSTrajectoryPoint(const G4Step*);
0048 WLSTrajectoryPoint(const WLSTrajectoryPoint& right);
0049 ~WLSTrajectoryPoint() override = default;
0050
0051 inline void* operator new(size_t);
0052 inline void operator delete(void* aTrajectoryPoint);
0053 inline G4bool operator==(const WLSTrajectoryPoint& right) const { return (this == &right); };
0054
0055 inline G4double GetTime() const { return fTime; };
0056 inline const G4ThreeVector GetMomentum() const { return fMomentum; };
0057 inline G4StepStatus GetStepStatus() const { return fStepStatus; };
0058 inline G4String GetVolumeName() const { return fVolumeName; };
0059
0060 const std::map<G4String, G4AttDef>* GetAttDefs() const override;
0061 std::vector<G4AttValue>* CreateAttValues() const override;
0062
0063 private:
0064 G4double fTime = 0.;
0065 G4ThreeVector fMomentum;
0066 G4StepStatus fStepStatus = fUndefined;
0067 G4String fVolumeName;
0068 };
0069
0070 extern G4ThreadLocal G4Allocator<WLSTrajectoryPoint>* WLSTrajPointAllocator;
0071
0072 inline void* WLSTrajectoryPoint::operator new(size_t)
0073 {
0074 if (!WLSTrajPointAllocator) WLSTrajPointAllocator = new G4Allocator<WLSTrajectoryPoint>;
0075 return (void*)WLSTrajPointAllocator->MallocSingle();
0076 }
0077
0078 inline void WLSTrajectoryPoint::operator delete(void* aTrajectoryPoint)
0079 {
0080 WLSTrajPointAllocator->FreeSingle((WLSTrajectoryPoint*)aTrajectoryPoint);
0081 }
0082
0083 #endif