CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
siPixelLACalibration::Chebyshev Class Reference

#include <SiPixelLorentzAngleCalibrationStruct.h>

Public Member Functions

 Chebyshev (int n, double xmin, double xmax)
 
double operator() (const double *xx, const double *p)
 

Private Attributes

double fA
 
double fB
 
std::vector< double > fC
 
std::vector< double > fT
 

Detailed Description

Definition at line 10 of file SiPixelLorentzAngleCalibrationStruct.h.

Constructor & Destructor Documentation

◆ Chebyshev()

siPixelLACalibration::Chebyshev::Chebyshev ( int  n,
double  xmin,
double  xmax 
)
inline

Member Function Documentation

◆ operator()()

double siPixelLACalibration::Chebyshev::operator() ( const double *  xx,
const double *  p 
)
inline

Definition at line 14 of file SiPixelLorentzAngleCalibrationStruct.h.

References fA, fB, fT, mps_fire::i, AlCaHLTBitMon_ParallelJobs::p, x, and geometryCSVtoXML::xx.

14  {
15  double x = (2.0 * xx[0] - fA - fB) / (fB - fA);
16  int npar = fT.size();
17 
18  if (npar == 1)
19  return p[0];
20  if (npar == 2)
21  return p[0] + x * p[1];
22  // build the polynomials
23  fT[0] = 1;
24  fT[1] = x;
25  for (int i = 2; i < npar; ++i) {
26  fT[i] = 2 * x * fT[i - 1] - fT[i - 2];
27  }
28  double sum = p[0] * fT[0];
29  for (int i = 1; i < npar; ++i) {
30  sum += p[i] * fT[i];
31  }
32  return sum;
33  }

Member Data Documentation

◆ fA

double siPixelLACalibration::Chebyshev::fA
private

Definition at line 36 of file SiPixelLorentzAngleCalibrationStruct.h.

Referenced by operator()().

◆ fB

double siPixelLACalibration::Chebyshev::fB
private

Definition at line 37 of file SiPixelLorentzAngleCalibrationStruct.h.

Referenced by operator()().

◆ fC

std::vector<double> siPixelLACalibration::Chebyshev::fC
private

Definition at line 39 of file SiPixelLorentzAngleCalibrationStruct.h.

◆ fT

std::vector<double> siPixelLACalibration::Chebyshev::fT
private

Definition at line 38 of file SiPixelLorentzAngleCalibrationStruct.h.

Referenced by operator()().