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.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /track/include/G4StepPoint.icc (Version 11.3.0) and /track/include/G4StepPoint.icc (Version 11.0.p4)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // G4StepPoint inline methods implementation       26 // G4StepPoint inline methods implementation
 27 //                                                 27 //
 28 // Author: Hisaya Kurashige, 16 February 2000      28 // Author: Hisaya Kurashige, 16 February 2000
 29 // -------------------------------------------     29 // --------------------------------------------------------------------
 30                                                    30 
 31 inline const G4ThreeVector& G4StepPoint::GetPo     31 inline const G4ThreeVector& G4StepPoint::GetPosition() const
 32 {                                                  32 {
 33   return fPosition;                                33   return fPosition;
 34 }                                                  34 }
 35                                                    35 
 36 inline void G4StepPoint::SetPosition(const G4T     36 inline void G4StepPoint::SetPosition(const G4ThreeVector& aValue)
 37 {                                                  37 {
 38   fPosition = aValue;                              38   fPosition = aValue;
 39 }                                                  39 }
 40                                                    40 
 41 inline void G4StepPoint::AddPosition(const G4T     41 inline void G4StepPoint::AddPosition(const G4ThreeVector& aValue)
 42 {                                                  42 {
 43   fPosition += aValue;  // Position where the      43   fPosition += aValue;  // Position where the track locates
 44 }                                                  44 }
 45                                                    45 
 46 inline G4double G4StepPoint::GetLocalTime() co     46 inline G4double G4StepPoint::GetLocalTime() const
 47 {                                                  47 {
 48   return fLocalTime;                               48   return fLocalTime;
 49 }                                                  49 }
 50                                                    50 
 51 inline void G4StepPoint::SetLocalTime(const G4     51 inline void G4StepPoint::SetLocalTime(const G4double aValue)
 52 {                                                  52 {
 53   fLocalTime = aValue;                             53   fLocalTime = aValue;
 54 }                                                  54 }
 55                                                    55 
 56 inline void G4StepPoint::AddLocalTime(const G4     56 inline void G4StepPoint::AddLocalTime(const G4double aValue)
 57 {                                                  57 {
 58   fLocalTime += aValue;  // Time since the tra     58   fLocalTime += aValue;  // Time since the track is created
 59 }                                                  59 }
 60                                                    60 
 61 inline G4double G4StepPoint::GetGlobalTime() c     61 inline G4double G4StepPoint::GetGlobalTime() const
 62 {                                                  62 {
 63   return fGlobalTime;                              63   return fGlobalTime;
 64 }                                                  64 }
 65                                                    65 
 66 inline void G4StepPoint::SetGlobalTime(const G     66 inline void G4StepPoint::SetGlobalTime(const G4double aValue)
 67 {                                                  67 {
 68   fGlobalTime = aValue;                            68   fGlobalTime = aValue;
 69 }                                                  69 }
 70                                                    70 
 71 inline void G4StepPoint::AddGlobalTime(const G     71 inline void G4StepPoint::AddGlobalTime(const G4double aValue)
 72 {                                                  72 {
 73   fGlobalTime += aValue;  // Time since the ev     73   fGlobalTime += aValue;  // Time since the event in which the
 74 }                         // track belongs is      74 }                         // track belongs is created
 75                                                    75 
 76 inline G4double G4StepPoint::GetProperTime() c     76 inline G4double G4StepPoint::GetProperTime() const
 77 {                                                  77 {
 78   return fProperTime;                              78   return fProperTime;
 79 }                                                  79 }
 80                                                    80 
 81 inline void G4StepPoint::SetProperTime(const G     81 inline void G4StepPoint::SetProperTime(const G4double aValue)
 82 {                                                  82 {
 83   fProperTime = aValue;                            83   fProperTime = aValue;
 84 }                                                  84 }
 85                                                    85 
 86 inline void G4StepPoint::AddProperTime(const G     86 inline void G4StepPoint::AddProperTime(const G4double aValue)
 87 {                                                  87 {
 88   fProperTime += aValue;  // Proper time of th     88   fProperTime += aValue;  // Proper time of the particle
 89 }                                                  89 }
 90                                                    90 
 91 inline const G4ThreeVector& G4StepPoint::GetMo     91 inline const G4ThreeVector& G4StepPoint::GetMomentumDirection() const
 92 {                                                  92 {
 93   return fMomentumDirection;                       93   return fMomentumDirection;
 94 }                                                  94 }
 95                                                    95 
 96 inline void G4StepPoint::SetMomentumDirection(     96 inline void G4StepPoint::SetMomentumDirection(const G4ThreeVector& aValue)
 97 {                                                  97 {
 98   fMomentumDirection = aValue;                     98   fMomentumDirection = aValue;
 99 }                                                  99 }
100                                                   100 
101 inline void G4StepPoint::AddMomentumDirection(    101 inline void G4StepPoint::AddMomentumDirection(const G4ThreeVector& aValue)
102 {                                                 102 {
103   fMomentumDirection += aValue;  // Direction     103   fMomentumDirection += aValue;  // Direction of momentum (unit vector)
104 }                                                 104 }
105                                                   105 
106 inline G4ThreeVector G4StepPoint::GetMomentum(    106 inline G4ThreeVector G4StepPoint::GetMomentum() const
107 {                                                 107 {
108   G4double tMomentum =           // Total mome    108   G4double tMomentum =           // Total momentum of the track
109     std::sqrt(fKineticEnergy * fKineticEnergy     109     std::sqrt(fKineticEnergy * fKineticEnergy + 2 * fKineticEnergy * fMass);
110   return G4ThreeVector(fMomentumDirection.x()     110   return G4ThreeVector(fMomentumDirection.x() * tMomentum,
111                        fMomentumDirection.y()     111                        fMomentumDirection.y() * tMomentum,
112                        fMomentumDirection.z()     112                        fMomentumDirection.z() * tMomentum);
113 }                                                 113 }
114                                                   114 
115 inline G4double G4StepPoint::GetTotalEnergy()     115 inline G4double G4StepPoint::GetTotalEnergy() const
116 {                                                 116 {
117   return fKineticEnergy + fMass;  // Total ene    117   return fKineticEnergy + fMass;  // Total energy of the track
118 }                                                 118 }
119                                                   119 
120 inline G4double G4StepPoint::GetKineticEnergy(    120 inline G4double G4StepPoint::GetKineticEnergy() const
121 {                                                 121 {
122   return fKineticEnergy;                          122   return fKineticEnergy;
123 }                                                 123 }
124                                                   124 
125 inline void G4StepPoint::SetKineticEnergy(cons    125 inline void G4StepPoint::SetKineticEnergy(const G4double aValue)
126 {                                                 126 {
127   fKineticEnergy = aValue;                        127   fKineticEnergy = aValue;
128 }                                                 128 }
129                                                   129 
130 inline void G4StepPoint::AddKineticEnergy(cons    130 inline void G4StepPoint::AddKineticEnergy(const G4double aValue)
131 {                                                 131 {
132   fKineticEnergy += aValue;  // Kinetic Energy    132   fKineticEnergy += aValue;  // Kinetic Energy of the track
133 }                                                 133 }
134                                                   134 
135 inline G4double G4StepPoint::GetVelocity() con    135 inline G4double G4StepPoint::GetVelocity() const
136 {                                                 136 {
137   return fVelocity;                               137   return fVelocity;
138 }                                                 138 }
139                                                   139 
140 inline void G4StepPoint::SetVelocity(G4double     140 inline void G4StepPoint::SetVelocity(G4double v)
141 {                                                 141 {
142   fVelocity = v;                                  142   fVelocity = v;
143 }                                                 143 }
144                                                   144 
145 inline G4double G4StepPoint::GetBeta() const      145 inline G4double G4StepPoint::GetBeta() const
146 {                                                 146 {
147   return fVelocity / CLHEP::c_light;  // Veloc    147   return fVelocity / CLHEP::c_light;  // Velocity of the track
148 }                                     //  in u    148 }                                     //  in unit of c (light velocity)
149                                                   149 
150 inline G4double G4StepPoint::GetGamma() const     150 inline G4double G4StepPoint::GetGamma() const
151 {                                                 151 {
152   return (fMass == 0.) ? DBL_MAX : (fKineticEn    152   return (fMass == 0.) ? DBL_MAX : (fKineticEnergy + fMass) / fMass;
153     // Gamma factor (1/sqrt[1-beta*beta]) of t    153     // Gamma factor (1/sqrt[1-beta*beta]) of the track
154 }                                                 154 }
155                                                   155 
156 inline G4VPhysicalVolume* G4StepPoint::GetPhys    156 inline G4VPhysicalVolume* G4StepPoint::GetPhysicalVolume() const
157 {                                                 157 {
158   return fpTouchable->GetVolume();                158   return fpTouchable->GetVolume();
159 }                                                 159 }
160                                                   160 
161 inline const G4VTouchable* G4StepPoint::GetTou    161 inline const G4VTouchable* G4StepPoint::GetTouchable() const
162 {                                                 162 {
163   return fpTouchable();                           163   return fpTouchable();
164 }                                                 164 }
165                                                   165 
166 inline const G4TouchableHandle& G4StepPoint::G    166 inline const G4TouchableHandle& G4StepPoint::GetTouchableHandle() const
167 {                                                 167 {
168   return fpTouchable;                             168   return fpTouchable;
169 }                                                 169 }
170                                                   170 
171 inline void G4StepPoint::SetTouchableHandle(co    171 inline void G4StepPoint::SetTouchableHandle(const G4TouchableHandle& apValue)
172 {                                                 172 {
173   fpTouchable = apValue;                          173   fpTouchable = apValue;
174 }                                                 174 }
175                                                   175 
176 inline G4double G4StepPoint::GetSafety() const    176 inline G4double G4StepPoint::GetSafety() const
177 {                                                 177 {
178   return fSafety;                                 178   return fSafety;
179 }                                                 179 }
180                                                   180 
181 inline void G4StepPoint::SetSafety(const G4dou    181 inline void G4StepPoint::SetSafety(const G4double aValue)
182 {                                                 182 {
183   fSafety = aValue;                               183   fSafety = aValue;
184 }                                                 184 }
185                                                   185 
186 inline const G4ThreeVector& G4StepPoint::GetPo    186 inline const G4ThreeVector& G4StepPoint::GetPolarization() const
187 {                                                 187 {
188   return fPolarization;                           188   return fPolarization;
189 }                                                 189 }
190                                                   190 
191 inline void G4StepPoint::SetPolarization(const    191 inline void G4StepPoint::SetPolarization(const G4ThreeVector& aValue)
192 {                                                 192 {
193   fPolarization = aValue;                         193   fPolarization = aValue;
194 }                                                 194 }
195                                                   195 
196 inline void G4StepPoint::AddPolarization(const    196 inline void G4StepPoint::AddPolarization(const G4ThreeVector& aValue)
197 {                                                 197 {
198   fPolarization += aValue;                        198   fPolarization += aValue;
199 }                                                 199 }
200                                                   200 
201 inline G4StepStatus G4StepPoint::GetStepStatus    201 inline G4StepStatus G4StepPoint::GetStepStatus() const
202 {                                                 202 {
203   return fStepStatus;                             203   return fStepStatus;
204 }                                                 204 }
205                                                   205 
206 inline void G4StepPoint::SetStepStatus(const G    206 inline void G4StepPoint::SetStepStatus(const G4StepStatus aValue)
207 {                                                 207 {
208   fStepStatus = aValue;                           208   fStepStatus = aValue;
209 }                                                 209 }
210                                                   210 
211 inline const G4VProcess* G4StepPoint::GetProce    211 inline const G4VProcess* G4StepPoint::GetProcessDefinedStep() const
212 {                                                 212 {
213   // If the pointer is 0, this means the Step     213   // If the pointer is 0, this means the Step is defined
214   // by the user defined limit in the current     214   // by the user defined limit in the current volume.
215   return fpProcessDefinedStep;                    215   return fpProcessDefinedStep;
216 }                                                 216 }
217                                                   217 
218 inline void G4StepPoint::SetProcessDefinedStep    218 inline void G4StepPoint::SetProcessDefinedStep(const G4VProcess* aValue)
219 {                                                 219 {
220   fpProcessDefinedStep = aValue;                  220   fpProcessDefinedStep = aValue;
221 }                                                 221 }
222                                                   222 
223 inline G4double G4StepPoint::GetMass() const      223 inline G4double G4StepPoint::GetMass() const
224 {                                                 224 {
225   return fMass;                                   225   return fMass;
226 }                                                 226 }
227                                                   227 
228 inline void G4StepPoint::SetMass(G4double valu    228 inline void G4StepPoint::SetMass(G4double value)
229 {                                                 229 {
230   fMass = value;                                  230   fMass = value;
231 }                                                 231 }
232                                                   232 
233 inline G4double G4StepPoint::GetCharge() const    233 inline G4double G4StepPoint::GetCharge() const
234 {                                                 234 {
235   return fCharge;                                 235   return fCharge;
236 }                                                 236 }
237                                                   237 
238 inline void G4StepPoint::SetCharge(G4double va    238 inline void G4StepPoint::SetCharge(G4double value)
239 {                                                 239 {
240   fCharge = value;                                240   fCharge = value;
241 }                                                 241 }
242                                                   242 
243 inline G4double G4StepPoint::GetMagneticMoment    243 inline G4double G4StepPoint::GetMagneticMoment() const
244 {                                                 244 {
245   return fMagneticMoment;                         245   return fMagneticMoment;
246 }                                                 246 }
247                                                   247 
248 inline void G4StepPoint::SetMagneticMoment(G4d    248 inline void G4StepPoint::SetMagneticMoment(G4double value)
249 {                                                 249 {
250   fMagneticMoment = value;                        250   fMagneticMoment = value;
251 }                                                 251 }
252                                                   252 
253 inline G4Material* G4StepPoint::GetMaterial()     253 inline G4Material* G4StepPoint::GetMaterial() const
254 {                                                 254 {
255   return fpMaterial;                              255   return fpMaterial;
256 }                                                 256 }
257                                                   257 
258 inline void G4StepPoint::SetMaterial(G4Materia    258 inline void G4StepPoint::SetMaterial(G4Material* material)
259 {                                                 259 {
260   fpMaterial = material;                          260   fpMaterial = material;
261 }                                                 261 }
262                                                   262 
263 inline const G4MaterialCutsCouple* G4StepPoint    263 inline const G4MaterialCutsCouple* G4StepPoint::GetMaterialCutsCouple() const
264 {                                                 264 {
265   return fpMaterialCutsCouple;                    265   return fpMaterialCutsCouple;
266 }                                                 266 }
267                                                   267 
268 inline void G4StepPoint::SetMaterialCutsCouple    268 inline void G4StepPoint::SetMaterialCutsCouple(
269   const G4MaterialCutsCouple* materialCutsCoup    269   const G4MaterialCutsCouple* materialCutsCouple)
270 {                                                 270 {
271   fpMaterialCutsCouple = materialCutsCouple;      271   fpMaterialCutsCouple = materialCutsCouple;
272 }                                                 272 }
273                                                   273 
274 inline G4VSensitiveDetector* G4StepPoint::GetS    274 inline G4VSensitiveDetector* G4StepPoint::GetSensitiveDetector() const
275 {                                                 275 {
276   return fpSensitiveDetector;                     276   return fpSensitiveDetector;
277 }                                                 277 }
278                                                   278 
279 inline void G4StepPoint::SetSensitiveDetector(    279 inline void G4StepPoint::SetSensitiveDetector(G4VSensitiveDetector* aValue)
280 {                                                 280 {
281   fpSensitiveDetector = aValue;                   281   fpSensitiveDetector = aValue;
282 }                                                 282 }
283                                                   283 
284 inline void G4StepPoint::SetWeight(G4double aV    284 inline void G4StepPoint::SetWeight(G4double aValue)
285 {                                                 285 {
286   fWeight = aValue;                               286   fWeight = aValue;
287 }                                                 287 }
288                                                   288 
289 inline G4double G4StepPoint::GetWeight() const    289 inline G4double G4StepPoint::GetWeight() const
290 {                                                 290 {
291   return fWeight;                                 291   return fWeight;
292 }                                                 292 }
293                                                   293