12#include "GeoModelKernel/throwExcept.h"
14#include "GaudiKernel/IMessageSvc.h"
15#include "GaudiKernel/MsgStream.h"
24 THROW_EXCEPTION(
"Not enough parameters!" << std::endl<<
"Minimum number of parameters is 6!");
27 if ((
nPar() % 2) != 0) {
31 std::vector<double>
x(
nPar() /2);
32 std::vector<double>
y(
nPar() /2);
33 for (
unsigned int i = 0; i <
nPar() / 2; i++) {
35 y[i] =
par(2 * i + 1);
37 m_sp3 = std::make_unique<TSpline3>(
"Rt Relation",
x.data(),
y.data(),
nPar() / 2,
"b2e2", 0, 0);
40 return m_sp3->GetDelta();
43 return m_sp3->GetNp();
48 if (t < m_sp3->GetXmin())
return m_sp3->Eval(
m_sp3->GetXmin());
50 return r >= 0 ?
r : 0;
55 constexpr double h = 1.e-7;
std::vector< size_t > vec
Header file for AthHistogramAlgorithm.
double par(unsigned int index) const
unsigned int nPar() const
std::vector< double > ParVec
generic interface for a rt-relation
virtual unsigned nDoF() const override final
Returns the number of degrees of freedom of the relation function.
std::unique_ptr< TSpline3 > m_sp3
virtual double tLower() const override final
get the lower drift-time bound
virtual double driftAcceleration(double t) const override final
Returns the acceleration of the r-t relation.
virtual double tUpper() const override final
get the upper drift-time bound
virtual double driftVelocity(double t) const override final
get the drift velocity
RtSpline(const ParVec &vec)
initialization constructor,
virtual double tBinWidth() const override final
Returns the step-size for the sampling.
virtual double radius(double t) const override final
get the radius corresponding to the drift time t; 0 or 14.6 is returned if t is outside the range
singleton-like access to IMessageSvc via open function and helper
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
#define THROW_EXCEPTION(MESSAGE)