BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
BDSPhysicsVectorLinear Class Reference

A vector of some values vs Ek that are linearly interpolated. More...

#include <BDSPhysicsVectorLinear.hh>

Collaboration diagram for BDSPhysicsVectorLinear:
Collaboration graph

Public Member Functions

 BDSPhysicsVectorLinear (const std::vector< G4double > &kineticEnergyIn, const std::vector< G4double > &values)
 This constructor may throw an exception if the vectors mismatch in size or are length 1.
 
G4double Value (G4double eK) const
 Get the linearly interpolated value for a given kinetic energy.
 

Private Attributes

std::vector< G4double > kineticEnergy
 
std::vector< G4double > values
 
G4double eKMin
 
G4double eKMax
 
G4double eKMinValue
 
G4double eKMaxValue
 

Detailed Description

A vector of some values vs Ek that are linearly interpolated.

The class G4PhysicsVectorLinear provides similar functionality but is more complex and suited to reading in from a text file which is too complex for what we want here. This is just a very simple 2 column lookup with linear interpolation.

Author
Laurie Nevay

Definition at line 37 of file BDSPhysicsVectorLinear.hh.

Constructor & Destructor Documentation

◆ BDSPhysicsVectorLinear()

BDSPhysicsVectorLinear::BDSPhysicsVectorLinear ( const std::vector< G4double > &  kineticEnergyIn,
const std::vector< G4double > &  values 
)

This constructor may throw an exception if the vectors mismatch in size or are length 1.

Definition at line 30 of file BDSPhysicsVectorLinear.cc.

Member Function Documentation

◆ Value()

G4double BDSPhysicsVectorLinear::Value ( G4double  eK) const

Get the linearly interpolated value for a given kinetic energy.

Definition at line 45 of file BDSPhysicsVectorLinear.cc.

Referenced by BDSWrapperMuonSplitting::PostStepDoIt().

Here is the caller graph for this function:

Field Documentation

◆ eKMax

G4double BDSPhysicsVectorLinear::eKMax
private

Definition at line 53 of file BDSPhysicsVectorLinear.hh.

◆ eKMaxValue

G4double BDSPhysicsVectorLinear::eKMaxValue
private

Definition at line 55 of file BDSPhysicsVectorLinear.hh.

◆ eKMin

G4double BDSPhysicsVectorLinear::eKMin
private

Definition at line 52 of file BDSPhysicsVectorLinear.hh.

◆ eKMinValue

G4double BDSPhysicsVectorLinear::eKMinValue
private

Definition at line 54 of file BDSPhysicsVectorLinear.hh.

◆ kineticEnergy

std::vector<G4double> BDSPhysicsVectorLinear::kineticEnergy
private

Definition at line 50 of file BDSPhysicsVectorLinear.hh.

◆ values

std::vector<G4double> BDSPhysicsVectorLinear::values
private

Definition at line 51 of file BDSPhysicsVectorLinear.hh.


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