CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
MuonResidualsAngleFitter.cc File Reference
#include "Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsAngleFitter.h"

Go to the source code of this file.

Functions

void MuonResidualsAngleFitter_FCN (int &npar, double *gin, double &fval, double *par, int iflag)
 

Variables

static TMinuit * MuonResidualsAngleFitter_TMinuit
 

Function Documentation

void MuonResidualsAngleFitter_FCN ( int &  npar,
double *  gin,
double &  fval,
double *  par,
int  iflag 
)

Definition at line 9 of file MuonResidualsAngleFitter.cc.

References MuonResidualsFitterFitInfo::fitter(), MuonResidualsAngleFitter::kAngle, MuonResidualsAngleFitter::kGamma, MuonResidualsFitter::kGaussPowerTails, MuonResidualsFitter::kPowerLawTails, MuonResidualsFitter::kPureGaussian, MuonResidualsAngleFitter::kResidual, MuonResidualsFitter::kROOTVoigt, MuonResidualsAngleFitter::kSigma, MuonResidualsAngleFitter::kXAngle, MuonResidualsAngleFitter::kXControl, MuonResidualsAngleFitter::kYAngle, MuonResidualsAngleFitter::kYControl, MuonResidualsAngleFitter_TMinuit, MuonResidualsFitter_logGaussPowerTails(), MuonResidualsFitter_logPowerLawTails(), MuonResidualsFitter_logPureGaussian(), MuonResidualsFitter_logROOTVoigt(), MuonResidualsFitter::residuals_begin(), MuonResidualsFitter::residuals_end(), and MuonResidualsFitter::residualsModel().

Referenced by MuonResidualsAngleFitter::fit().

9  {
11  MuonResidualsFitter *fitter = fitinfo->fitter();
12 
13  fval = 0.;
14  for (std::vector<double*>::const_iterator resiter = fitter->residuals_begin(); resiter != fitter->residuals_end(); ++resiter) {
15  const double residual = (*resiter)[MuonResidualsAngleFitter::kResidual];
16  const double xangle = (*resiter)[MuonResidualsAngleFitter::kXAngle];
17  const double yangle = (*resiter)[MuonResidualsAngleFitter::kYAngle];
18 
19  double center = 0.;
20  center += par[MuonResidualsAngleFitter::kAngle];
21  center += par[MuonResidualsAngleFitter::kXControl] * xangle;
22  center += par[MuonResidualsAngleFitter::kYControl] * yangle;
23 
26  }
29  }
30  else if (fitter->residualsModel() == MuonResidualsFitter::kROOTVoigt) {
32  }
35  }
36  else { assert(false); }
37  }
38 }
double MuonResidualsFitter_logGaussPowerTails(double residual, double center, double sigma)
MuonResidualsFitter * fitter()
double MuonResidualsFitter_logROOTVoigt(double residual, double center, double sigma, double gamma)
double MuonResidualsFitter_logPowerLawTails(double residual, double center, double sigma, double gamma)
std::vector< double * >::const_iterator residuals_end() const
std::vector< double * >::const_iterator residuals_begin() const
static TMinuit * MuonResidualsAngleFitter_TMinuit
double MuonResidualsFitter_logPureGaussian(double residual, double center, double sigma)

Variable Documentation

TMinuit* MuonResidualsAngleFitter_TMinuit
static