Geant4  10.01.p01
F04Trajectory.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: F04Trajectory.hh 76690 2013-11-14 08:45:07Z gcosmo $
27 //
30 //
31 
32 #ifndef F04Trajectory_h
33 #define F04Trajectory_h 1
34 
35 #include <vector>
36 #include <stdlib.h>
37 
38 #include "globals.hh"
39 
40 #include "G4ios.hh"
41 #include "G4Step.hh"
42 #include "G4Track.hh"
43 #include "G4Allocator.hh"
44 #include "G4VTrajectory.hh"
45 #include "G4ParticleDefinition.hh"
46 #include "G4TrajectoryPoint.hh"
47 
48 typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
49 
51 {
52 
53 //--------
54  public: // without description
55 //--------
56 
57 // Constructor/Destructor
58 
59  F04Trajectory();
60  F04Trajectory(const G4Track* aTrack);
62  virtual ~F04Trajectory();
63 
64 // Operators
65 
66  inline void* operator new(size_t);
67  inline void operator delete(void*);
68  inline int operator == (const F04Trajectory& right) const
69  { return (this==&right); }
70 
71 // Get/Set functions
72 
73  inline G4int GetTrackID() const { return fTrackID; }
74  inline G4int GetParentID() const { return fParentID; }
75  inline G4String GetParticleName() const { return fParticleName; }
76  inline G4double GetCharge() const { return fPDGCharge; }
77  inline G4int GetPDGEncoding() const { return fPDGEncoding; }
79 
80 // Other member functions
81 
82  virtual void ShowTrajectory(std::ostream& os=G4cout) const;
83  virtual void DrawTrajectory() const;
84  virtual void AppendStep(const G4Step* aStep);
85  virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
86 
88 
89  virtual int GetPointEntries() const
90  { return fpPointsContainer->size(); }
91  virtual G4VTrajectoryPoint* GetPoint(G4int i) const
92  { return (*fpPointsContainer)[i]; }
93 
94  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
95  virtual std::vector<G4AttValue>* CreateAttValues() const;
96 
97 //---------
98  private:
99 //---------
100 
101 // Member data
102 
104 
111 
112 };
113 
115 
116 inline void* F04Trajectory::operator new(size_t) {
119  return (void*) F04TrajectoryAllocator->MallocSingle();
120 }
121 
122 inline void F04Trajectory::operator delete(void* aTrajectory) {
123  F04TrajectoryAllocator->FreeSingle((F04Trajectory*)aTrajectory);
124 }
125 
126 #endif
TrajectoryPointContainer * fpPointsContainer
virtual G4VTrajectoryPoint * GetPoint(G4int i) const
G4String GetParticleName() const
virtual ~F04Trajectory()
CLHEP::Hep3Vector G4ThreeVector
std::vector< G4VTrajectoryPoint * > TrajectoryPointContainer
virtual int GetPointEntries() const
G4ThreeVector fInitialMomentum
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
G4int GetPDGEncoding() const
G4String fParticleName
virtual std::vector< G4AttValue > * CreateAttValues() const
G4double fPDGCharge
G4GLOB_DLL std::ostream G4cout
virtual void ShowTrajectory(std::ostream &os=G4cout) const
G4int GetParentID() const
Definition: G4Step.hh:76
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
G4ThreeVector GetInitialMomentum() const
G4int GetTrackID() const
G4ParticleDefinition * GetParticleDefinition()
virtual void MergeTrajectory(G4VTrajectory *secondTrajectory)
double G4double
Definition: G4Types.hh:76
G4double GetCharge() const
virtual void DrawTrajectory() const
virtual void AppendStep(const G4Step *aStep)
int operator==(const F04Trajectory &right) const
G4ThreadLocal G4Allocator< F04Trajectory > * F04TrajectoryAllocator