Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4RichTrajectoryPoint.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: G4RichTrajectoryPoint.hh 69003 2013-04-15 09:25:23Z gcosmo $
28 //
29 //---------------------------------------------------------------
30 //
31 // G4RichTrajectoryPoint.hh
32 //
33 // class description:
34 // This class extends G4TrajectoryPoint.
35 // From G4Trajectory, the following information is included:
36 // 1) Position (end of step).
37 // The extended information, only publicly accessible through AttValues,
38 // includes:
39 // 2) Auxiliary points, as in G4SmoothTrajectory.
40 // 3) Total energy deposit.
41 // 4) Remaining energy.
42 // 5) Process defining end of step.
43 // 6) Global time (from start of event) at pre- amd post-step.
44 // ...and more.
45 //
46 // Contact:
47 // Questions and comments to this code should be sent to
48 // Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
49 // Makoto Asai (e-mail: asai@kekvax.kek.jp)
50 // Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
51 // and on the extended code to:
52 // John Allison (e-mail: John.Allison@manchester.ac.uk)
53 // Joseph Perl (e-mail: perl@slac.stanford.edu)
54 //
55 // ---------------------------------------------------------------
56 
57 #ifndef G4RICHTRAJECTORYPOINT_HH
58 #define G4RICHTRAJECTORYPOINT_HH
59 
60 #include <vector>
61 
62 #include "trkgdefs.hh"
63 #include "G4TrajectoryPoint.hh"
64 #include "G4TouchableHandle.hh"
65 #include "G4ThreeVector.hh"
66 #include "G4StepStatus.hh"
67 
68 class G4Track;
69 class G4Step;
70 class G4VProcess;
71 
73 {
74 
75 public: // without description
76 
77  // Constructor/Destructor
79  G4RichTrajectoryPoint(const G4Track*); // For first point.
80  G4RichTrajectoryPoint(const G4Step*); // For subsequent points.
82  virtual ~G4RichTrajectoryPoint();
83 
84 private:
85  G4RichTrajectoryPoint& operator= (const G4RichTrajectoryPoint&);
86 
87 public:
88 
89  // Get/Set functions
90  const std::vector<G4ThreeVector>* GetAuxiliaryPoints() const
91  { return fpAuxiliaryPointVector; }
92 
93  // Operators
94  inline void *operator new(size_t);
95  inline void operator delete(void *aRichTrajectoryPoint);
96  inline int operator==(const G4RichTrajectoryPoint& right) const
97  { return (this==&right); }
98 
99  // Get methods for HepRep style attributes
100  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
101  virtual std::vector<G4AttValue>* CreateAttValues() const;
102 
103 private:
104 
105  // Extended member data
106  std::vector<G4ThreeVector>* fpAuxiliaryPointVector;
107  G4double fTotEDep;
108  G4double fRemainingEnergy;
109  const G4VProcess* fpProcess;
110  G4StepStatus fPreStepPointStatus;
111  G4StepStatus fPostStepPointStatus;
112  G4double fPreStepPointGlobalTime;
113  G4double fPostStepPointGlobalTime;
114  G4TouchableHandle fpPreStepPointVolume;
115  G4TouchableHandle fpPostStepPointVolume;
116  G4double fPreStepPointWeight;
117  G4double fPostStepPointWeight;
118 };
119 
122 
123 inline void* G4RichTrajectoryPoint::operator new(size_t)
124 {
127  return (void *) aRichTrajectoryPointAllocator->MallocSingle();
128 }
129 
130 inline void G4RichTrajectoryPoint::operator delete(void *aRichTrajectoryPoint)
131 {
133  ((G4RichTrajectoryPoint *) aRichTrajectoryPoint);
134 }
135 
136 #endif
const std::vector< G4ThreeVector > * GetAuxiliaryPoints() const
#define G4ThreadLocal
Definition: tls.hh:89
G4StepStatus
Definition: G4StepStatus.hh:49
#define G4TRACKING_DLL
Definition: trkgdefs.hh:48
virtual std::vector< G4AttValue > * CreateAttValues() const
Definition: G4Step.hh:76
int operator==(const G4RichTrajectoryPoint &right) const
double G4double
Definition: G4Types.hh:76
G4TRACKING_DLL G4ThreadLocal G4Allocator< G4RichTrajectoryPoint > * aRichTrajectoryPointAllocator
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const