Import Geant4 10.7.0.beta source tree
This commit is contained in:
@@ -23,119 +23,82 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// PhysicsOrderedFreeVector Class Definition
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// File: G4PhysicsOrderedFreeVector.hh
|
||||
// Created: 1996-08-13
|
||||
// Author: Juliet Armstrong
|
||||
// Updated: 1997-03-25 by Peter Gumplinger
|
||||
// > cosmetics (only)
|
||||
// 2000-11-11 by H.Kurashige
|
||||
// > use STL vector for dataVector and binVector
|
||||
// mail: gum@triumf.ca
|
||||
// G4PhysicsOrderedFreeVector
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// A physics ordered free vector inherits from G4PhysicsVector which
|
||||
// has values of energy-loss, cross-section, and other physics values
|
||||
// of a particle in matter in a given range of the energy, momentum,
|
||||
// etc.). In addition, the ordered free vector provides a method for
|
||||
// the user to insert energy/value pairs in sequence. Methods to
|
||||
// Retrieve the Max and Min energies and values from the vector are
|
||||
// also provided.
|
||||
// A physics ordered free vector inherits from G4PhysicsVector which
|
||||
// has values of energy-loss, cross-section, and other physics values
|
||||
// of a particle in matter in a given range of energy, momentum, etc.).
|
||||
// In addition, the ordered free vector provides a method for
|
||||
// the user to insert energy/value pairs in sequence. Methods to
|
||||
// retrieve the Max and Min energies and values from the vector are
|
||||
// also provided.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef G4PhysicsOrderedFreeVector_h
|
||||
#define G4PhysicsOrderedFreeVector_h 1
|
||||
|
||||
/////////////
|
||||
// Includes
|
||||
/////////////
|
||||
// Author: Juliet Armstrong (TRIUMF), 13 August 1996
|
||||
// Revisions:
|
||||
// - 11.11.2000, H.Kurashige: use STL vector for dataVector and binVector
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4PhysicsOrderedFreeVector_hh
|
||||
#define G4PhysicsOrderedFreeVector_hh 1
|
||||
|
||||
#include "G4PhysicsVector.hh"
|
||||
|
||||
/////////////////////
|
||||
// Class Definition
|
||||
/////////////////////
|
||||
|
||||
class G4PhysicsOrderedFreeVector : public G4PhysicsVector
|
||||
class G4PhysicsOrderedFreeVector : public G4PhysicsVector
|
||||
{
|
||||
|
||||
public: // with description
|
||||
|
||||
////////////////////////////////
|
||||
// Constructors and Destructor
|
||||
////////////////////////////////
|
||||
|
||||
public:
|
||||
G4PhysicsOrderedFreeVector();
|
||||
// the vector will be filled from exteran file using Retrieve
|
||||
// or InsertValues methods
|
||||
// The vector will be filled from extern file using Retrieve()
|
||||
// or InsertValues() methods
|
||||
|
||||
G4PhysicsOrderedFreeVector(G4double* Energies,
|
||||
G4double* Values,
|
||||
size_t VectorLength);
|
||||
// the vector is filled in this constructor
|
||||
G4PhysicsOrderedFreeVector(G4double* Energies, G4double* Values,
|
||||
std::size_t VectorLength);
|
||||
// The vector is filled in this constructor.
|
||||
// 'Energies' and 'Values' need to have the same vector length
|
||||
// 'Energies' assumed to be ordered
|
||||
|
||||
virtual ~G4PhysicsOrderedFreeVector();
|
||||
|
||||
////////////
|
||||
// Methods
|
||||
////////////
|
||||
|
||||
void InsertValues(G4double energy, G4double value);
|
||||
|
||||
void InsertValues(G4double energy, G4double value);
|
||||
|
||||
G4double GetEnergy(G4double aValue);
|
||||
|
||||
inline G4double GetMaxValue();
|
||||
|
||||
|
||||
inline G4double GetMinValue();
|
||||
|
||||
|
||||
inline G4double GetMaxLowEdgeEnergy();
|
||||
|
||||
|
||||
inline G4double GetMinLowEdgeEnergy();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
size_t FindValueBinLocation(G4double aValue);
|
||||
|
||||
G4double LinearInterpolationOfEnergy(G4double aValue, size_t theLocBin);
|
||||
std::size_t FindValueBinLocation(G4double aValue);
|
||||
|
||||
G4double LinearInterpolationOfEnergy(G4double aValue, std::size_t locBin);
|
||||
};
|
||||
|
||||
inline
|
||||
G4double G4PhysicsOrderedFreeVector::GetMaxValue()
|
||||
// -----------------------------
|
||||
// Inline methods implementation
|
||||
// -----------------------------
|
||||
|
||||
inline G4double G4PhysicsOrderedFreeVector::GetMaxValue()
|
||||
{
|
||||
return dataVector.back();
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4PhysicsOrderedFreeVector::GetMinValue()
|
||||
inline G4double G4PhysicsOrderedFreeVector::GetMinValue()
|
||||
{
|
||||
return dataVector.front();
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4PhysicsOrderedFreeVector::GetMaxLowEdgeEnergy()
|
||||
inline G4double G4PhysicsOrderedFreeVector::GetMaxLowEdgeEnergy()
|
||||
{
|
||||
return binVector.back();
|
||||
}
|
||||
|
||||
inline
|
||||
G4double G4PhysicsOrderedFreeVector::GetMinLowEdgeEnergy()
|
||||
inline G4double G4PhysicsOrderedFreeVector::GetMinLowEdgeEnergy()
|
||||
{
|
||||
return binVector.front();
|
||||
}
|
||||
|
||||
#endif /* G4PhysicsOrderedFreeVector_h */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user