#include <MuonResidualsFitter.h>
Classes | |
struct | MuonAlignmentTreeRow |
Public Types | |
enum | { kPureGaussian, kPowerLawTails, kROOTVoigt, kGaussPowerTails, kPureGaussian2D } |
enum | { k1DOF, k5DOF, k6DOF, k6DOFrphi, kPositionFitter, kAngleFitter, kAngleBfieldFitter } |
enum | { k1111, k1110, k1100, k1010, k0010 } |
Public Member Functions | |
void | computeHistogramRangeAndBinning (int which, int &nbins, double &a, double &b) |
virtual void | correctBField ()=0 |
virtual void | correctBField (int idx_momentum, int idx_q) |
TMatrixDSym | correlationMatrix () |
double | covarianceElement (int parNum1, int parNum2) |
TMatrixDSym | covarianceMatrix () |
void | eraseNotSelectedResiduals () |
double | errorerror (int parNum) |
void | fill (double *residual) |
virtual bool | fit (Alignable *ali)=0 |
void | fix (int parNum, bool val=true) |
bool | fixed (int parNum) |
void | histogramChi2GaussianFit (int which, double &fit_mean, double &fit_sigma) |
double | loglikelihood () |
MuonResidualsFitter (int residualsModel, int minHits, int useResiduals, bool weightAlignment=true) | |
virtual int | ndata ()=0 |
int | nfixed () |
virtual int | npar ()=0 |
long | numResiduals () const |
long | numsegments () |
int | parNum2parIdx (int parNum) |
virtual double | plot (std::string name, TFileDirectory *dir, Alignable *ali)=0 |
void | plotsimple (std::string name, TFileDirectory *dir, int which, double multiplier) |
void | plotweighted (std::string name, TFileDirectory *dir, int which, int whichredchi2, double multiplier) |
void | read (FILE *file, int which=0) |
std::vector< double * > ::const_iterator | residuals_begin () const |
std::vector< double * > ::const_iterator | residuals_end () const |
int | residualsModel () const |
std::vector< bool > & | selectedResidualsFlags () |
void | selectPeakResiduals (double nsigma, int nvar, int *vars) |
void | selectPeakResiduals_simple (double nsigma, int nvar, int *vars) |
void | setPrintLevel (int printLevel) |
void | setStrategy (int strategy) |
virtual double | sumofweights ()=0 |
virtual int | type () const =0 |
int | useRes () const |
double | value (int parNum) |
void | write (FILE *file, int which=0) |
virtual | ~MuonResidualsFitter () |
Protected Member Functions | |
bool | dofit (void(*fcn)(int &, double *, double &, double *, int), std::vector< int > &parNum, std::vector< std::string > &parName, std::vector< double > &start, std::vector< double > &step, std::vector< double > &low, std::vector< double > &high) |
virtual void | inform (TMinuit *tMinuit)=0 |
void | initialize_table () |
Protected Attributes | |
double | m_center [20] |
TMatrixDSym | m_cov |
std::vector< double > | m_error |
std::vector< bool > | m_fixed |
double | m_loglikelihood |
int | m_minHits |
std::map< int, int > | m_parNum2parIdx |
int | m_printLevel |
double | m_radii [20] |
std::vector< double * > | m_residuals |
std::vector< bool > | m_residuals_ok |
int | m_residualsModel |
int | m_strategy |
int | m_useResiduals |
std::vector< double > | m_value |
bool | m_weightAlignment |
Definition at line 80 of file MuonResidualsFitter.h.
anonymous enum |
Enumerator | |
---|---|
kPureGaussian | |
kPowerLawTails | |
kROOTVoigt | |
kGaussPowerTails | |
kPureGaussian2D |
Definition at line 83 of file MuonResidualsFitter.h.
anonymous enum |
Enumerator | |
---|---|
k1DOF | |
k5DOF | |
k6DOF | |
k6DOFrphi | |
kPositionFitter | |
kAngleFitter | |
kAngleBfieldFitter |
Definition at line 91 of file MuonResidualsFitter.h.
anonymous enum |
|
inline |
Definition at line 130 of file MuonResidualsFitter.h.
References Exception, kGaussPowerTails, kPowerLawTails, kPureGaussian, kPureGaussian2D, kROOTVoigt, and m_residualsModel.
|
inlinevirtual |
Definition at line 138 of file MuonResidualsFitter.h.
References residuals_begin(), and residuals_end().
void MuonResidualsFitter::computeHistogramRangeAndBinning | ( | int | which, |
int & | nbins, | ||
double & | a, | ||
double & | b | ||
) |
Definition at line 455 of file MuonResidualsFitter.cc.
References gather_cfg::cout, data, i, m_residuals, gen::n, NULL, numResiduals(), funct::pow(), alignCSCRings::r, and python.multivaluedict::sort().
Referenced by histogramChi2GaussianFit().
|
pure virtual |
|
virtual |
Definition at line 646 of file MuonResidualsFitter.cc.
References newFWLiteAna::bin, prof2calltree::count, gather_cfg::cout, alignCSCRings::e, i, j, m_residuals, m_residuals_ok, EnergyCorrector::pt, alignCSCRings::r, residuals_begin(), residuals_end(), findQualityFiles::size, and python.multivaluedict::sort().
TMatrixDSym MuonResidualsFitter::correlationMatrix | ( | ) |
|
inline |
Definition at line 191 of file MuonResidualsFitter.h.
References assert(), m_cov, npar(), and parNum2parIdx().
|
inline |
|
protected |
Definition at line 237 of file MuonResidualsFitter.cc.
References fitWZ::arglist, alignCSCRings::e, fcn(), fixed(), i, inform(), m_cov, m_error, m_loglikelihood, m_printLevel, m_strategy, m_value, MuonResidualsFitter_TMinuit, npar(), and findQualityFiles::v.
Referenced by MuonResiduals1DOFFitter::fit(), MuonResidualsAngleFitter::fit(), MuonResidualsBfieldAngleFitter::fit(), MuonResidualsPositionFitter::fit(), MuonResiduals5DOFFitter::fit(), MuonResiduals6DOFFitter::fit(), and MuonResiduals6DOFrphiFitter::fit().
void MuonResidualsFitter::eraseNotSelectedResiduals | ( | ) |
Definition at line 711 of file MuonResidualsFitter.cc.
References prof2calltree::count, gather_cfg::cout, i, m_residuals, m_residuals_ok, and tmp.
Referenced by MuonResidualsTwoBin::eraseNotSelectedResiduals().
|
inline |
Definition at line 184 of file MuonResidualsFitter.h.
References assert(), m_error, and npar().
Referenced by MuonResidualsTwoBin::errorerror(), MuonResiduals5DOFFitter::plot(), MuonResiduals6DOFFitter::plot(), and MuonResiduals6DOFrphiFitter::plot().
|
inline |
Definition at line 173 of file MuonResidualsFitter.h.
References m_residuals, and m_residuals_ok.
Referenced by MuonResidualsTwoBin::fill(), read(), MuonResiduals5DOFFitter::readNtuple(), MuonResiduals6DOFFitter::readNtuple(), and MuonResiduals6DOFrphiFitter::readNtuple().
|
pure virtual |
|
inline |
Definition at line 153 of file MuonResidualsFitter.h.
References assert(), m_fixed, and npar().
Referenced by MuonResiduals5DOFFitter::fit(), MuonResiduals6DOFFitter::fit(), MuonResiduals6DOFrphiFitter::fit(), and MuonResidualsTwoBin::fix().
|
inline |
Definition at line 160 of file MuonResidualsFitter.h.
References assert(), m_fixed, and npar().
Referenced by dofit(), MuonResiduals1DOFFitter::fit(), and MuonResidualsTwoBin::fixed().
void MuonResidualsFitter::histogramChi2GaussianFit | ( | int | which, |
double & | fit_mean, | ||
double & | fit_sigma | ||
) |
Definition at line 491 of file MuonResidualsFitter.cc.
References a, b, computeHistogramRangeAndBinning(), gather_cfg::cout, python.connectstrParser::f1, estimatePileup::hist, m_residuals, pileupCalc::nbins, and alignCSCRings::r.
Referenced by selectPeakResiduals_simple().
|
protectedpure virtual |
Implemented in MuonResiduals6DOFrphiFitter, MuonResiduals6DOFFitter, MuonResiduals5DOFFitter, MuonResidualsPositionFitter, MuonResidualsBfieldAngleFitter, MuonResidualsAngleFitter, and MuonResiduals1DOFFitter.
Referenced by dofit().
|
protected |
Definition at line 166 of file MuonResidualsFitter.cc.
References gather_cfg::cout, Exception, kPowerLawTails, MuonResidualsFitter_compute_log_convolution(), MuonResidualsFitter_gsbinsize, MuonResidualsFitter_lookup_table, MuonResidualsFitter_numgsbins, MuonResidualsFitter_numtsbins, MuonResidualsFitter_table_initialized, MuonResidualsFitter_tsbinsize, and residualsModel().
Referenced by MuonResiduals1DOFFitter::fit(), MuonResidualsAngleFitter::fit(), MuonResidualsBfieldAngleFitter::fit(), MuonResidualsPositionFitter::fit(), MuonResiduals5DOFFitter::fit(), MuonResiduals6DOFFitter::fit(), and MuonResiduals6DOFrphiFitter::fit().
|
inline |
Definition at line 200 of file MuonResidualsFitter.h.
References m_loglikelihood.
Referenced by MuonResidualsTwoBin::loglikelihood().
|
pure virtual |
Implemented in MuonResiduals6DOFrphiFitter, MuonResiduals6DOFFitter, MuonResiduals5DOFFitter, MuonResidualsPositionFitter, MuonResidualsBfieldAngleFitter, MuonResidualsAngleFitter, and MuonResiduals1DOFFitter.
Referenced by MuonResidualsTwoBin::ndata(), read(), and write().
|
inline |
|
pure virtual |
Implemented in MuonResiduals6DOFrphiFitter, MuonResiduals6DOFFitter, MuonResiduals5DOFFitter, MuonResidualsPositionFitter, MuonResidualsBfieldAngleFitter, MuonResidualsAngleFitter, and MuonResiduals1DOFFitter.
Referenced by covarianceElement(), dofit(), errorerror(), fix(), fixed(), MuonResidualsTwoBin::npar(), and value().
|
inline |
Definition at line 151 of file MuonResidualsFitter.h.
References m_residuals.
Referenced by computeHistogramRangeAndBinning(), MuonResidualsTwoBin::numResidualsNeg(), MuonResidualsTwoBin::numResidualsPos(), MuonResidualsAngleFitter::plot(), MuonResidualsBfieldAngleFitter::plot(), MuonResidualsPositionFitter::plot(), read(), selectPeakResiduals(), selectPeakResiduals_simple(), MuonResidualsAngleFitter::sumofweights(), MuonResidualsBfieldAngleFitter::sumofweights(), MuonResidualsPositionFitter::sumofweights(), and write().
|
inline |
Definition at line 202 of file MuonResidualsFitter.h.
References pileupDistInMC::num, residuals_begin(), and residuals_end().
Referenced by MuonResidualsTwoBin::numsegments().
|
inline |
Definition at line 188 of file MuonResidualsFitter.h.
References m_parNum2parIdx.
Referenced by covarianceElement().
|
pure virtual |
void MuonResidualsFitter::plotsimple | ( | std::string | name, |
TFileDirectory * | dir, | ||
int | which, | ||
double | multiplier | ||
) |
Definition at line 425 of file MuonResidualsFitter.cc.
References estimatePileup::hist, TFileDirectory::make(), alignCSCRings::r, residuals_begin(), residuals_end(), and svgfig::window().
Referenced by MuonResidualsTwoBin::plotsimple().
void MuonResidualsFitter::plotweighted | ( | std::string | name, |
TFileDirectory * | dir, | ||
int | which, | ||
int | whichredchi2, | ||
double | multiplier | ||
) |
Definition at line 438 of file MuonResidualsFitter.cc.
References estimatePileup::hist, TFileDirectory::make(), alignCSCRings::r, residuals_begin(), residuals_end(), histoStyle::weight, and svgfig::window().
Referenced by MuonResidualsTwoBin::plotweighted().
void MuonResidualsFitter::read | ( | FILE * | file, |
int | which = 0 |
||
) |
Definition at line 369 of file MuonResidualsFitter.cc.
References alignCSCRings::e, Exception, fill(), i, m_residuals, m_residuals_ok, ndata(), numResiduals(), and tablePrinter::rows.
Referenced by Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::goto(), MuonResidualsTwoBin::read(), and Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::setFilterBranches().
|
inline |
Definition at line 231 of file MuonResidualsFitter.h.
References m_residuals.
Referenced by correctBField(), MuonResiduals1DOFFitter::fit(), MuonResidualsAngleFitter::fit(), MuonResidualsBfieldAngleFitter::fit(), MuonResidualsPositionFitter::fit(), MuonResiduals1DOFFitter_FCN(), MuonResiduals5DOFFitter_FCN(), MuonResiduals6DOFFitter_FCN(), MuonResiduals6DOFrphiFitter_FCN(), MuonResidualsAngleFitter_FCN(), MuonResidualsBfieldAngleFitter_FCN(), MuonResidualsPositionFitter_FCN(), numsegments(), MuonResiduals1DOFFitter::plot(), MuonResidualsAngleFitter::plot(), MuonResidualsBfieldAngleFitter::plot(), MuonResidualsPositionFitter::plot(), MuonResiduals5DOFFitter::plot(), MuonResiduals6DOFFitter::plot(), MuonResiduals6DOFrphiFitter::plot(), plotsimple(), plotweighted(), MuonResidualsTwoBin::residualsNeg_begin(), MuonResidualsTwoBin::residualsPos_begin(), MuonResiduals1DOFFitter::sumofweights(), MuonResiduals5DOFFitter::sumofweights(), MuonResiduals6DOFFitter::sumofweights(), MuonResiduals6DOFrphiFitter::sumofweights(), write(), and ~MuonResidualsFitter().
|
inline |
Definition at line 232 of file MuonResidualsFitter.h.
References m_residuals.
Referenced by correctBField(), MuonResiduals1DOFFitter::fit(), MuonResidualsAngleFitter::fit(), MuonResidualsBfieldAngleFitter::fit(), MuonResidualsPositionFitter::fit(), MuonResiduals1DOFFitter_FCN(), MuonResiduals5DOFFitter_FCN(), MuonResiduals6DOFFitter_FCN(), MuonResiduals6DOFrphiFitter_FCN(), MuonResidualsAngleFitter_FCN(), MuonResidualsBfieldAngleFitter_FCN(), MuonResidualsPositionFitter_FCN(), numsegments(), MuonResiduals1DOFFitter::plot(), MuonResidualsAngleFitter::plot(), MuonResidualsBfieldAngleFitter::plot(), MuonResidualsPositionFitter::plot(), MuonResiduals5DOFFitter::plot(), MuonResiduals6DOFFitter::plot(), MuonResiduals6DOFrphiFitter::plot(), plotsimple(), plotweighted(), MuonResidualsTwoBin::residualsNeg_end(), MuonResidualsTwoBin::residualsPos_end(), MuonResiduals1DOFFitter::sumofweights(), MuonResiduals5DOFFitter::sumofweights(), MuonResiduals6DOFFitter::sumofweights(), MuonResiduals6DOFrphiFitter::sumofweights(), write(), and ~MuonResidualsFitter().
|
inline |
Definition at line 150 of file MuonResidualsFitter.h.
References m_residualsModel.
Referenced by MuonResiduals1DOFFitter::fit(), MuonResidualsAngleFitter::fit(), MuonResidualsBfieldAngleFitter::fit(), MuonResidualsPositionFitter::fit(), MuonResiduals5DOFFitter::fit(), MuonResiduals6DOFFitter::fit(), MuonResiduals6DOFrphiFitter::fit(), initialize_table(), MuonResiduals1DOFFitter_FCN(), MuonResiduals5DOFFitter_FCN(), MuonResiduals6DOFFitter_FCN(), MuonResiduals6DOFrphiFitter_FCN(), MuonResidualsAngleFitter_FCN(), MuonResidualsBfieldAngleFitter_FCN(), MuonResidualsPositionFitter_FCN(), MuonResiduals1DOFFitter::npar(), MuonResidualsAngleFitter::npar(), MuonResidualsBfieldAngleFitter::npar(), MuonResidualsPositionFitter::npar(), MuonResiduals5DOFFitter::npar(), MuonResiduals6DOFFitter::npar(), MuonResiduals6DOFrphiFitter::npar(), MuonResiduals1DOFFitter::plot(), MuonResidualsAngleFitter::plot(), MuonResidualsBfieldAngleFitter::plot(), MuonResidualsPositionFitter::plot(), MuonResiduals5DOFFitter::plot(), MuonResiduals6DOFFitter::plot(), MuonResiduals6DOFrphiFitter::plot(), and MuonResidualsTwoBin::residualsModel().
|
inline |
Definition at line 242 of file MuonResidualsFitter.h.
References m_residuals_ok.
Referenced by MuonResidualsTwoBin::residualsNeg_ok_begin(), MuonResidualsTwoBin::residualsNeg_ok_end(), MuonResidualsTwoBin::residualsPos_ok_begin(), and MuonResidualsTwoBin::residualsPos_ok_end().
void MuonResidualsFitter::selectPeakResiduals | ( | double | nsigma, |
int | nvar, | ||
int * | vars | ||
) |
Definition at line 559 of file MuonResidualsFitter.cc.
References assert(), prof2calltree::count, gather_cfg::cout, data, HLT_25ns14e33_v1_cff::distance, i, m_residuals, m_residuals_ok, numResiduals(), alignCSCRings::r, mathSSE::sqrt(), and findQualityFiles::v.
Referenced by MuonResidualsTwoBin::selectPeakResiduals().
void MuonResidualsFitter::selectPeakResiduals_simple | ( | double | nsigma, |
int | nvar, | ||
int * | vars | ||
) |
Definition at line 518 of file MuonResidualsFitter.cc.
References assert(), gather_cfg::cout, histogramChi2GaussianFit(), m_center, m_radii, m_residuals, numResiduals(), funct::pow(), alignCSCRings::r, and findQualityFiles::v.
|
inline |
Definition at line 168 of file MuonResidualsFitter.h.
References m_printLevel.
Referenced by MuonResidualsTwoBin::setPrintLevel().
|
inline |
Definition at line 169 of file MuonResidualsFitter.h.
References m_strategy.
Referenced by MuonResidualsTwoBin::setStrategy().
|
pure virtual |
|
pure virtual |
Implemented in MuonResiduals6DOFrphiFitter, MuonResiduals6DOFFitter, MuonResiduals5DOFFitter, MuonResidualsPositionFitter, MuonResidualsBfieldAngleFitter, MuonResidualsAngleFitter, and MuonResiduals1DOFFitter.
Referenced by cuy.ValElement::__init__(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::inputCommands(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputCommands(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputEventContent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::properties(), and MuonResidualsTwoBin::type().
|
inline |
Definition at line 149 of file MuonResidualsFitter.h.
References m_useResiduals.
Referenced by MuonResiduals5DOFFitter::fit(), MuonResiduals6DOFFitter::fit(), MuonResiduals6DOFrphiFitter::fit(), MuonResiduals5DOFFitter_FCN(), MuonResiduals6DOFFitter_FCN(), MuonResiduals6DOFrphiFitter_FCN(), and MuonResidualsTwoBin::useRes().
|
inline |
Definition at line 183 of file MuonResidualsFitter.h.
References assert(), m_value, and npar().
Referenced by Types.int32::__nonzero__(), Types.uint32::__nonzero__(), Types.int64::__nonzero__(), Types.uint64::__nonzero__(), Types.double::__nonzero__(), Types.bool::__nonzero__(), Types.string::__nonzero__(), MuonResidualsTwoBin::antisym(), average.Average::average(), Vispa.Views.PropertyView.FileProperty::buttonClicked(), Types.string::configValue(), Types.FileInPath::configValue(), Mixins.UsingBlock::dumpPython(), Types.int32::insertInto(), Types.uint32::insertInto(), Types.int64::insertInto(), Types.uint64::insertInto(), Mixins.UsingBlock::insertInto(), Types.double::insertInto(), Types.bool::insertInto(), Types.string::insertInto(), Types.FileInPath::insertInto(), Types.vint32::insertInto(), Types.vuint32::insertInto(), Types.vint64::insertInto(), Types.vuint64::insertInto(), Types.vdouble::insertInto(), Types.vbool::insertInto(), Types.vstring::insertInto(), Vispa.Views.PropertyView.FileProperty::labelDoubleClicked(), MuonResiduals1DOFFitter::plot(), MuonResidualsAngleFitter::plot(), MuonResidualsBfieldAngleFitter::plot(), MuonResidualsPositionFitter::plot(), MuonResiduals5DOFFitter::plot(), MuonResiduals6DOFFitter::plot(), MuonResiduals6DOFrphiFitter::plot(), and MuonResidualsTwoBin::value().
void MuonResidualsFitter::write | ( | FILE * | file, |
int | which = 0 |
||
) |
Definition at line 332 of file MuonResidualsFitter.cc.
References i, ndata(), numResiduals(), residuals_begin(), residuals_end(), and tablePrinter::rows.
Referenced by pkg.AbstractPkg::generate(), and MuonResidualsTwoBin::write().
|
protected |
Definition at line 271 of file MuonResidualsFitter.h.
Referenced by selectPeakResiduals_simple().
|
protected |
Definition at line 263 of file MuonResidualsFitter.h.
Referenced by covarianceElement(), covarianceMatrix(), and dofit().
|
protected |
Definition at line 262 of file MuonResidualsFitter.h.
Referenced by dofit(), and errorerror().
|
protected |
Definition at line 255 of file MuonResidualsFitter.h.
|
protected |
Definition at line 264 of file MuonResidualsFitter.h.
Referenced by dofit(), and loglikelihood().
|
protected |
Definition at line 252 of file MuonResidualsFitter.h.
Referenced by MuonResidualsAngleFitter::fit(), MuonResidualsBfieldAngleFitter::fit(), and MuonResidualsPositionFitter::fit().
|
protected |
Definition at line 266 of file MuonResidualsFitter.h.
Referenced by parNum2parIdx().
|
protected |
Definition at line 256 of file MuonResidualsFitter.h.
Referenced by dofit(), and setPrintLevel().
|
protected |
Definition at line 272 of file MuonResidualsFitter.h.
Referenced by selectPeakResiduals_simple().
|
protected |
Definition at line 258 of file MuonResidualsFitter.h.
Referenced by computeHistogramRangeAndBinning(), correctBField(), eraseNotSelectedResiduals(), fill(), histogramChi2GaussianFit(), numResiduals(), read(), residuals_begin(), residuals_end(), selectPeakResiduals(), and selectPeakResiduals_simple().
|
protected |
Definition at line 259 of file MuonResidualsFitter.h.
Referenced by correctBField(), eraseNotSelectedResiduals(), fill(), read(), selectedResidualsFlags(), and selectPeakResiduals().
|
protected |
Definition at line 251 of file MuonResidualsFitter.h.
Referenced by MuonResidualsFitter(), and residualsModel().
|
protected |
Definition at line 256 of file MuonResidualsFitter.h.
Referenced by dofit(), and setStrategy().
|
protected |
Definition at line 253 of file MuonResidualsFitter.h.
Referenced by useRes().
|
protected |
Definition at line 261 of file MuonResidualsFitter.h.
|
protected |
Definition at line 254 of file MuonResidualsFitter.h.
Referenced by MuonResiduals1DOFFitter::fit(), MuonResiduals1DOFFitter::plot(), MuonResiduals5DOFFitter::plot(), MuonResiduals6DOFFitter::plot(), MuonResiduals6DOFrphiFitter::plot(), MuonResiduals1DOFFitter::sumofweights(), MuonResiduals5DOFFitter::sumofweights(), MuonResiduals6DOFFitter::sumofweights(), and MuonResiduals6DOFrphiFitter::sumofweights().