Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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$
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 "G4TrajectoryPoint.hh"
61
62#include "G4TouchableHandle.hh"
63#include "G4ThreeVector.hh"
64#include "G4StepStatus.hh"
65#include <vector>
66
67class G4Track;
68class G4Step;
69class G4VProcess;
70
72{
73
74public: // without description
75
76 // Constructor/Destructor
78 G4RichTrajectoryPoint(const G4Track*); // For first point.
79 G4RichTrajectoryPoint(const G4Step*); // For subsequent points.
81 virtual ~G4RichTrajectoryPoint();
82
83private:
85
86public:
87
88 // Get/Set functions
89 const std::vector<G4ThreeVector>* GetAuxiliaryPoints() const
90 { return fpAuxiliaryPointVector; }
91
92 // Operators
93 inline void *operator new(size_t);
94 inline void operator delete(void *aRichTrajectoryPoint);
95 inline int operator==(const G4RichTrajectoryPoint& right) const
96 { return (this==&right); }
97
98 // Get methods for HepRep style attributes
99 virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
100 virtual std::vector<G4AttValue>* CreateAttValues() const;
101
102private:
103
104 // Extended member data
105 std::vector<G4ThreeVector>* fpAuxiliaryPointVector;
106 G4double fTotEDep;
107 G4double fRemainingEnergy;
108 const G4VProcess* fpProcess;
109 G4StepStatus fPreStepPointStatus;
110 G4StepStatus fPostStepPointStatus;
111 G4double fPreStepPointGlobalTime;
112 G4double fPostStepPointGlobalTime;
113 G4TouchableHandle fpPreStepPointVolume;
114 G4TouchableHandle fpPostStepPointVolume;
115 G4double fPreStepPointWeight;
116 G4double fPostStepPointWeight;
117};
118
119#if defined G4TRACKING_ALLOC_EXPORT
122#else
125#endif
126
127inline void* G4RichTrajectoryPoint::operator new(size_t)
128{
129 void *aRichTrajectoryPoint;
130 aRichTrajectoryPoint =
131 (void *) aRichTrajectoryPointAllocator.MallocSingle();
132 return aRichTrajectoryPoint;
133}
134
135inline void G4RichTrajectoryPoint::operator delete
136(void *aRichTrajectoryPoint)
137{
139 ((G4RichTrajectoryPoint *) aRichTrajectoryPoint);
140}
141
142#endif
143
G4DLLIMPORT G4Allocator< G4RichTrajectoryPoint > aRichTrajectoryPointAllocator
G4StepStatus
Definition: G4StepStatus.hh:51
double G4double
Definition: G4Types.hh:64
#define G4DLLIMPORT
Definition: G4Types.hh:56
#define G4DLLEXPORT
Definition: G4Types.hh:55
const std::vector< G4ThreeVector > * GetAuxiliaryPoints() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual std::vector< G4AttValue > * CreateAttValues() const
int operator==(const G4RichTrajectoryPoint &right) const
Definition: G4Step.hh:78