Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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// G4RichTrajectoryPoint
27//
28// Class description:
29//
30// This class extends G4TrajectoryPoint.
31// From G4Trajectory, the following information is included:
32// 1) Position (end of step).
33// The extended information, only publicly accessible through AttValues,
34// includes:
35// 2) Auxiliary points, as in G4SmoothTrajectory.
36// 3) Total energy deposit.
37// 4) Remaining energy.
38// 5) Process defining end of step.
39// 6) Global time (from start of event) at pre- amd post-step.
40// ...and more.
41
42// Contact:
43// Questions and comments to this code should be sent to
44// Katsuya Amako (e-mail: [email protected])
45// Makoto Asai (e-mail: [email protected])
46// Takashi Sasaki (e-mail: [email protected])
47// and on the extended code to:
48// John Allison (e-mail: [email protected])
49// Joseph Perl (e-mail: [email protected])
50// --------------------------------------------------------------------
51#ifndef G4RICHTRAJECTORYPOINT_HH
52#define G4RICHTRAJECTORYPOINT_HH
53
54#include <vector>
55
56#include "trkgdefs.hh"
57#include "G4TrajectoryPoint.hh"
58#include "G4TouchableHandle.hh"
59#include "G4ThreeVector.hh"
60#include "G4StepStatus.hh"
61
62class G4Track;
63class G4Step;
64class G4VProcess;
65
67{
68
69 public: // without description
70
71 // Constructors/Destructor
72 //
74 G4RichTrajectoryPoint(const G4Track*); // For first point.
75 G4RichTrajectoryPoint(const G4Step*); // For subsequent points.
77 virtual ~G4RichTrajectoryPoint();
78
79 // Operators
80 //
82 inline G4bool operator==(const G4RichTrajectoryPoint& right) const;
83 inline void *operator new(size_t);
84 inline void operator delete(void *aRichTrajectoryPoint);
85
86 // Get/Set functions
87 //
88 inline const std::vector<G4ThreeVector>* GetAuxiliaryPoints() const;
89 virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
90 virtual std::vector<G4AttValue>* CreateAttValues() const;
91
92 private:
93
94 // Extended member data
95 //
96 std::vector<G4ThreeVector>* fpAuxiliaryPointVector = nullptr;
97 G4double fTotEDep = 0.0;
98 G4double fRemainingEnergy = 0.0;
99 const G4VProcess* fpProcess = nullptr;
100 G4StepStatus fPreStepPointStatus = fUndefined;
101 G4StepStatus fPostStepPointStatus = fUndefined;
102 G4double fPreStepPointGlobalTime = 0.0;
103 G4double fPostStepPointGlobalTime = 0.0;
104 G4TouchableHandle fpPreStepPointVolume;
105 G4TouchableHandle fpPostStepPointVolume;
106 G4double fPreStepPointWeight = 0.0;
107 G4double fPostStepPointWeight = 0.0;
108};
109
110extern G4TRACKING_DLL
112
113inline void*
114G4RichTrajectoryPoint::operator new(size_t)
115{
116 if (aRichTrajectoryPointAllocator() == nullptr)
117 {
119 }
120 return (void *) aRichTrajectoryPointAllocator()->MallocSingle();
121}
122
123inline void
124G4RichTrajectoryPoint::operator delete(void *aRichTrajectoryPoint)
125{
127 ((G4RichTrajectoryPoint *) aRichTrajectoryPoint);
128}
129
130inline G4bool
132{
133 return (this==&r);
134}
135
136inline const std::vector<G4ThreeVector>*
138{
139 return fpAuxiliaryPointVector;
140}
141
142#endif
G4TRACKING_DLL G4Allocator< G4RichTrajectoryPoint > *& aRichTrajectoryPointAllocator()
G4StepStatus
Definition: G4StepStatus.hh:40
@ fUndefined
Definition: G4StepStatus.hh:55
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
const std::vector< G4ThreeVector > * GetAuxiliaryPoints() const
G4RichTrajectoryPoint & operator=(const G4RichTrajectoryPoint &)=delete
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
G4bool operator==(const G4RichTrajectoryPoint &right) const
virtual std::vector< G4AttValue > * CreateAttValues() const
Definition: G4Step.hh:62
#define G4TRACKING_DLL
Definition: trkgdefs.hh:45