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