Geant4  10.02
F04TrajectoryPoint.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: F04TrajectoryPoint.hh 76690 2013-11-14 08:45:07Z gcosmo $
27 //
30 //
31 
32 #ifndef F04TrajectoryPoint_h
33 #define F04TrajectoryPoint_h 1
34 
35 #include "globals.hh"
36 
37 #include "G4Allocator.hh"
38 #include "G4ThreeVector.hh"
39 #include "G4TrajectoryPoint.hh"
40 
41 #include "G4StepStatus.hh"
42 
43 class G4Track;
44 class G4Step;
45 class G4VProcess;
46 
48 
49 //--------
50  public: // without description
51 //--------
52 
53 // Constructor/Destructor
54 
56  F04TrajectoryPoint(const G4Track* aTrack);
57  F04TrajectoryPoint(const G4Step* aStep);
59  virtual ~F04TrajectoryPoint();
60 
61 // Operators
62 
63  inline void *operator new(size_t);
64  inline void operator delete(void *aTrajectoryPoint);
65  inline int operator==(const F04TrajectoryPoint& right) const
66  { return (this==&right); };
67 
68 // Get/Set functions
69 
70  inline G4double GetTime() const { return fTime; };
71  inline const G4ThreeVector GetMomentum() const { return fMomentum; };
72  inline G4StepStatus GetStepStatus() const { return fStepStatus; };
73  inline G4String GetVolumeName() const { return fVolumeName; };
74 
75 // Get method for HEPRep style attributes
76 
77  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
78  virtual std::vector<G4AttValue>* CreateAttValues() const;
79 
80 //---------
81  private:
82 //---------
83 
84 // Member data
85 
90 
91 };
92 
94 
95 inline void* F04TrajectoryPoint::operator new(size_t)
96 {
99  return (void *) F04TrajPointAllocator->MallocSingle();
100 }
101 
102 inline void F04TrajectoryPoint::operator delete(void *aTrajectoryPoint)
103 {
104  F04TrajPointAllocator->FreeSingle(
105  (F04TrajectoryPoint *) aTrajectoryPoint);
106 }
107 
108 #endif
CLHEP::Hep3Vector G4ThreeVector
virtual std::vector< G4AttValue > * CreateAttValues() const
G4String GetVolumeName() const
#define G4ThreadLocal
Definition: tls.hh:89
G4StepStatus
Definition: G4StepStatus.hh:49
G4double GetTime() const
int operator==(const F04TrajectoryPoint &right) const
G4StepStatus GetStepStatus() const
const G4ThreeVector GetMomentum() const
Definition: G4Step.hh:76
double G4double
Definition: G4Types.hh:76
G4ThreadLocal G4Allocator< F04TrajectoryPoint > * F04TrajPointAllocator
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const