00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // $Id$ 00028 // 00029 // 00030 inline 00031 const G4ThreeVector& G4StepPoint::GetPosition() const 00032 { return fPosition; } 00033 00034 inline 00035 void G4StepPoint::SetPosition(const G4ThreeVector& aValue) 00036 { fPosition = aValue; } 00037 00038 inline 00039 void G4StepPoint::AddPosition(const G4ThreeVector& aValue) 00040 { fPosition += aValue; } // Position where the track locates 00041 00042 inline 00043 G4double G4StepPoint::GetLocalTime() const 00044 { return fLocalTime; } 00045 00046 inline 00047 void G4StepPoint::SetLocalTime(const G4double aValue) 00048 { fLocalTime = aValue; } 00049 00050 inline 00051 void G4StepPoint::AddLocalTime(const G4double aValue) 00052 { fLocalTime += aValue; } // Time since the track is created. 00053 00054 inline 00055 G4double G4StepPoint::GetGlobalTime() const 00056 { return fGlobalTime; } 00057 00058 inline 00059 void G4StepPoint::SetGlobalTime(const G4double aValue) 00060 { fGlobalTime = aValue; } 00061 00062 inline 00063 void G4StepPoint::AddGlobalTime(const G4double aValue) 00064 { fGlobalTime += aValue; } 00065 // Time since the event in which the track belongs is created. 00066 00067 inline 00068 G4double G4StepPoint::GetProperTime() const 00069 { return fProperTime; } 00070 00071 inline 00072 void G4StepPoint::SetProperTime(const G4double aValue) 00073 { fProperTime = aValue; } 00074 00075 inline 00076 void G4StepPoint::AddProperTime(const G4double aValue) 00077 { fProperTime += aValue; } // Proper time of the particle. 00078 00079 inline 00080 const G4ThreeVector& G4StepPoint::GetMomentumDirection() const 00081 { return fMomentumDirection; } 00082 00083 inline 00084 void G4StepPoint::SetMomentumDirection(const G4ThreeVector& aValue) 00085 { fMomentumDirection = aValue; } 00086 00087 inline 00088 void G4StepPoint::AddMomentumDirection(const G4ThreeVector& aValue) 00089 { fMomentumDirection += aValue;} // Direction of momentum (should be an unit vector) 00090 00091 inline 00092 G4ThreeVector G4StepPoint::GetMomentum() const 00093 { 00094 G4double tMomentum = std::sqrt(fKineticEnergy*fKineticEnergy + 00095 2*fKineticEnergy*fMass); 00096 return G4ThreeVector(fMomentumDirection.x()*tMomentum, 00097 fMomentumDirection.y()*tMomentum, 00098 fMomentumDirection.z()*tMomentum); 00099 } 00100 // Total momentum of the track 00101 00102 inline 00103 G4double G4StepPoint::GetTotalEnergy() const 00104 { return fKineticEnergy + fMass; } // Total energy of the track 00105 00106 inline 00107 G4double G4StepPoint::GetKineticEnergy() const 00108 { return fKineticEnergy; } 00109 00110 inline 00111 void G4StepPoint::SetKineticEnergy(const G4double aValue) 00112 { fKineticEnergy = aValue; } 00113 00114 inline 00115 void G4StepPoint::AddKineticEnergy(const G4double aValue) 00116 { fKineticEnergy += aValue; }// Kinetic Energy of the track 00117 00118 inline 00119 G4double G4StepPoint::GetVelocity() const 00120 { return fVelocity; } 00121 00122 inline 00123 void G4StepPoint::SetVelocity(G4double v) 00124 { fVelocity = v; } 00125 00126 inline 00127 G4double G4StepPoint::GetBeta() const 00128 { return fVelocity/CLHEP::c_light; } 00129 // Velocity of the track in unit of c(light velocity) 00130 00131 inline 00132 G4double G4StepPoint::GetGamma() const 00133 { return (fMass==0.) ? DBL_MAX : (fKineticEnergy+fMass)/fMass; } 00134 // Gamma factor (1/sqrt[1-beta*beta]) of the track 00135 00136 inline 00137 G4VPhysicalVolume* G4StepPoint::GetPhysicalVolume() const 00138 { return fpTouchable->GetVolume(); } 00139 00140 inline 00141 const G4VTouchable* G4StepPoint::GetTouchable() const 00142 { return fpTouchable(); } 00143 00144 inline 00145 const G4TouchableHandle& G4StepPoint::GetTouchableHandle() const 00146 { return fpTouchable; } 00147 00148 inline 00149 void G4StepPoint::SetTouchableHandle(const G4TouchableHandle& apValue) 00150 { fpTouchable = apValue; } 00151 00152 inline 00153 G4double G4StepPoint::GetSafety() const 00154 { return fSafety; } 00155 00156 inline 00157 void G4StepPoint::SetSafety(const G4double aValue) 00158 { fSafety = aValue; } 00159 00160 inline 00161 const G4ThreeVector& G4StepPoint::GetPolarization() const 00162 { return fPolarization; } 00163 00164 inline 00165 void G4StepPoint::SetPolarization(const G4ThreeVector& aValue) 00166 { fPolarization = aValue; } 00167 00168 inline 00169 void G4StepPoint::AddPolarization(const G4ThreeVector& aValue) 00170 { fPolarization += aValue; } 00171 00172 inline 00173 G4StepStatus G4StepPoint::GetStepStatus() const 00174 { return fStepStatus; } 00175 00176 inline 00177 void G4StepPoint::SetStepStatus(const G4StepStatus aValue) 00178 { fStepStatus = aValue; } 00179 00180 inline 00181 const G4VProcess* G4StepPoint::GetProcessDefinedStep() const 00182 { return fpProcessDefinedStep; } 00183 // If the pointer is 0, this means the Step is defined 00184 // by the user defined limit in the current volume. 00185 00186 inline 00187 void G4StepPoint::SetProcessDefinedStep(const G4VProcess* aValue) 00188 { fpProcessDefinedStep = aValue; } 00189 00190 inline 00191 G4double G4StepPoint::GetMass() const 00192 { return fMass; } 00193 00194 inline 00195 void G4StepPoint::SetMass(G4double value) 00196 { fMass = value; } 00197 00198 inline 00199 G4double G4StepPoint::GetCharge() const 00200 { return fCharge; } 00201 00202 inline 00203 void G4StepPoint::SetCharge(G4double value) 00204 { fCharge = value; } 00205 00206 inline 00207 G4double G4StepPoint::GetMagneticMoment() const 00208 { return fMagneticMoment; } 00209 00210 inline 00211 void G4StepPoint::SetMagneticMoment(G4double value) 00212 { fMagneticMoment = value; } 00213 00214 inline 00215 G4Material* G4StepPoint::GetMaterial() const 00216 { return fpMaterial; } 00217 00218 inline 00219 void G4StepPoint::SetMaterial(G4Material* material) 00220 {fpMaterial = material; } 00221 00222 inline 00223 const G4MaterialCutsCouple* G4StepPoint::GetMaterialCutsCouple() const 00224 { return fpMaterialCutsCouple; } 00225 00226 inline 00227 void G4StepPoint::SetMaterialCutsCouple(const G4MaterialCutsCouple* materialCutsCouple) 00228 { fpMaterialCutsCouple = materialCutsCouple; } 00229 00230 inline 00231 G4VSensitiveDetector* G4StepPoint::GetSensitiveDetector() const 00232 { return fpSensitiveDetector; } 00233 00234 inline 00235 void G4StepPoint::SetSensitiveDetector(G4VSensitiveDetector* aValue) 00236 { fpSensitiveDetector = aValue; } 00237 00238 inline 00239 void G4StepPoint::SetWeight(G4double aValue) 00240 { fWeight = aValue; } 00241 00242 inline 00243 G4double G4StepPoint::GetWeight() const 00244 { return fWeight; }