Geant4-11
G4StepPoint.icc
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// G4StepPoint inline methods implementation
27//
28// Author: Hisaya Kurashige, 16 February 2000
29// --------------------------------------------------------------------
30
31inline const G4ThreeVector& G4StepPoint::GetPosition() const
32{
33 return fPosition;
34}
35
36inline void G4StepPoint::SetPosition(const G4ThreeVector& aValue)
37{
38 fPosition = aValue;
39}
40
41inline void G4StepPoint::AddPosition(const G4ThreeVector& aValue)
42{
43 fPosition += aValue; // Position where the track locates
44}
45
46inline G4double G4StepPoint::GetLocalTime() const
47{
48 return fLocalTime;
49}
50
51inline void G4StepPoint::SetLocalTime(const G4double aValue)
52{
53 fLocalTime = aValue;
54}
55
56inline void G4StepPoint::AddLocalTime(const G4double aValue)
57{
58 fLocalTime += aValue; // Time since the track is created
59}
60
61inline G4double G4StepPoint::GetGlobalTime() const
62{
63 return fGlobalTime;
64}
65
66inline void G4StepPoint::SetGlobalTime(const G4double aValue)
67{
68 fGlobalTime = aValue;
69}
70
71inline void G4StepPoint::AddGlobalTime(const G4double aValue)
72{
73 fGlobalTime += aValue; // Time since the event in which the
74} // track belongs is created
75
76inline G4double G4StepPoint::GetProperTime() const
77{
78 return fProperTime;
79}
80
81inline void G4StepPoint::SetProperTime(const G4double aValue)
82{
83 fProperTime = aValue;
84}
85
86inline void G4StepPoint::AddProperTime(const G4double aValue)
87{
88 fProperTime += aValue; // Proper time of the particle
89}
90
91inline const G4ThreeVector& G4StepPoint::GetMomentumDirection() const
92{
93 return fMomentumDirection;
94}
95
96inline void G4StepPoint::SetMomentumDirection(const G4ThreeVector& aValue)
97{
98 fMomentumDirection = aValue;
99}
100
101inline void G4StepPoint::AddMomentumDirection(const G4ThreeVector& aValue)
102{
103 fMomentumDirection += aValue; // Direction of momentum (unit vector)
104}
105
106inline G4ThreeVector G4StepPoint::GetMomentum() const
107{
108 G4double tMomentum = // Total momentum of the track
109 std::sqrt(fKineticEnergy * fKineticEnergy + 2 * fKineticEnergy * fMass);
110 return G4ThreeVector(fMomentumDirection.x() * tMomentum,
111 fMomentumDirection.y() * tMomentum,
112 fMomentumDirection.z() * tMomentum);
113}
114
115inline G4double G4StepPoint::GetTotalEnergy() const
116{
117 return fKineticEnergy + fMass; // Total energy of the track
118}
119
120inline G4double G4StepPoint::GetKineticEnergy() const
121{
122 return fKineticEnergy;
123}
124
125inline void G4StepPoint::SetKineticEnergy(const G4double aValue)
126{
127 fKineticEnergy = aValue;
128}
129
130inline void G4StepPoint::AddKineticEnergy(const G4double aValue)
131{
132 fKineticEnergy += aValue; // Kinetic Energy of the track
133}
134
135inline G4double G4StepPoint::GetVelocity() const
136{
137 return fVelocity;
138}
139
140inline void G4StepPoint::SetVelocity(G4double v)
141{
142 fVelocity = v;
143}
144
145inline G4double G4StepPoint::GetBeta() const
146{
147 return fVelocity / CLHEP::c_light; // Velocity of the track
148} // in unit of c (light velocity)
149
150inline G4double G4StepPoint::GetGamma() const
151{
152 return (fMass == 0.) ? DBL_MAX : (fKineticEnergy + fMass) / fMass;
153 // Gamma factor (1/sqrt[1-beta*beta]) of the track
154}
155
156inline G4VPhysicalVolume* G4StepPoint::GetPhysicalVolume() const
157{
158 return fpTouchable->GetVolume();
159}
160
161inline const G4VTouchable* G4StepPoint::GetTouchable() const
162{
163 return fpTouchable();
164}
165
166inline const G4TouchableHandle& G4StepPoint::GetTouchableHandle() const
167{
168 return fpTouchable;
169}
170
171inline void G4StepPoint::SetTouchableHandle(const G4TouchableHandle& apValue)
172{
173 fpTouchable = apValue;
174}
175
176inline G4double G4StepPoint::GetSafety() const
177{
178 return fSafety;
179}
180
181inline void G4StepPoint::SetSafety(const G4double aValue)
182{
183 fSafety = aValue;
184}
185
186inline const G4ThreeVector& G4StepPoint::GetPolarization() const
187{
188 return fPolarization;
189}
190
191inline void G4StepPoint::SetPolarization(const G4ThreeVector& aValue)
192{
193 fPolarization = aValue;
194}
195
196inline void G4StepPoint::AddPolarization(const G4ThreeVector& aValue)
197{
198 fPolarization += aValue;
199}
200
201inline G4StepStatus G4StepPoint::GetStepStatus() const
202{
203 return fStepStatus;
204}
205
206inline void G4StepPoint::SetStepStatus(const G4StepStatus aValue)
207{
208 fStepStatus = aValue;
209}
210
211inline const G4VProcess* G4StepPoint::GetProcessDefinedStep() const
212{
213 // If the pointer is 0, this means the Step is defined
214 // by the user defined limit in the current volume.
215 return fpProcessDefinedStep;
216}
217
218inline void G4StepPoint::SetProcessDefinedStep(const G4VProcess* aValue)
219{
220 fpProcessDefinedStep = aValue;
221}
222
223inline G4double G4StepPoint::GetMass() const
224{
225 return fMass;
226}
227
228inline void G4StepPoint::SetMass(G4double value)
229{
230 fMass = value;
231}
232
233inline G4double G4StepPoint::GetCharge() const
234{
235 return fCharge;
236}
237
238inline void G4StepPoint::SetCharge(G4double value)
239{
240 fCharge = value;
241}
242
243inline G4double G4StepPoint::GetMagneticMoment() const
244{
245 return fMagneticMoment;
246}
247
248inline void G4StepPoint::SetMagneticMoment(G4double value)
249{
250 fMagneticMoment = value;
251}
252
253inline G4Material* G4StepPoint::GetMaterial() const
254{
255 return fpMaterial;
256}
257
258inline void G4StepPoint::SetMaterial(G4Material* material)
259{
260 fpMaterial = material;
261}
262
263inline const G4MaterialCutsCouple* G4StepPoint::GetMaterialCutsCouple() const
264{
265 return fpMaterialCutsCouple;
266}
267
268inline void G4StepPoint::SetMaterialCutsCouple(
269 const G4MaterialCutsCouple* materialCutsCouple)
270{
271 fpMaterialCutsCouple = materialCutsCouple;
272}
273
274inline G4VSensitiveDetector* G4StepPoint::GetSensitiveDetector() const
275{
276 return fpSensitiveDetector;
277}
278
279inline void G4StepPoint::SetSensitiveDetector(G4VSensitiveDetector* aValue)
280{
281 fpSensitiveDetector = aValue;
282}
283
284inline void G4StepPoint::SetWeight(G4double aValue)
285{
286 fWeight = aValue;
287}
288
289inline G4double G4StepPoint::GetWeight() const
290{
291 return fWeight;
292}