Geant4_10
WLSTrajectoryPoint.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: WLSTrajectoryPoint.hh 72065 2013-07-05 09:54:59Z gcosmo $
27 //
30 //
31 
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
34 
35 #ifndef WLSTrajectoryPoint_h_seen
36 #define WLSTrajectoryPoint_h_seen 1
37 
38 #include "globals.hh"
39 
40 #include "G4Allocator.hh"
41 #include "G4ThreeVector.hh"
42 #include "G4TrajectoryPoint.hh"
43 
44 #include "G4StepStatus.hh"
45 
46 class G4Track;
47 class G4Step;
48 class G4VProcess;
49 
51 
52 //--------
53  public: // without description
54 //--------
55 
56 // Constructor/Destructor
57 
59  WLSTrajectoryPoint(const G4Track* );
60  WLSTrajectoryPoint(const G4Step* );
62  virtual ~WLSTrajectoryPoint();
63 
64 // Operators
65 
66  inline void *operator new(size_t);
67  inline void operator delete(void *aTrajectoryPoint);
68  inline int operator==(const WLSTrajectoryPoint& right) const
69  { return (this==&right); };
70 
71 // Get/Set functions
72 
73  inline G4double GetTime() const { return fTime; };
74  inline const G4ThreeVector GetMomentum() const { return fMomentum; };
75  inline G4StepStatus GetStepStatus() const { return fStepStatus; };
76  inline G4String GetVolumeName() const { return fVolumeName; };
77 
78 // Get method for HEPRep style attributes
79 
80  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
81  virtual std::vector<G4AttValue>* CreateAttValues() const;
82 
83 //---------
84  private:
85 //---------
86 
87 // Member data
88 
89  G4double fTime;
90  G4ThreeVector fMomentum;
91  G4StepStatus fStepStatus;
92  G4String fVolumeName;
93 
94 };
95 
97 
98 inline void* WLSTrajectoryPoint::operator new(size_t)
99 {
102  return (void *) WLSTrajPointAllocator->MallocSingle();
103 }
104 
105 inline void WLSTrajectoryPoint::operator delete(void *aTrajectoryPoint)
106 {
107  WLSTrajPointAllocator->FreeSingle(
108  (WLSTrajectoryPoint *) aTrajectoryPoint);
109 }
110 
111 #endif
G4double GetTime() const
#define G4ThreadLocal
Definition: tls.hh:52
G4StepStatus
Definition: G4StepStatus.hh:49
virtual std::vector< G4AttValue > * CreateAttValues() const
G4StepStatus GetStepStatus() const
Definition: G4Step.hh:76
int operator==(const WLSTrajectoryPoint &right) const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
double G4double
Definition: G4Types.hh:76
G4String GetVolumeName() const
const G4ThreeVector GetMomentum() const
G4ThreadLocal G4Allocator< WLSTrajectoryPoint > * WLSTrajPointAllocator