ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4RichTrajectory.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4RichTrajectory.hh
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 // G4RichTrajectory
27 //
28 // class description:
29 //
30 // This class extends G4Trajectory, which includes the following:
31 // 1) List of trajectory points which compose the trajectory,
32 // 2) static information of particle which generated the
33 // trajectory,
34 // 3) trackID and parent particle ID of the trajectory.
35 // The extended information, only publicly accessible through AttValues,
36 // includes:
37 // 4) physical volume and next physical volume;
38 // 5) creator process;
39 // ...and much more.
40 
41 // Contact:
42 // Questions and comments on G4Trajectory should be sent to
43 // Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
44 // Makoto Asai (e-mail: asai@kekvax.kek.jp)
45 // Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
46 // and on the extended code to:
47 // John Allison (e-mail: John.Allison@manchester.ac.uk)
48 // Joseph Perl (e-mail: perl@slac.stanford.edu)
49 // --------------------------------------------------------------------
50 #ifndef G4RICHTRAJECTORY_HH
51 #define G4RICHTRAJECTORY_HH
52 
53 #include "trkgdefs.hh"
54 #include "G4Trajectory.hh"
55 #include "G4TouchableHandle.hh"
56 
58 {
59  using RichTrajectoryPointsContainer = std::vector<G4VTrajectoryPoint*>;
60 
61  public: // with description
62 
63  // Constructors/destructor
65  G4RichTrajectory(const G4Track* aTrack);
67  virtual ~G4RichTrajectory();
68 
69  // Operators
70  G4RichTrajectory& operator= (const G4RichTrajectory &) = delete;
71  G4int operator == (const G4RichTrajectory& r) const { return (this==&r); }
72 
73  inline void* operator new(size_t);
74  inline void operator delete(void*);
75 
76  // Other (virtual) member functions
77  void ShowTrajectory(std::ostream& os=G4cout) const;
78  void DrawTrajectory() const;
79  void AppendStep(const G4Step* aStep);
80  void MergeTrajectory(G4VTrajectory* secondTrajectory);
81  G4int GetPointEntries() const {return G4int(fpRichPointsContainer->size());}
83 
84  // Get methods for HepRep style attributes
85  virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
86  virtual std::vector<G4AttValue>* CreateAttValues() const;
87 
88  private:
89 
90  // Extended information (only publicly accessible through AttValues)...
100 };
101 
103 
104 inline void* G4RichTrajectory::operator new(size_t)
105 {
108  return (void*)aRichTrajectoryAllocator()->MallocSingle();
109 }
110 
111 inline void G4RichTrajectory::operator delete(void* aRichTrajectory)
112 {
113  aRichTrajectoryAllocator()->FreeSingle((G4RichTrajectory*)aRichTrajectory);
114 }
115 
116 #endif