- Timestamp:
- Jun 18, 2010, 11:42:07 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/global/management/include/G4PhysicsVector.hh
r1228 r1315 25 25 // 26 26 // 27 // $Id: G4PhysicsVector.hh,v 1. 25 2009/11/04 11:32:43 vnivanchExp $28 // GEANT4 tag $Name: geant4-09-0 3$27 // $Id: G4PhysicsVector.hh,v 1.31 2010/05/28 05:13:43 kurasige Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ 29 29 // 30 30 // … … 53 53 // 11 May 2009, V.Ivanchenko : Added ComputeSecondDerivatives 54 54 // 19 Jun. 2009, V.Ivanchenko : Removed hidden bin 55 // 55 // 22 Dec. 2009 H.Kurashige : Use pointers to G4PVDataVector 56 // 04 May. 2010 H.Kurashige : Use G4PhysicsVectorCache 57 // 28 May 2010 H.Kurashige : Stop using pointers to G4PVDataVector 56 58 //--------------------------------------------------------------- 57 59 … … 65 67 #include <fstream> 66 68 69 #include "G4PhysicsVectorCache.hh" 67 70 #include "G4PhysicsVectorType.hh" 71 72 typedef std::vector<G4double> G4PVDataVector; 68 73 69 74 class G4PhysicsVector … … 86 91 // destructor 87 92 88 inlineG4double Value(G4double theEnergy);93 G4double Value(G4double theEnergy); 89 94 // Get the cross-section/energy-loss value corresponding to the 90 95 // given energy. An appropriate interpolation is used to calculate … … 175 180 friend std::ostream& operator<<(std::ostream&, const G4PhysicsVector&); 176 181 182 183 G4double GetLastEnergy() const; 184 G4double GetLastValue() const; 185 size_t GetLastBin() const; 186 // Get cache values 187 177 188 protected: 178 189 … … 186 197 protected: 187 198 188 typedef std::vector<G4double> G4PVDataVector;189 190 199 G4PhysicsVectorType type; // The type of PhysicsVector (enumerator) 191 200 … … 195 204 size_t numberOfNodes; 196 205 197 G4double lastEnergy; // Cache the last input value 198 G4double lastValue; // Cache the last output value 199 size_t lastBin; // Cache the last bin location 200 201 G4PVDataVector dataVector; // Vector to keep the crossection/energyloss 202 G4PVDataVector binVector; // Vector to keep energy 203 G4PVDataVector secDerivative; // Vector to keep second derivatives 206 G4PhysicsVectorCache* cache; 207 208 G4PVDataVector dataVector; // Vector to keep the crossection/energyloss 209 G4PVDataVector binVector; // Vector to keep energy 210 G4PVDataVector secDerivative; // Vector to keep second derivatives 204 211 205 212 private: … … 207 214 G4bool SplinePossible(); 208 215 209 inline G4double LinearInterpolation( );216 inline G4double LinearInterpolation(G4int lastBin); 210 217 // Linear interpolation function 211 inline G4double SplineInterpolation( );218 inline G4double SplineInterpolation(G4int lastBin); 212 219 // Spline interpolation function 213 220 214 inline void Interpolation( );221 inline void Interpolation(G4int lastBin); 215 222 216 223 G4String comment;
Note: See TracChangeset
for help on using the changeset viewer.