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

#include <RtChebyshev.h>

Inheritance diagram for MuonCalib::RtChebyshev:
Collaboration diagram for MuonCalib::RtChebyshev:

Public Types

typedef std::vector< double > ParVec
 

Public Member Functions

 RtChebyshev (const ParVec &vec)
 initialization constructor, More...
 
std::string name (void) const
 get the class name More...
 
double radius (double t) const
 get the radius corresponding to the drift time t; if t is not within [t_low, t_up] an unphysical radius of 99999 is returned More...
 
double driftvelocity (double t) const
 
double tLower (void) const
 < get the lower drift-time bound More...
 
double tUpper (void) const
 get the number of parameters used to describe the r(t) relationship More...
 
unsigned int numberOfRtParameters (void) const
 get the coefficients of the r(t) polynomial More...
 
std::vector< double > rtParameters (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
 
float GetTmaxDiff () const
 return the difference in total dirft time between the two multilayers (ML1 - ML2) More...
 
bool HasTmaxDiff () const
 
void SetTmaxDiff (const float &d)
 set the difference in total drift time betwene the two multilayers (ML1 - ML2) More...
 
unsigned int nPar () const
 
const ParVecparameters () const
 
double par (unsigned int index) const
 

Public Attributes

float m_tmax_diff
 

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 an r(t) relationship parametrized by a linear combination of Chebyshev polyonomials.

Convention:

\[ r(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
04.06.2006

Definition at line 52 of file RtChebyshev.h.

Member Typedef Documentation

◆ ParVec

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

Definition at line 36 of file CalibFunc.h.

Constructor & Destructor Documentation

◆ RtChebyshev()

MuonCalib::RtChebyshev::RtChebyshev ( 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 73 of file RtChebyshev.h.

73 : IRtRelation(vec) { _init(); }

Member Function Documentation

◆ _init()

void RtChebyshev::_init ( void  )
private

initialization method

Definition at line 26 of file RtChebyshev.cxx.

26  {
27  // check for consistency //
28  if (nPar() < 3) {
29  throw std::runtime_error(Form("File: %s, Line: %d\nRtChebyshev::_init() - Not enough parameters!", __FILE__, __LINE__));
30  }
31  if (parameters()[0] >= parameters()[1]) {
32  throw std::runtime_error(
33  Form("File: %s, Line: %d\nRtChebyshev::_init() - Lower time boundary >= upper time boundary!", __FILE__, __LINE__));
34  }
35 
36  // pointer to the chebyshev service //
38 
39  return;
40 } // end RtChebyshev::_init

◆ driftvelocity()

double RtChebyshev::driftvelocity ( double  t) const
virtual

Implements MuonCalib::IRtRelation.

Definition at line 85 of file RtChebyshev.cxx.

85 { return (radius(t + 1.0) - radius(t)); }

◆ get_reduced_time()

double RtChebyshev::get_reduced_time ( const double &  t) const

Definition at line 125 of file RtChebyshev.cxx.

125  {
126  return 2 * (t - 0.5 * (parameters()[1] + parameters()[0])) / (parameters()[1] - parameters()[0]);
127 }

◆ GetTmaxDiff()

float MuonCalib::IRtRelation::GetTmaxDiff ( ) const
inlineinherited

return the difference in total dirft time between the two multilayers (ML1 - ML2)

Definition at line 27 of file IRtRelation.h.

27 { return HasTmaxDiff() ? m_tmax_diff : 0.0; }

◆ HasTmaxDiff()

bool MuonCalib::IRtRelation::HasTmaxDiff ( ) const
inlineinherited

Definition at line 29 of file IRtRelation.h.

29 { return (m_tmax_diff < 8e8); }

◆ name()

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

get the class name

Implements MuonCalib::CalibFunc.

Definition at line 47 of file RtChebyshev.cxx.

47 { return std::string("RtChebyshev"); }

◆ nPar()

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

Definition at line 39 of file CalibFunc.h.

39 { return m_parameters.size(); }

◆ numberOfRtParameters()

unsigned int RtChebyshev::numberOfRtParameters ( void  ) const

get the coefficients of the r(t) polynomial

Definition at line 106 of file RtChebyshev.cxx.

106 { 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; }

◆ radius()

double RtChebyshev::radius ( double  t) const
virtual

get the radius corresponding to the drift time t; if t is not within [t_low, t_up] an unphysical radius of 99999 is returned

get the drift velocity

Implements MuonCalib::IRtRelation.

Definition at line 54 of file RtChebyshev.cxx.

54  {
56  // INITIAL TIME CHECK //
58  if (t < parameters()[0]) return 0.0;
59  if (t > parameters()[1]) return 14.6;
60  // if x is out of bounds, return 99999 //
61  // if (t<parameters()[0] || t>parameters()[1]) {
62  // return 99999.0;
63  // }
64 
66  // VARIABLES //
68  // argument of the Chebyshev polynomials
69  double x(2 * (t - 0.5 * (parameters()[1] + parameters()[0])) / (parameters()[1] - parameters()[0]));
70  double rad(0.0); // auxiliary radius
71 
73  // CALCULATE r(t) //
75  for (unsigned int k = 0; k < nPar() - 2; k++) { rad = rad + parameters()[k + 2] * m_Chebyshev->value(k, x); }
76 
77  return rad >= 0 ? rad : 0;
78 }

◆ rtParameters()

std::vector< double > RtChebyshev::rtParameters ( void  ) const

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

Definition at line 113 of file RtChebyshev.cxx.

113  {
114  std::vector<double> alpha(nPar() - 2);
115  for (unsigned int k = 0; k < alpha.size(); k++) { alpha[k] = parameters()[k + 2]; }
116 
117  return alpha;
118 }

◆ SetTmaxDiff()

void MuonCalib::IRtRelation::SetTmaxDiff ( const float &  d)
inlineinherited

set the difference in total drift time betwene the two multilayers (ML1 - ML2)

Definition at line 32 of file IRtRelation.h.

32 { m_tmax_diff = d; }

◆ tLower()

double RtChebyshev::tLower ( void  ) const
virtual

< get the lower drift-time bound

get the upper drift-time bound

Implements MuonCalib::IRtRelation.

Definition at line 92 of file RtChebyshev.cxx.

92 { return parameters()[0]; }

◆ tUpper()

double RtChebyshev::tUpper ( void  ) const
virtual

get the number of parameters used to describe the r(t) relationship

Implements MuonCalib::IRtRelation.

Definition at line 99 of file RtChebyshev.cxx.

99 { return parameters()[1]; }

◆ typeName()

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

Implements MuonCalib::CalibFunc.

Definition at line 18 of file IRtRelation.h.

18 { return "IRtRelation"; }

Member Data Documentation

◆ m_Chebyshev

const Tschebyscheff_polynomial* MuonCalib::RtChebyshev::m_Chebyshev
private

pointer to the Chebyshev polynomials

Definition at line 55 of file RtChebyshev.h.

◆ m_parameters

ParVec MuonCalib::CalibFunc::m_parameters
privateinherited

Definition at line 51 of file CalibFunc.h.

◆ m_tmax_diff

float MuonCalib::IRtRelation::m_tmax_diff
inherited

Definition at line 34 of file IRtRelation.h.


The documentation for this class was generated from the following files:
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::IRtRelation::m_tmax_diff
float m_tmax_diff
Definition: IRtRelation.h:34
index
Definition: index.py:1
hist_file_dump.d
d
Definition: hist_file_dump.py:137
MuonCalib::IRtRelation::HasTmaxDiff
bool HasTmaxDiff() const
Definition: IRtRelation.h:29
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
x
#define x
MuonCalib::IRtRelation::IRtRelation
IRtRelation(const CalibFunc::ParVec &vec)
Definition: IRtRelation.h:16
MuonCalib::RtChebyshev::_init
void _init(void)
initialization method
Definition: RtChebyshev.cxx:26
MuonCalib::RtChebyshev::m_Chebyshev
const Tschebyscheff_polynomial * m_Chebyshev
pointer to the Chebyshev polynomials
Definition: RtChebyshev.h:55
DeMoScan.index
string index
Definition: DeMoScan.py:362
MuonCalib::CalibFunc::parameters
const ParVec & parameters() const
Definition: CalibFunc.h:40
MuonCalib::RtChebyshev::radius
double radius(double t) const
get the radius corresponding to the drift time t; if t is not within [t_low, t_up] an unphysical radi...
Definition: RtChebyshev.cxx:54
MuonCalib::CalibFunc::m_parameters
ParVec m_parameters
Definition: CalibFunc.h:51
MuonCalib::CalibFunc::nPar
unsigned int nPar() const
Definition: CalibFunc.h:39
python.SystemOfUnits.rad
int rad
Definition: SystemOfUnits.py:111
fitman.k
k
Definition: fitman.py:528