Geant4 11.2.2
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 "G4StepStatus.hh"
55#include "G4ThreeVector.hh"
56#include "G4TouchableHandle.hh"
57#include "G4TrajectoryPoint.hh"
58
59#include "trkgdefs.hh"
60
61#include <vector>
62
63class G4Track;
64class G4Step;
65class G4VProcess;
66
68{
69 public: // without description
70 // Constructors/Destructor
71 //
73 G4RichTrajectoryPoint(const G4Track*); // For first point.
74 G4RichTrajectoryPoint(const G4Step*); // For subsequent points.
76 ~G4RichTrajectoryPoint() override;
77
78 // Operators
79 //
81 inline G4bool operator==(const G4RichTrajectoryPoint& right) const;
82 inline void* operator new(size_t);
83 inline void operator delete(void* aRichTrajectoryPoint);
84
85 // Get/Set functions
86 //
87 inline const std::vector<G4ThreeVector>* GetAuxiliaryPoints() const override;
88 const std::map<G4String, G4AttDef>* GetAttDefs() const override;
89 std::vector<G4AttValue>* CreateAttValues() const override;
90
91 private:
92 // Extended member data
93 //
94 std::vector<G4ThreeVector>* fpAuxiliaryPointVector = nullptr;
95 G4double fTotEDep = 0.0;
96 G4double fRemainingEnergy = 0.0;
97 const G4VProcess* fpProcess = nullptr;
98 G4StepStatus fPreStepPointStatus = fUndefined;
99 G4StepStatus fPostStepPointStatus = fUndefined;
100 G4double fPreStepPointGlobalTime = 0.0;
101 G4double fPostStepPointGlobalTime = 0.0;
102 G4TouchableHandle fpPreStepPointVolume;
103 G4TouchableHandle fpPostStepPointVolume;
104 G4double fPreStepPointWeight = 0.0;
105 G4double fPostStepPointWeight = 0.0;
106};
107
109
110inline void* G4RichTrajectoryPoint::operator new(size_t)
111{
112 if (aRichTrajectoryPointAllocator() == nullptr) {
114 }
115 return (void*)aRichTrajectoryPointAllocator()->MallocSingle();
116}
117
118inline void G4RichTrajectoryPoint::operator delete(void* aRichTrajectoryPoint)
119{
120 aRichTrajectoryPointAllocator()->FreeSingle((G4RichTrajectoryPoint*)aRichTrajectoryPoint);
121}
122
124{
125 return (this == &r);
126}
127
128inline const std::vector<G4ThreeVector>* G4RichTrajectoryPoint::GetAuxiliaryPoints() const
129{
130 return fpAuxiliaryPointVector;
131}
132
133#endif
G4TRACKING_DLL G4Allocator< G4RichTrajectoryPoint > *& aRichTrajectoryPointAllocator()
G4StepStatus
@ fUndefined
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
const std::map< G4String, G4AttDef > * GetAttDefs() const override
G4RichTrajectoryPoint & operator=(const G4RichTrajectoryPoint &)=delete
std::vector< G4AttValue > * CreateAttValues() const override
G4bool operator==(const G4RichTrajectoryPoint &right) const
const std::vector< G4ThreeVector > * GetAuxiliaryPoints() const override
G4RichTrajectoryPoint(const G4RichTrajectoryPoint &right)
#define G4TRACKING_DLL
Definition trkgdefs.hh:45