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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 9.5.p2)


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