ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
MuonCalib::RtResolutionChebyshev Class Reference

#include <RtResolutionChebyshev.h>

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

Public Types

typedef std::vector< double > ParVec
 

Public Member Functions

 RtResolutionChebyshev (const ParVec &vec)
 initialization constructor, More...
 
std::string name (void) const
 get the class name More...
 
double resolution (double t, double bgRate=0.0) const
 returns resolution for a give time and background rate More...
 
double tLower (void) const
 < get the lower drift-time bound More...
 
double tUpper (void) const
 get the number of parameters used to describe the resolution More...
 
unsigned int numberOfResParameters (void) const
 get the coefficients of the r(t) polynomial More...
 
std::vector< double > resParameters (void) const
 get the reduced time which is the argument of the Chebyshev polynomial More...
 
double get_reduced_time (const double &t) const
 
virtual std::string typeName () const
 
unsigned int nPar () const
 
const ParVecparameters () const
 
double par (unsigned int index) const
 

Private Member Functions

void _init (void)
 initialization method More...
 

Private Attributes

const Tschebyscheff_polynomialm_Chebyshev
 pointer to the Chebyshev polynomials More...
 
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.

Author
Olive.nosp@m.r.Ko.nosp@m.rtner.nosp@m.@cer.nosp@m.n.ch
Date
05.06.2006

Definition at line 50 of file RtResolutionChebyshev.h.

Member Typedef Documentation

◆ ParVec

typedef std::vector<double> MuonCalib::CalibFunc::ParVec
inherited

Definition at line 36 of file CalibFunc.h.

Constructor & Destructor Documentation

◆ RtResolutionChebyshev()

MuonCalib::RtResolutionChebyshev::RtResolutionChebyshev ( const ParVec vec)
inlineexplicit

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 70 of file RtResolutionChebyshev.h.

70 : IRtResolution(vec) { _init(); }

Member Function Documentation

◆ _init()

void RtResolutionChebyshev::_init ( void  )
private

initialization method

Definition at line 16 of file RtResolutionChebyshev.cxx.

16  {
17  // check for consistency //
18  if (nPar() < 3) {
19  throw std::runtime_error(Form("File: %s, Line: %d\nRtResolutionChebyshev::_init() - Not enough parameters!", __FILE__, __LINE__));
20  }
21  if (parameters()[0] >= parameters()[1]) {
22  throw std::runtime_error(
23  Form("File: %s, Line: %d\nRtResolutionChebyshev::_init() - Lower time boundary >= upper time boundary!", __FILE__, __LINE__));
24  }
25 
26  // pointer to the chebyshev service //
28 
29  return;
30 }

◆ get_reduced_time()

double RtResolutionChebyshev::get_reduced_time ( const double &  t) const
inline

Definition at line 111 of file RtResolutionChebyshev.cxx.

111  {
112  return 2 * (t - 0.5 * (parameters()[1] + parameters()[0])) / (parameters()[1] - parameters()[0]);
113 }

◆ name()

std::string RtResolutionChebyshev::name ( void  ) const
virtual

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 37 of file RtResolutionChebyshev.cxx.

37 { return std::string("RtResolutionChebyshev"); }

◆ nPar()

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

Definition at line 39 of file CalibFunc.h.

39 { return m_parameters.size(); }

◆ numberOfResParameters()

unsigned int RtResolutionChebyshev::numberOfResParameters ( void  ) const

get the coefficients of the r(t) polynomial

Definition at line 92 of file RtResolutionChebyshev.cxx.

92 { return nPar() - 2; }

◆ par()

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

Definition at line 41 of file CalibFunc.h.

41  {
42  if (index < nPar())
43  return m_parameters[index];
44  else
45  return 0.;
46  }

◆ 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
virtual

returns resolution for a give time and background rate

Implements MuonCalib::IRtResolution.

Definition at line 44 of file RtResolutionChebyshev.cxx.

44  {
46  // INITIAL TIME CHECK //
48 
49  if (t != tLower() && t != tUpper()) {
50  // get resolution for tmin and tmax to get reasonable boundary conditrions
51  double res_min(resolution(tLower())), res_max(resolution(tUpper()));
52 
53  // if x is out of bounds, return 99999 //
54  if (t < parameters()[0]) return res_min;
55 
56  if (t > parameters()[1]) return res_max;
57  }
59  // VARIABLES //
61  // argument of the Chebyshev polynomials
62  double x(2 * (t - 0.5 * (parameters()[1] + parameters()[0])) / (parameters()[1] - parameters()[0]));
63  double resol(0.0); // auxiliary resolution
64 
66  // CALCULATE r(t) //
68  for (unsigned int k = 0; k < nPar() - 2; k++) { resol = resol + parameters()[k + 2] * m_Chebyshev->value(k, x); }
69 
70  return resol;
71 }

◆ resParameters()

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

get the reduced time which is the argument of the Chebyshev polynomial

Definition at line 99 of file RtResolutionChebyshev.cxx.

99  {
100  std::vector<double> alpha(nPar() - 2);
101  for (unsigned int k = 0; k < alpha.size(); k++) { alpha[k] = parameters()[k + 2]; }
102 
103  return alpha;
104 }

◆ tLower()

double RtResolutionChebyshev::tLower ( void  ) const

< get the lower drift-time bound

get the upper drift-time bound

Definition at line 78 of file RtResolutionChebyshev.cxx.

78 { return parameters()[0]; }

◆ tUpper()

double RtResolutionChebyshev::tUpper ( void  ) const

get the number of parameters used to describe the resolution

Definition at line 85 of file RtResolutionChebyshev.cxx.

85 { return parameters()[1]; }

◆ typeName()

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

Implements MuonCalib::CalibFunc.

Definition at line 18 of file IRtResolution.h.

18 { return "IRtResolution"; }

Member Data Documentation

◆ m_Chebyshev

const Tschebyscheff_polynomial* MuonCalib::RtResolutionChebyshev::m_Chebyshev
private

pointer to the Chebyshev polynomials

Definition at line 53 of file RtResolutionChebyshev.h.

◆ m_parameters

ParVec MuonCalib::CalibFunc::m_parameters
privateinherited

Definition at line 51 of file CalibFunc.h.


The documentation for this class was generated from the following files:
MuonCalib::RtResolutionChebyshev::m_Chebyshev
const Tschebyscheff_polynomial * m_Chebyshev
pointer to the Chebyshev polynomials
Definition: RtResolutionChebyshev.h:53
MuonCalib::Tschebyscheff_polynomial::value
double value(const unsigned int &order, const double &x) const
get the value of the Tschebyscheff polynomial of order order at x (-1 <= x <= 1)
MuonCalib::IRtResolution::IRtResolution
IRtResolution(const CalibFunc::ParVec &vec)
Definition: IRtResolution.h:16
index
Definition: index.py:1
MuonCalib::RtResolutionChebyshev::resolution
double resolution(double t, double bgRate=0.0) const
returns resolution for a give time and background rate
Definition: RtResolutionChebyshev.cxx:44
MuonCalib::Tschebyscheff_polynomial::get_Tschebyscheff_polynomial
static const Tschebyscheff_polynomial * get_Tschebyscheff_polynomial(void)
get a pointer to the Tschebyscheff polynomial
Definition: Tschebyscheff_polynomial.cxx:28
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MuonCalib::RtResolutionChebyshev::tLower
double tLower(void) const
< get the lower drift-time bound
Definition: RtResolutionChebyshev.cxx:78
x
#define x
MuonCalib::RtResolutionChebyshev::tUpper
double tUpper(void) const
get the number of parameters used to describe the resolution
Definition: RtResolutionChebyshev.cxx:85
DeMoScan.index
string index
Definition: DeMoScan.py:362
MuonCalib::CalibFunc::parameters
const ParVec & parameters() const
Definition: CalibFunc.h:40
MuonCalib::RtResolutionChebyshev::_init
void _init(void)
initialization method
Definition: RtResolutionChebyshev.cxx:16
MuonCalib::CalibFunc::m_parameters
ParVec m_parameters
Definition: CalibFunc.h:51
MuonCalib::CalibFunc::nPar
unsigned int nPar() const
Definition: CalibFunc.h:39
fitman.k
k
Definition: fitman.py:528