Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4PhysicsLogVector Class Reference

#include <G4PhysicsLogVector.hh>

+ Inheritance diagram for G4PhysicsLogVector:

Public Member Functions

 G4PhysicsLogVector (G4bool spline=false)
 
 G4PhysicsLogVector (G4double Emin, G4double Emax, std::size_t Nbin, G4bool spline=false)
 
 ~G4PhysicsLogVector () override=default
 
- Public Member Functions inherited from G4PhysicsVector
 G4PhysicsVector (G4bool spline=false)
 
 G4PhysicsVector (const G4PhysicsVector &)=default
 
G4PhysicsVectoroperator= (const G4PhysicsVector &)=default
 
 G4PhysicsVector (const G4PhysicsVector &&)=delete
 
G4PhysicsVectoroperator= (const G4PhysicsVector &&)=delete
 
G4bool operator== (const G4PhysicsVector &right) const =delete
 
G4bool operator!= (const G4PhysicsVector &right) const =delete
 
virtual ~G4PhysicsVector ()=default
 
G4double Value (const G4double energy, std::size_t &lastidx) const
 
G4double Value (const G4double energy) const
 
G4double GetValue (const G4double energy, G4bool &isOutRange) const
 
G4double LogVectorValue (const G4double energy, const G4double theLogEnergy) const
 
G4double operator[] (const std::size_t index) const
 
G4double operator() (const std::size_t index) const
 
void PutValue (const std::size_t index, const G4double value)
 
G4double Energy (const std::size_t index) const
 
G4double GetLowEdgeEnergy (const std::size_t index) const
 
G4double GetMinEnergy () const
 
G4double GetMaxEnergy () const
 
G4double GetMinValue () const
 
G4double GetMaxValue () const
 
std::size_t GetVectorLength () const
 
std::size_t ComputeLogVectorBin (const G4double logenergy) const
 
G4PhysicsVectorType GetType () const
 
G4bool GetSpline () const
 
void SetVerboseLevel (G4int value)
 
G4double FindLinearEnergy (const G4double rand) const
 
std::size_t FindBin (const G4double energy, std::size_t idx) const
 
void ScaleVector (const G4double factorE, const G4double factorV)
 
void FillSecondDerivatives (const G4SplineType=G4SplineType::Base, const G4double dir1=0.0, const G4double dir2=0.0)
 
G4double GetEnergy (const G4double value) const
 
G4bool Store (std::ofstream &fOut, G4bool ascii=false) const
 
G4bool Retrieve (std::ifstream &fIn, G4bool ascii=false)
 
void DumpValues (G4double unitE=1.0, G4double unitV=1.0) const
 

Protected Member Functions

void Initialise () final
 
- Protected Member Functions inherited from G4PhysicsVector
virtual void Initialise ()
 
void PrintPutValueError (std::size_t index, G4double value, const G4String &text)
 

Additional Inherited Members

- Protected Attributes inherited from G4PhysicsVector
G4double edgeMin = 0.0
 
G4double edgeMax = 0.0
 
G4double invdBin = 0.0
 
G4double logemin = 0.0
 
G4int verboseLevel = 0
 
std::size_t idxmax = 0
 
std::size_t numberOfNodes = 0
 
G4PhysicsVectorType type = T_G4PhysicsFreeVector
 
std::vector< G4doublebinVector
 
std::vector< G4doubledataVector
 
std::vector< G4doublesecDerivative
 

Detailed Description

Definition at line 47 of file G4PhysicsLogVector.hh.

Constructor & Destructor Documentation

◆ G4PhysicsLogVector() [1/2]

G4PhysicsLogVector::G4PhysicsLogVector ( G4bool  spline = false)
explicit

Definition at line 40 of file G4PhysicsLogVector.cc.

41 : G4PhysicsVector(spline)
42{
44}
@ T_G4PhysicsLogVector
G4PhysicsVectorType type

◆ G4PhysicsLogVector() [2/2]

G4PhysicsLogVector::G4PhysicsLogVector ( G4double  Emin,
G4double  Emax,
std::size_t  Nbin,
G4bool  spline = false 
)
explicit

Definition at line 47 of file G4PhysicsLogVector.cc.

49 : G4PhysicsVector(spline)
50{
51 numberOfNodes = Nbin + 1;
52 if(Nbin < 2 || Emin >= Emax || Emin <= 0.0)
53 {
55 ed << "G4PhysicsLogVector with wrong parameters: theNbin= " << Nbin
56 << " Emin= " << Emin << " Emax= " << Emax;
57 G4Exception("G4PhysicsLogVector::G4PhysicsLogVector()", "glob03",
58 FatalException, ed, "Nbins should be > 1 and Emax > Emin > 0");
59 }
60 if(numberOfNodes < 3)
61 {
62 numberOfNodes = 3;
63 }
65
67 dataVector.resize(numberOfNodes, 0.0);
68 binVector[0] = Emin;
69 binVector[numberOfNodes - 1] = Emax;
70 Initialise();
71
72 for(std::size_t i = 1; i <= idxmax; ++i)
73 {
75 }
76}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:180
std::size_t idxmax
std::size_t numberOfNodes
std::vector< G4double > dataVector
std::vector< G4double > binVector

◆ ~G4PhysicsLogVector()

G4PhysicsLogVector::~G4PhysicsLogVector ( )
overridedefault

Member Function Documentation

◆ Initialise()

void G4PhysicsLogVector::Initialise ( )
finalprotectedvirtual

Reimplemented from G4PhysicsVector.

Definition at line 79 of file G4PhysicsLogVector.cc.

80{
82 edgeMin = binVector[0];
86}
G4double G4Log(G4double x)
Definition: G4Log.hh:227

Referenced by G4PhysicsLogVector().


The documentation for this class was generated from the following files: