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

◆ MuonResidualsBfieldAngleFitter_FCN()

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

Definition at line 7 of file MuonResidualsBfieldAngleFitter.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)[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) *
24  (qoverpt > 0. ? 1. : -1.);
25 
28  } else if (fitter->residualsModel() == MuonResidualsFitter::kPowerLawTails) {
31  } else if (fitter->residualsModel() == MuonResidualsFitter::kROOTVoigt) {
34  } else if (fitter->residualsModel() == MuonResidualsFitter::kGaussPowerTails) {
36  } else {
37  assert(false);
38  }
39  }
40 }

References cms::cuda::assert(), 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().

Variable Documentation

◆ MuonResidualsBfieldAngleFitter_TMinuit

TMinuit* MuonResidualsBfieldAngleFitter_TMinuit
static
MuonResidualsFitter
Definition: MuonResidualsFitter.h:84
MuonResidualsFitter_logROOTVoigt
double MuonResidualsFitter_logROOTVoigt(double residual, double center, double sigma, double gamma)
Definition: MuonResidualsFitter.cc:120
MuonResidualsBfieldAngleFitter::kQoverPt
Definition: MuonResidualsBfieldAngleFitter.h:16
cms::cuda::assert
assert(be >=bs)
MuonResidualsFitter::kGaussPowerTails
Definition: MuonResidualsFitter.h:86
MuonResidualsBfieldAngleFitter::kQoverPz
Definition: MuonResidualsBfieldAngleFitter.h:16
MuonResidualsFitterFitInfo
Definition: MuonResidualsFitter.h:250
MuonResidualsBfieldAngleFitter::kdEdx
Definition: MuonResidualsBfieldAngleFitter.h:14
MuonResidualsBfieldAngleFitter_TMinuit
static TMinuit * MuonResidualsBfieldAngleFitter_TMinuit
Definition: MuonResidualsBfieldAngleFitter.cc:3
MuonResidualsFitter::kPowerLawTails
Definition: MuonResidualsFitter.h:86
MuonResidualsBfieldAngleFitter::kBfrompz
Definition: MuonResidualsBfieldAngleFitter.h:14
MuonResidualsFitter::kPureGaussian
Definition: MuonResidualsFitter.h:86
MuonResidualsBfieldAngleFitter::kSigma
Definition: MuonResidualsBfieldAngleFitter.h:14
MuonResidualsFitter::residuals_end
std::vector< double * >::const_iterator residuals_end() const
Definition: MuonResidualsFitter.h:191
MuonResidualsBfieldAngleFitter::kResidual
Definition: MuonResidualsBfieldAngleFitter.h:16
MuonResidualsFitter_logPowerLawTails
double MuonResidualsFitter_logPowerLawTails(double residual, double center, double sigma, double gamma)
Definition: MuonResidualsFitter.cc:85
MuonResidualsFitter::kROOTVoigt
Definition: MuonResidualsFitter.h:86
MuonResidualsBfieldAngleFitter::kAngle
Definition: MuonResidualsBfieldAngleFitter.h:14
MuonResidualsFitterFitInfo::fitter
MuonResidualsFitter * fitter()
Definition: MuonResidualsFitter.h:253
MuonResidualsBfieldAngleFitter::kGamma
Definition: MuonResidualsBfieldAngleFitter.h:14
MuonResidualsFitter_logGaussPowerTails
double MuonResidualsFitter_logGaussPowerTails(double residual, double center, double sigma)
Definition: MuonResidualsFitter.cc:128
MuonResidualsFitter::residualsModel
int residualsModel() const
Definition: MuonResidualsFitter.h:124
MuonResidualsFitter::residuals_begin
std::vector< double * >::const_iterator residuals_begin() const
Definition: MuonResidualsFitter.h:190
MuonResidualsBfieldAngleFitter::kBfrompt
Definition: MuonResidualsBfieldAngleFitter.h:14
MuonResidualsFitter_logPureGaussian
double MuonResidualsFitter_logPureGaussian(double residual, double center, double sigma)
Definition: MuonResidualsFitter.cc:31