Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:08

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // G4StepPoint inline methods implementation
0027 //
0028 // Author: Hisaya Kurashige, 16 February 2000
0029 // --------------------------------------------------------------------
0030 
0031 inline const G4ThreeVector& G4StepPoint::GetPosition() const
0032 {
0033   return fPosition;
0034 }
0035 
0036 inline void G4StepPoint::SetPosition(const G4ThreeVector& aValue)
0037 {
0038   fPosition = aValue;
0039 }
0040 
0041 inline void G4StepPoint::AddPosition(const G4ThreeVector& aValue)
0042 {
0043   fPosition += aValue;  // Position where the track locates
0044 }
0045 
0046 inline G4double G4StepPoint::GetLocalTime() const
0047 {
0048   return fLocalTime;
0049 }
0050 
0051 inline void G4StepPoint::SetLocalTime(const G4double aValue)
0052 {
0053   fLocalTime = aValue;
0054 }
0055 
0056 inline void G4StepPoint::AddLocalTime(const G4double aValue)
0057 {
0058   fLocalTime += aValue;  // Time since the track is created
0059 }
0060 
0061 inline G4double G4StepPoint::GetGlobalTime() const
0062 {
0063   return fGlobalTime;
0064 }
0065 
0066 inline void G4StepPoint::SetGlobalTime(const G4double aValue)
0067 {
0068   fGlobalTime = aValue;
0069 }
0070 
0071 inline void G4StepPoint::AddGlobalTime(const G4double aValue)
0072 {
0073   fGlobalTime += aValue;  // Time since the event in which the
0074 }                         // track belongs is created
0075 
0076 inline G4double G4StepPoint::GetProperTime() const
0077 {
0078   return fProperTime;
0079 }
0080 
0081 inline void G4StepPoint::SetProperTime(const G4double aValue)
0082 {
0083   fProperTime = aValue;
0084 }
0085 
0086 inline void G4StepPoint::AddProperTime(const G4double aValue)
0087 {
0088   fProperTime += aValue;  // Proper time of the particle
0089 }
0090 
0091 inline const G4ThreeVector& G4StepPoint::GetMomentumDirection() const
0092 {
0093   return fMomentumDirection;
0094 }
0095 
0096 inline void G4StepPoint::SetMomentumDirection(const G4ThreeVector& aValue)
0097 {
0098   fMomentumDirection = aValue;
0099 }
0100 
0101 inline void G4StepPoint::AddMomentumDirection(const G4ThreeVector& aValue)
0102 {
0103   fMomentumDirection += aValue;  // Direction of momentum (unit vector)
0104 }
0105 
0106 inline G4ThreeVector G4StepPoint::GetMomentum() const
0107 {
0108   G4double tMomentum =           // Total momentum of the track
0109     std::sqrt(fKineticEnergy * fKineticEnergy + 2 * fKineticEnergy * fMass);
0110   return G4ThreeVector(fMomentumDirection.x() * tMomentum,
0111                        fMomentumDirection.y() * tMomentum,
0112                        fMomentumDirection.z() * tMomentum);
0113 }
0114 
0115 inline G4double G4StepPoint::GetTotalEnergy() const
0116 {
0117   return fKineticEnergy + fMass;  // Total energy of the track
0118 }
0119 
0120 inline G4double G4StepPoint::GetKineticEnergy() const
0121 {
0122   return fKineticEnergy;
0123 }
0124 
0125 inline void G4StepPoint::SetKineticEnergy(const G4double aValue)
0126 {
0127   fKineticEnergy = aValue;
0128 }
0129 
0130 inline void G4StepPoint::AddKineticEnergy(const G4double aValue)
0131 {
0132   fKineticEnergy += aValue;  // Kinetic Energy of the track
0133 }
0134 
0135 inline G4double G4StepPoint::GetVelocity() const
0136 {
0137   return fVelocity;
0138 }
0139 
0140 inline void G4StepPoint::SetVelocity(G4double v)
0141 {
0142   fVelocity = v;
0143 }
0144 
0145 inline G4double G4StepPoint::GetBeta() const
0146 {
0147   return fVelocity / CLHEP::c_light;  // Velocity of the track
0148 }                                     //  in unit of c (light velocity)
0149 
0150 inline G4double G4StepPoint::GetGamma() const
0151 {
0152   return (fMass == 0.) ? DBL_MAX : (fKineticEnergy + fMass) / fMass;
0153     // Gamma factor (1/sqrt[1-beta*beta]) of the track
0154 }
0155 
0156 inline G4VPhysicalVolume* G4StepPoint::GetPhysicalVolume() const
0157 {
0158   return fpTouchable->GetVolume();
0159 }
0160 
0161 inline const G4VTouchable* G4StepPoint::GetTouchable() const
0162 {
0163   return fpTouchable();
0164 }
0165 
0166 inline const G4TouchableHandle& G4StepPoint::GetTouchableHandle() const
0167 {
0168   return fpTouchable;
0169 }
0170 
0171 inline void G4StepPoint::SetTouchableHandle(const G4TouchableHandle& apValue)
0172 {
0173   fpTouchable = apValue;
0174 }
0175 
0176 inline G4double G4StepPoint::GetSafety() const
0177 {
0178   return fSafety;
0179 }
0180 
0181 inline void G4StepPoint::SetSafety(const G4double aValue)
0182 {
0183   fSafety = aValue;
0184 }
0185 
0186 inline const G4ThreeVector& G4StepPoint::GetPolarization() const
0187 {
0188   return fPolarization;
0189 }
0190 
0191 inline void G4StepPoint::SetPolarization(const G4ThreeVector& aValue)
0192 {
0193   fPolarization = aValue;
0194 }
0195 
0196 inline void G4StepPoint::AddPolarization(const G4ThreeVector& aValue)
0197 {
0198   fPolarization += aValue;
0199 }
0200 
0201 inline G4StepStatus G4StepPoint::GetStepStatus() const
0202 {
0203   return fStepStatus;
0204 }
0205 
0206 inline void G4StepPoint::SetStepStatus(const G4StepStatus aValue)
0207 {
0208   fStepStatus = aValue;
0209 }
0210 
0211 inline const G4VProcess* G4StepPoint::GetProcessDefinedStep() const
0212 {
0213   // If the pointer is 0, this means the Step is defined
0214   // by the user defined limit in the current volume.
0215   return fpProcessDefinedStep;
0216 }
0217 
0218 inline void G4StepPoint::SetProcessDefinedStep(const G4VProcess* aValue)
0219 {
0220   fpProcessDefinedStep = aValue;
0221 }
0222 
0223 inline G4double G4StepPoint::GetMass() const
0224 {
0225   return fMass;
0226 }
0227 
0228 inline void G4StepPoint::SetMass(G4double value)
0229 {
0230   fMass = value;
0231 }
0232 
0233 inline G4double G4StepPoint::GetCharge() const
0234 {
0235   return fCharge;
0236 }
0237 
0238 inline void G4StepPoint::SetCharge(G4double value)
0239 {
0240   fCharge = value;
0241 }
0242 
0243 inline G4double G4StepPoint::GetMagneticMoment() const
0244 {
0245   return fMagneticMoment;
0246 }
0247 
0248 inline void G4StepPoint::SetMagneticMoment(G4double value)
0249 {
0250   fMagneticMoment = value;
0251 }
0252 
0253 inline G4Material* G4StepPoint::GetMaterial() const
0254 {
0255   return fpMaterial;
0256 }
0257 
0258 inline void G4StepPoint::SetMaterial(G4Material* material)
0259 {
0260   fpMaterial = material;
0261 }
0262 
0263 inline const G4MaterialCutsCouple* G4StepPoint::GetMaterialCutsCouple() const
0264 {
0265   return fpMaterialCutsCouple;
0266 }
0267 
0268 inline void G4StepPoint::SetMaterialCutsCouple(
0269   const G4MaterialCutsCouple* materialCutsCouple)
0270 {
0271   fpMaterialCutsCouple = materialCutsCouple;
0272 }
0273 
0274 inline G4VSensitiveDetector* G4StepPoint::GetSensitiveDetector() const
0275 {
0276   return fpSensitiveDetector;
0277 }
0278 
0279 inline void G4StepPoint::SetSensitiveDetector(G4VSensitiveDetector* aValue)
0280 {
0281   fpSensitiveDetector = aValue;
0282 }
0283 
0284 inline void G4StepPoint::SetWeight(G4double aValue)
0285 {
0286   fWeight = aValue;
0287 }
0288 
0289 inline G4double G4StepPoint::GetWeight() const
0290 {
0291   return fWeight;
0292 }