Geant4  10.01.p03
G4RichTrajectory.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 //
27 // $Id: G4RichTrajectory.hh 69003 2013-04-15 09:25:23Z gcosmo $
28 //
29 //---------------------------------------------------------------
30 //
31 // G4RichTrajectory.hh
32 //
33 // class description:
34 // This class extends G4Trajectory, which includes the following:
35 // 1) List of trajectory points which compose the trajectory,
36 // 2) static information of particle which generated the
37 // trajectory,
38 // 3) trackID and parent particle ID of the trajectory.
39 // The extended information, only publicly accessible through AttValues,
40 // includes:
41 // 4) physical volume and next physical volume;
42 // 5) creator process;
43 // ...and much more.
44 //
45 // Contact:
46 // Questions and comments on G4Trajectory should be sent to
47 // Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
48 // Makoto Asai (e-mail: asai@kekvax.kek.jp)
49 // Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
50 // and on the extended code to:
51 // John Allison (e-mail: John.Allison@manchester.ac.uk)
52 // Joseph Perl (e-mail: perl@slac.stanford.edu)
53 //
54 // ---------------------------------------------------------------
55 
56 #ifndef G4RICHTRAJECTORY_HH
57 #define G4RICHTRAJECTORY_HH
58 
59 #include "trkgdefs.hh"
60 #include "G4Trajectory.hh"
61 #include "G4TouchableHandle.hh"
62 
63 typedef std::vector<G4VTrajectoryPoint*> RichTrajectoryPointsContainer;
64 
66 
67 public: // with description
68 
69  // Constructors/destructors
71  G4RichTrajectory(const G4Track* aTrack);
73  virtual ~G4RichTrajectory();
74 
75 private:
77 
78  // Operators
79 public:
80  inline void* operator new(size_t);
81  inline void operator delete(void*);
82  inline int operator == (const G4RichTrajectory& right) const
83  {return (this==&right);}
84 
85  // Other (virtual) member functions
86  void ShowTrajectory(std::ostream& os=G4cout) const;
87  void DrawTrajectory() const;
88  void AppendStep(const G4Step* aStep);
89  void MergeTrajectory(G4VTrajectory* secondTrajectory);
90  int GetPointEntries() const { return fpRichPointsContainer->size(); }
92  { return (*fpRichPointsContainer)[i]; }
93 
94  // Get methods for HepRep style attributes
95  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
96  virtual std::vector<G4AttValue>* CreateAttValues() const;
97 
98 private:
99 
100  // Extended information (only publicly accessible through AttValues)...
109 
110 };
111 
114 
115 inline void* G4RichTrajectory::operator new(size_t)
116 {
119  return (void*)aRichTrajectoryAllocator->MallocSingle();
120 }
121 
122 inline void G4RichTrajectory::operator delete(void* aRichTrajectory)
123 {
124  aRichTrajectoryAllocator->FreeSingle((G4RichTrajectory*)aRichTrajectory);
125 }
126 
127 #endif
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual std::vector< G4AttValue > * CreateAttValues() const
void AppendStep(const G4Step *aStep)
void ShowTrajectory(std::ostream &os=G4cout) const
int GetPointEntries() const
#define G4ThreadLocal
Definition: tls.hh:89
G4TouchableHandle fpInitialNextVolume
int G4int
Definition: G4Types.hh:78
std::vector< G4VTrajectoryPoint * > RichTrajectoryPointsContainer
G4GLOB_DLL std::ostream G4cout
G4double fFinalKineticEnergy
G4TouchableHandle fpInitialVolume
G4RichTrajectory & operator=(const G4RichTrajectory &)
#define G4TRACKING_DLL
Definition: trkgdefs.hh:48
Definition: G4Step.hh:76
RichTrajectoryPointsContainer * fpRichPointsContainer
G4TouchableHandle fpFinalVolume
void MergeTrajectory(G4VTrajectory *secondTrajectory)
G4TouchableHandle fpFinalNextVolume
void DrawTrajectory() const
virtual ~G4RichTrajectory()
int operator==(const G4RichTrajectory &right) const
G4TRACKING_DLL G4ThreadLocal G4Allocator< G4RichTrajectory > * aRichTrajectoryAllocator
const G4VProcess * fpEndingProcess
double G4double
Definition: G4Types.hh:76
const G4VProcess * fpCreatorProcess
G4VTrajectoryPoint * GetPoint(G4int i) const