CMS 3D CMS Logo

Functions | Variables
MuonResidualsBfieldAngleFitter.cc File Reference
#include "Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsBfieldAngleFitter.h"

Go to the source code of this file.

Functions

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

Variables

static TMinuit * MuonResidualsBfieldAngleFitter_TMinuit
 

Function Documentation

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

Definition at line 9 of file MuonResidualsBfieldAngleFitter.cc.

References MuonResidualsFitterFitInfo::fitter(), MuonResidualsBfieldAngleFitter::kAngle, MuonResidualsBfieldAngleFitter::kBfrompt, MuonResidualsBfieldAngleFitter::kBfrompz, MuonResidualsBfieldAngleFitter::kdEdx, MuonResidualsBfieldAngleFitter::kGamma, MuonResidualsFitter::kGaussPowerTails, MuonResidualsFitter::kPowerLawTails, MuonResidualsFitter::kPureGaussian, MuonResidualsBfieldAngleFitter::kQoverPt, MuonResidualsBfieldAngleFitter::kQoverPz, MuonResidualsBfieldAngleFitter::kResidual, MuonResidualsFitter::kROOTVoigt, MuonResidualsBfieldAngleFitter::kSigma, MuonResidualsBfieldAngleFitter_TMinuit, MuonResidualsFitter_logGaussPowerTails(), MuonResidualsFitter_logPowerLawTails(), MuonResidualsFitter_logPureGaussian(), MuonResidualsFitter_logROOTVoigt(), MuonResidualsFitter::residuals_begin(), MuonResidualsFitter::residuals_end(), and MuonResidualsFitter::residualsModel().

Referenced by MuonResidualsBfieldAngleFitter::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)[MuonResidualsBfieldAngleFitter::kResidual];
16  const double qoverpt = (*resiter)[MuonResidualsBfieldAngleFitter::kQoverPt];
17  const double qoverpz = (*resiter)[MuonResidualsBfieldAngleFitter::kQoverPz];
18 
19  double center = 0.;
21  center += par[MuonResidualsBfieldAngleFitter::kBfrompt] * qoverpt;
22  center += par[MuonResidualsBfieldAngleFitter::kBfrompz] * qoverpz;
23  center += par[MuonResidualsBfieldAngleFitter::kdEdx] * (1./qoverpt/qoverpt + 1./qoverpz/qoverpz) * (qoverpt > 0. ? 1. : -1.);
24 
27  }
30  }
31  else if (fitter->residualsModel() == MuonResidualsFitter::kROOTVoigt) {
33  }
36  }
37  else { assert(false); }
38  }
39 }
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)
static TMinuit * MuonResidualsBfieldAngleFitter_TMinuit
std::vector< double * >::const_iterator residuals_end() const
std::vector< double * >::const_iterator residuals_begin() const
double MuonResidualsFitter_logPureGaussian(double residual, double center, double sigma)

Variable Documentation

TMinuit* MuonResidualsBfieldAngleFitter_TMinuit
static