Geant4  10.01.p01
RE01Trajectory.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 //
28 //
29 //
30 // $Id: RE01Trajectory.hh 75295 2013-10-30 09:32:52Z gcosmo $
31 //
32 
33 #ifndef RE01Trajectory_h
34 #define RE01Trajectory_h 1
35 
36 #include "G4VTrajectory.hh"
37 #include "G4Allocator.hh"
38 #include <stdlib.h>
39 #include "G4ThreeVector.hh"
40 #include "G4ios.hh"
41 #include "globals.hh"
42 #include "G4ParticleDefinition.hh"
43 #include "G4TrajectoryPoint.hh"
44 #include "G4Track.hh"
45 #include "G4Step.hh"
46 #include <vector>
47 
48 class G4Polyline;
49 class G4AttDef;
50 class G4AttValue;
51 
52 typedef std::vector<G4VTrajectoryPoint*> RE01TrajectoryPointContainer;
53 
55 {
56 public:
57  RE01Trajectory(const G4Track* aTrack);
58  virtual ~RE01Trajectory();
59 
60  virtual void ShowTrajectory(std::ostream& os=G4cout) const;
61  virtual void DrawTrajectory() const;
62  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
63  virtual std::vector<G4AttValue>* CreateAttValues() const;
64  virtual void AppendStep(const G4Step* aStep);
65  virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
66 
67  inline void* operator new(size_t);
68  inline void operator delete(void*);
69  inline int operator == (const RE01Trajectory& right) const
70  {return (this==&right);}
71 
72  virtual G4int GetTrackID() const { return fTrackID; }
73  virtual G4int GetParentID() const { return fParentID; }
74  virtual G4String GetParticleName() const { return fParticleName; }
75  virtual G4double GetCharge() const { return fPDGCharge; }
76  virtual G4int GetPDGEncoding() const { return fPDGEncoding; }
77  virtual G4ThreeVector GetInitialMomentum() const { return fMomentum; }
78  virtual int GetPointEntries() const { return fPositionRecord->size(); }
79  virtual G4VTrajectoryPoint* GetPoint(G4int i) const
80  { return (*fPositionRecord)[i]; }
81 
82  private:
94 
95 };
96 
98 
99 inline void* RE01Trajectory::operator new(size_t)
100 {
103  return (void*)myTrajectoryAllocator->MallocSingle();
104 }
105 
106 inline void RE01Trajectory::operator delete(void* aTrajectory)
107 {
108  myTrajectoryAllocator->FreeSingle((RE01Trajectory*)aTrajectory);
109 }
110 
111 #endif
112 
G4double fGlobalTime
G4ParticleDefinition * fParticleDefinition
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual ~RE01Trajectory()
G4ThreeVector fVertexPosition
CLHEP::Hep3Vector G4ThreeVector
int operator==(const RE01Trajectory &right) const
virtual void AppendStep(const G4Step *aStep)
G4ThreadLocal G4Allocator< RE01Trajectory > * myTrajectoryAllocator
virtual void ShowTrajectory(std::ostream &os=G4cout) const
virtual G4int GetParentID() const
RE01Trajectory(const G4Track *aTrack)
#define G4ThreadLocal
Definition: tls.hh:89
G4ThreeVector fMomentum
int G4int
Definition: G4Types.hh:78
G4double fPDGCharge
virtual G4int GetTrackID() const
virtual void DrawTrajectory() const
G4String fParticleName
G4GLOB_DLL std::ostream G4cout
virtual G4VTrajectoryPoint * GetPoint(G4int i) const
virtual G4ThreeVector GetInitialMomentum() const
Definition: G4Step.hh:76
virtual G4double GetCharge() const
RE01TrajectoryPointContainer * fPositionRecord
virtual G4int GetPDGEncoding() const
virtual std::vector< G4AttValue > * CreateAttValues() const
std::vector< G4VTrajectoryPoint * > RE01TrajectoryPointContainer
virtual void MergeTrajectory(G4VTrajectory *secondTrajectory)
double G4double
Definition: G4Types.hh:76
virtual int GetPointEntries() const
virtual G4String GetParticleName() const