ATLAS Offline Software
Loading...
Searching...
No Matches
MuonCalib::RtResolutionChebyshev Class Reference

This class contains the implementation of a spatial resolution \( \sigma \) parametrized by a linear combination of Chebyshev polyonomials. More...

#include <RtResolutionChebyshev.h>

Inheritance diagram for MuonCalib::RtResolutionChebyshev:
Collaboration diagram for MuonCalib::RtResolutionChebyshev:

Public Types

using ParVec = std::vector<double>

Public Member Functions

 RtResolutionChebyshev (const ParVec &vec)
 initialization constructor,
virtual std::string name () const override final
 Initialization from a.
virtual double resolution (double t, double bgRate=0.0) const override final
 returns resolution for a give time and background rate
virtual double tLower () const
 < get the lower drift-time bound
virtual double tUpper () const
 get the number of parameters used to describe the resolution
virtual unsigned int nDoF () const override final
 get the coefficients of the r(t) polynomial
std::vector< double > resParameters () const
virtual std::string typeName () const override final
 CalibFunc (const ParVec &vec)
unsigned int nPar () const
const ParVecparameters () const
double par (unsigned int index) const

Private Attributes

ParVec m_parameters {}

Detailed Description

This class contains the implementation of a spatial resolution \( \sigma \) parametrized by a linear combination of Chebyshev polyonomials.

Convention:

\[ \sigma(t) = \sum_{k=0}^{K} p_k*T_k(2*(t-0.5*(tupper+tlower))/(tupper-tlower) \]

where \( T_k \) is the Chebyshev polynomial of k-th order, tupper and tlower are upper and lower drift-time bounds.

Units: [t] = ns, [r] = mm, [v] = mm/ns.

Definition at line 35 of file RtResolutionChebyshev.h.

Member Typedef Documentation

◆ ParVec

using MuonCalib::CalibFunc::ParVec = std::vector<double>
inherited

Definition at line 35 of file CalibFunc.h.

Constructor & Destructor Documentation

◆ RtResolutionChebyshev()

RtResolutionChebyshev::RtResolutionChebyshev ( const ParVec & vec)

initialization constructor,

size of ParVec - 2 = order of the r(t) polynomial,

ParVec[0] = t_low (smallest allowed drift time), ParVec[1] = t_up (largest allowed drift time). ParVec[2...] = parameters of the Chebyshev polynomial

Definition at line 12 of file RtResolutionChebyshev.cxx.

12 :
13 IRtResolution(vec) {
14 // check for consistency //
15 if (nPar() < 3) {
16 THROW_EXCEPTION("Not enough parameters!");
17 }
18 if (tLower() >= tUpper()) {
19 THROW_EXCEPTION("Lower time boundary >= upper time boundary!");
20 }
21}
std::vector< size_t > vec
unsigned int nPar() const
Definition CalibFunc.h:39
virtual double tLower() const
< get the lower drift-time bound
virtual double tUpper() const
get the number of parameters used to describe the resolution
#define THROW_EXCEPTION(MESSAGE)
Definition throwExcept.h:10

Member Function Documentation

◆ CalibFunc()

MuonCalib::CalibFunc::CalibFunc ( const ParVec & vec)
inlineexplicitinherited

Definition at line 36 of file CalibFunc.h.

36 :

◆ name()

std::string RtResolutionChebyshev::name ( ) const
finaloverridevirtual

Initialization from a.

get the class name get the resolution corresponding to the drift time t; if t is not within [t_low, t_up] an unphysical radius of 99999 is returned; the background rate is ignored in present implementation

Implements MuonCalib::CalibFunc.

Definition at line 22 of file RtResolutionChebyshev.cxx.

22{ return "RtResolutionChebyshev"; }

◆ nDoF()

unsigned int RtResolutionChebyshev::nDoF ( ) const
finaloverridevirtual

get the coefficients of the r(t) polynomial

Implements MuonCalib::IRtResolution.

Definition at line 47 of file RtResolutionChebyshev.cxx.

47{ return nPar() -2; }

◆ nPar()

unsigned int MuonCalib::CalibFunc::nPar ( ) const
inlineinherited

Definition at line 39 of file CalibFunc.h.

39{ return m_parameters.size(); }

◆ par()

double MuonCalib::CalibFunc::par ( unsigned int index) const
inlineinherited

Definition at line 41 of file CalibFunc.h.

41 {
42 return index < nPar() ? m_parameters[index] : 0.;
43 }
str index
Definition DeMoScan.py:362

◆ parameters()

const ParVec & MuonCalib::CalibFunc::parameters ( ) const
inlineinherited

Definition at line 40 of file CalibFunc.h.

40{ return m_parameters; }

◆ resolution()

double RtResolutionChebyshev::resolution ( double t,
double bgRate = 0.0 ) const
finaloverridevirtual

returns resolution for a give time and background rate

Implements MuonCalib::IRtResolution.

Definition at line 23 of file RtResolutionChebyshev.cxx.

23 {
25 // INITIAL TIME CHECK //
27 t = std::clamp(t, tLower(), tUpper());
28
30 // VARIABLES //
32 // argument of the Chebyshev polynomials
33 const double x = mapToUnitInterval(t, tLower(), tUpper());
34 double resol{0.0}; // auxiliary resolution
35
37 // CALCULATE r(t) //
39 for (unsigned int k = 0; k < nDoF(); k++) {
40 resol = resol + parameters()[k + 2] * Acts::detail::chebychevPolyTn(x, k);
41 }
42
43 return resol;
44}
#define x
const ParVec & parameters() const
Definition CalibFunc.h:40
virtual unsigned int nDoF() const override final
get the coefficients of the r(t) polynomial
double mapToUnitInterval(const double x, const double lowerEdge, const double upperEdge)
Maps the number x which is in [lowEdge;upperEdge] to the interval [-1;1].
Definition UtilFunc.h:12

◆ resParameters()

std::vector< double > RtResolutionChebyshev::resParameters ( ) const

◆ tLower()

double RtResolutionChebyshev::tLower ( ) const
virtual

< get the lower drift-time bound

get the upper drift-time bound

Definition at line 45 of file RtResolutionChebyshev.cxx.

45{ return par(0); }
double par(unsigned int index) const
Definition CalibFunc.h:41

◆ tUpper()

double RtResolutionChebyshev::tUpper ( ) const
virtual

get the number of parameters used to describe the resolution

Definition at line 46 of file RtResolutionChebyshev.cxx.

46{ return par(1); }

◆ typeName()

virtual std::string MuonCalib::IRtResolution::typeName ( ) const
inlinefinaloverridevirtualinherited

Implements MuonCalib::CalibFunc.

Definition at line 24 of file IRtResolution.h.

24{ return "IRtResolution"; }

Member Data Documentation

◆ m_parameters

ParVec MuonCalib::CalibFunc::m_parameters {}
privateinherited

Definition at line 48 of file CalibFunc.h.

48{};

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