1 #ifndef G4DarkBREM_ELEMENTXSECINTERPOLATION_H
2 #define G4DarkBREM_ELEMENTXSECINTERPOLATION_H
51 G4double
get(G4double energy, G4double A, G4double Z);
58 void stream(std::ostream& o)
const;
90 SampleSet(
const std::vector<double>& init_x,
91 const std::vector<double>& init_y);
97 const double&
min()
const;
103 const double&
max()
const;
115 void prepend(
double x,
double y);
127 void append(
double x,
double y);
159 void dump(std::ostream& o,
int z,
double kinematic_min)
const;
163 std::vector<double>
x_;
165 std::vector<double>
y_;
Class providing a prototype model for dark brem.
A sample set is two parallel vectors limited to operate for our interpolation goal.
Definition: ElementXsecInterpolation.h:78
SampleSet(const std::vector< double > &init_x, const std::vector< double > &init_y)
Initialize the sample set with the two input vectors.
Definition: ElementXsecInterpolation.cxx:94
void append(double x, double y)
append the sample set with the input point
Definition: ElementXsecInterpolation.cxx:114
const double & min() const
Get the minimum x currently in sample set.
Definition: ElementXsecInterpolation.cxx:100
void prepend(double x, double y)
prepend the sample set with the input point
Definition: ElementXsecInterpolation.cxx:108
std::vector< double > x_
x points
Definition: ElementXsecInterpolation.h:163
std::vector< double > y_
y points
Definition: ElementXsecInterpolation.h:165
double interpolate(double x) const
Calculate an interpolation for the point x.
Definition: ElementXsecInterpolation.cxx:120
const double & max() const
Get the maximum x currently in sample set.
Definition: ElementXsecInterpolation.cxx:104
void dump(std::ostream &o, int z, double kinematic_min) const
Dump our sample points to the input stream.
Definition: ElementXsecInterpolation.cxx:143
Interpolation of cross sections by element.
Definition: ElementXsecInterpolation.h:19
void stream(std::ostream &o) const
Stream the table of sample points into the output stream.
Definition: ElementXsecInterpolation.cxx:83
std::map< int, SampleSet > the_samples_
each element has its own set of sample points
Definition: ElementXsecInterpolation.h:170
G4double get(G4double energy, G4double A, G4double Z)
Get the value of the cross section for the input variables.
Definition: ElementXsecInterpolation.cxx:7
friend std::ostream & operator<<(std::ostream &o, const ElementXsecInterpolation c)
Overload the streaming operator for ease.
Definition: ElementXsecInterpolation.h:67
std::shared_ptr< PrototypeModel > model_
shared pointer to the model for calculating cross sections
Definition: ElementXsecInterpolation.h:173
ElementXsecInterpolation()=default
Default constructor.
ElementXsecInterpolation(std::shared_ptr< PrototypeModel > model)
Constructor with a model to calculate the cross section.
Definition: ElementXsecInterpolation.h:33
G4DarkBreM internal namespace.
Definition: ElementXsecCache.cxx:3