Ignore:
Timestamp:
Jun 18, 2010, 11:42:07 AM (14 years ago)
Author:
garnier
Message:

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/global/management/include/G4PhysicsVector.hh

    r1228 r1315  
    2525//
    2626//
    27 // $Id: G4PhysicsVector.hh,v 1.25 2009/11/04 11:32:43 vnivanch Exp $
    28 // GEANT4 tag $Name: geant4-09-03 $
     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 $
    2929//
    3030//
     
    5353//    11 May  2009, V.Ivanchenko : Added ComputeSecondDerivatives
    5454//    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
    5658//---------------------------------------------------------------
    5759
     
    6567#include <fstream>
    6668
     69#include "G4PhysicsVectorCache.hh"
    6770#include "G4PhysicsVectorType.hh"
     71
     72typedef std::vector<G4double> G4PVDataVector;
    6873
    6974class G4PhysicsVector
     
    8691         // destructor
    8792
    88     inline G4double Value(G4double theEnergy);
     93    G4double Value(G4double theEnergy);
    8994         // Get the cross-section/energy-loss value corresponding to the
    9095         // given energy. An appropriate interpolation is used to calculate
     
    175180    friend std::ostream& operator<<(std::ostream&, const G4PhysicsVector&);
    176181
     182   
     183    G4double GetLastEnergy() const;
     184    G4double GetLastValue() const;
     185    size_t GetLastBin() const;
     186         // Get cache values
     187
    177188  protected:
    178189
     
    186197  protected:
    187198
    188     typedef std::vector<G4double> G4PVDataVector;
    189 
    190199    G4PhysicsVectorType type;   // The type of PhysicsVector (enumerator)
    191200
     
    195204    size_t numberOfNodes;
    196205
    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
    204211
    205212  private:
     
    207214    G4bool SplinePossible();
    208215
    209     inline G4double LinearInterpolation();
     216    inline G4double LinearInterpolation(G4int lastBin);
    210217         // Linear interpolation function
    211     inline G4double SplineInterpolation();
     218    inline G4double SplineInterpolation(G4int lastBin);
    212219         // Spline interpolation function
    213220
    214     inline void Interpolation();
     221    inline void Interpolation(G4int lastBin);
    215222
    216223    G4String   comment;
Note: See TracChangeset for help on using the changeset viewer.