CMS 3D CMS Logo

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

◆ MuonResidualsAngleFitter_FCN()

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

Definition at line 7 of file MuonResidualsAngleFitter.cc.

7  {
10  MuonResidualsFitter *fitter = fitinfo->fitter();
11 
12  fval = 0.;
13  for (std::vector<double *>::const_iterator resiter = fitter->residuals_begin(); resiter != fitter->residuals_end();
14  ++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];
22  center += par[MuonResidualsAngleFitter::kYControl] * yangle;
23 
26  } else if (fitter->residualsModel() == MuonResidualsFitter::kPowerLawTails) {
29  } else if (fitter->residualsModel() == MuonResidualsFitter::kROOTVoigt) {
32  } else if (fitter->residualsModel() == MuonResidualsFitter::kGaussPowerTails) {
34  } else {
35  assert(false);
36  }
37  }
38 }

References cms::cuda::assert(), 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(), MuonResidualsFitter::residualsModel(), and OpticalFunctionsConfig_cfi::xangle.

Referenced by MuonResidualsAngleFitter::fit().

Variable Documentation

◆ MuonResidualsAngleFitter_TMinuit

TMinuit* MuonResidualsAngleFitter_TMinuit
static
MuonResidualsFitter
Definition: MuonResidualsFitter.h:84
MuonResidualsAngleFitter::kGamma
Definition: MuonResidualsAngleFitter.h:14
MuonResidualsFitter_logROOTVoigt
double MuonResidualsFitter_logROOTVoigt(double residual, double center, double sigma, double gamma)
Definition: MuonResidualsFitter.cc:120
cms::cuda::assert
assert(be >=bs)
MuonResidualsFitter::kGaussPowerTails
Definition: MuonResidualsFitter.h:86
MuonResidualsAngleFitter_TMinuit
static TMinuit * MuonResidualsAngleFitter_TMinuit
Definition: MuonResidualsAngleFitter.cc:3
MuonResidualsAngleFitter::kResidual
Definition: MuonResidualsAngleFitter.h:16
MuonResidualsFitterFitInfo
Definition: MuonResidualsFitter.h:250
MuonResidualsFitter::kPowerLawTails
Definition: MuonResidualsFitter.h:86
OpticalFunctionsConfig_cfi.xangle
xangle
Definition: OpticalFunctionsConfig_cfi.py:17
MuonResidualsAngleFitter::kXAngle
Definition: MuonResidualsAngleFitter.h:16
MuonResidualsFitter::kPureGaussian
Definition: MuonResidualsFitter.h:86
MuonResidualsFitter::residuals_end
std::vector< double * >::const_iterator residuals_end() const
Definition: MuonResidualsFitter.h:191
MuonResidualsAngleFitter::kSigma
Definition: MuonResidualsAngleFitter.h:14
MuonResidualsFitter_logPowerLawTails
double MuonResidualsFitter_logPowerLawTails(double residual, double center, double sigma, double gamma)
Definition: MuonResidualsFitter.cc:85
MuonResidualsFitter::kROOTVoigt
Definition: MuonResidualsFitter.h:86
MuonResidualsFitterFitInfo::fitter
MuonResidualsFitter * fitter()
Definition: MuonResidualsFitter.h:253
MuonResidualsFitter_logGaussPowerTails
double MuonResidualsFitter_logGaussPowerTails(double residual, double center, double sigma)
Definition: MuonResidualsFitter.cc:128
MuonResidualsAngleFitter::kAngle
Definition: MuonResidualsAngleFitter.h:14
MuonResidualsAngleFitter::kXControl
Definition: MuonResidualsAngleFitter.h:14
MuonResidualsAngleFitter::kYControl
Definition: MuonResidualsAngleFitter.h:14
MuonResidualsFitter::residualsModel
int residualsModel() const
Definition: MuonResidualsFitter.h:124
MuonResidualsFitter::residuals_begin
std::vector< double * >::const_iterator residuals_begin() const
Definition: MuonResidualsFitter.h:190
MuonResidualsAngleFitter::kYAngle
Definition: MuonResidualsAngleFitter.h:16
MuonResidualsFitter_logPureGaussian
double MuonResidualsFitter_logPureGaussian(double residual, double center, double sigma)
Definition: MuonResidualsFitter.cc:31