Geant4  10.02
RE04Trajectory.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 // $Id: $
30 //
31 #ifndef RE04Trajectory_h
32 #define RE04Trajectory_h 1
33 
34 #include "G4VTrajectory.hh"
35 #include "G4Allocator.hh"
36 #include <stdlib.h> // Include from 'system'
37 #include "G4ios.hh" // Include from 'system'
38 #include <vector> // G4RWTValOrderedVector
39 #include "globals.hh" // Include from 'global'
40 #include "G4ParticleDefinition.hh" // Include from 'particle+matter'
41 #include "RE04TrajectoryPoint.hh" // Include from 'tracking'
42 #include "G4Track.hh"
43 #include "G4Step.hh"
44 
45 class G4Polyline; // Forward declaration.
46 
47 typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
48 
49 //
88 //
92 {
93 
94 //--------
95 public:
96 //--------
97 
98 // Constructor/Destrcutor
99 
100  RE04Trajectory();
101 
102  RE04Trajectory(const G4Track* aTrack);
104  virtual ~RE04Trajectory();
105 
106 // Operators
107  inline void* operator new(size_t);
108  inline void operator delete(void*);
109  inline int operator == (const RE04Trajectory& right) const
110  {return (this==&right);}
111 
112 // Get/Set functions
113  inline virtual G4int GetTrackID() const
114  { return fTrackID; }
115  inline virtual G4int GetParentID() const
116  { return fParentID; }
117  inline virtual G4String GetParticleName() const
118  { return fParticleName; }
119  inline virtual G4double GetCharge() const
120  { return fPDGCharge; }
121  inline virtual G4int GetPDGEncoding() const
122  { return fPDGEncoding; }
123  inline virtual G4double GetInitialKineticEnergy() const
124  { return fInitialKineticEnergy; }
125  inline virtual G4ThreeVector GetInitialMomentum() const
126  { return fInitialMomentum; }
127 
128 // Other member functions
129  virtual void ShowTrajectory(std::ostream& os=G4cout) const;
130  //virtual void DrawTrajectory() const;
131  virtual void DrawTrajectory() const;
132  virtual void AppendStep(const G4Step* aStep);
133  virtual int GetPointEntries() const { return fPositionRecord->size(); }
134  virtual G4VTrajectoryPoint* GetPoint(G4int i) const
135  { return (*fPositionRecord)[i]; }
136  virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
137 
139 
140  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
141  virtual std::vector<G4AttValue>* CreateAttValues() const;
142 
143 //---------
144  private:
145 //---------
146 
155 
156 };
157 
159 
160 inline void* RE04Trajectory::operator new(size_t)
161 {
163  return (void*)faTrajAllocator->MallocSingle();
164 }
165 
166 inline void RE04Trajectory::operator delete(void* aTrajectory)
167 {
168  faTrajAllocator->FreeSingle((RE04Trajectory*)aTrajectory);
169 }
170 
171 #endif
172 
virtual ~RE04Trajectory()
virtual G4VTrajectoryPoint * GetPoint(G4int i) const
TrajectoryPointContainer * fPositionRecord
std::vector< G4VTrajectoryPoint * > TrajectoryPointContainer
virtual G4double GetCharge() const
CLHEP::Hep3Vector G4ThreeVector
std::vector< G4VTrajectoryPoint * > TrajectoryPointContainer
virtual G4ThreeVector GetInitialMomentum() const
User trajectory class.
Definition of the RE04TrajectoryPoint class.
G4double fInitialKineticEnergy
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
virtual void ShowTrajectory(std::ostream &os=G4cout) const
virtual G4String GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4ParticleDefinition * GetParticleDefinition()
virtual void DrawTrajectory() const
Definition: G4Step.hh:76
virtual int GetPointEntries() const
virtual G4double GetInitialKineticEnergy() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
G4ThreadLocal G4Allocator< RE04Trajectory > * faTrajAllocator
virtual void MergeTrajectory(G4VTrajectory *secondTrajectory)
virtual void AppendStep(const G4Step *aStep)
G4String fParticleName
double G4double
Definition: G4Types.hh:76
virtual G4int GetParentID() const
int operator==(const RE04Trajectory &right) const
virtual std::vector< G4AttValue > * CreateAttValues() const
virtual G4int GetTrackID() const
G4ThreeVector fInitialMomentum
virtual G4int GetPDGEncoding() const