#include <Fit.h>
Public Member Functions | |
Fit () | |
~Fit () | |
Static Public Member Functions | |
static void | calculateSimulatedMeasurementsWithOriginalValues () |
static void | dumpEntryAfterFit (ALIFileOut &fileout, const Entry *entry, double entryvalue, ALIbool printErrors=true, ALIbool printOrig=true) |
static void | dumpEntryCorrelations (ALIFileOut &file) |
static void | dumpFittedValues (ALIFileOut &fileout, ALIbool printErrors=true, ALIbool printOrig=true) |
static void | dumpFittedValuesInAllAncestorFrames (ALIFileOut &fileout, ALIbool printErrors=true, ALIbool printOrig=true) |
static void | dumpMatrices () |
static ALIint | findEntryFitPosition (const ALIstring &opto_name, const ALIstring &entry_name) |
static ALIbool | fitNextEvent (ALIuint &nEvent) |
static ALIMatrix * | GetAtWAMatrix () |
static Fit & | getInstance () |
static ALIint | noFitIterations () |
static void | printCentreInOptOFrame (const OpticalObject *opto, const OpticalObject *optoAncestor, ALIFileOut &fileout, ALIbool printErrors=true, ALIbool printOrig=true) |
static void | PrintChi2 (ALIdouble fit_quality, ALIbool isFirst) |
static void | printRotationAnglesInOptOFrame (const OpticalObject *opto, const OpticalObject *optoAncestor, ALIFileOut &fileout, ALIbool printErrors=true, ALIbool printOrig=true) |
static void | setFittableEntries () |
static void | startFit () |
Static Public Attributes | |
static ALIuint | nEvent = 1 |
Static Private Member Functions | |
static void | addDaMatrixToEntries () |
static void | CheckIfFitPossible () |
static int | CheckIfMeasIsProportionalToAnother (ALIuint measNo) |
static void | CreateMatrices () |
static void | deleteMatrices () |
static void | evaluateFitQuality (const FitQuality fq, const double daFactor) |
static void | FillMatricesWithCalibratedParameters () |
static void | FillMatricesWithMeasurements () |
static FitQuality | fitParameters (const double daFactor) |
static double | getEntryValue (const Entry *entry) |
static FitQuality | getFitQuality (const ALIbool canBeGood=TRUE) |
static std::string | GetMeasurementName (int meas) |
static ALIdouble | GetSChi2 (ALIbool useDa) |
static void | multiplyMatrices () |
static void | PropagateErrors () |
static void | redoMatrices () |
static void | setCorrelationFromParamFitted (const pss &entry1, const pss &entry2, ALIdouble correl) |
static void | setCorrelationFromParamFitted (const ALIint fit_pos1, const ALIint fit_pos2, ALIdouble correl) |
static void | setCorrelationsInWMatrix () |
static void | substractLastDisplacementToEntries (const ALIdouble factor) |
static void | WriteVisualisationFiles () |
Static Private Attributes | |
static ALIint | _NoColumnsA |
static ALIint | _NoLinesA |
static ALIMatrix * | AMatrix |
static ALIMatrix * | AtMatrix |
static ALIMatrix * | AtWAMatrix |
static ALIMatrix * | DaMatrix |
static Fit * | instance = 0 |
static ALIint | MaxNoFitIterations = -1 |
static ALIdouble | theFitQualityCut = -1 |
static ALIdouble | theMinDaFactor = 1.e-8 |
static ALIint | theMinimumEntryQuality |
static ALIint | theNoFitIterations |
static ALIdouble | thePreviousIterationFitQuality = DBL_MAX |
static ALIdouble | theRelativeFitQualityCut = -1 |
static ALIMatrix * | WMatrix |
static ALIMatrix * | yfMatrix |
|
inline |
|
inline |
Definition at line 39 of file Fit.h.
References calculateSimulatedMeasurementsWithOriginalValues(), dumpEntryAfterFit(), dumpEntryCorrelations(), dumpFittedValues(), dumpFittedValuesInAllAncestorFrames(), dumpMatrices(), mps_splice::entry, FrontierConditions_GlobalTag_cff::file, findEntryFitPosition(), fitNextEvent(), fitParameters(), getInstance(), nEvent, printCentreInOptOFrame(), printRotationAnglesInOptOFrame(), PropagateErrors(), redoMatrices(), setFittableEntries(), startFit(), and WriteVisualisationFiles().
|
staticprivate |
Definition at line 1065 of file Fit.cc.
References begin, gather_cfg::cout, DaMatrix, ALIUtils::debug, MatrixMeschach::Dump(), Model::EntryList(), and theMinimumEntryQuality.
Referenced by fitNextEvent(), and noFitIterations().
|
static |
Definition at line 515 of file Fit.cc.
References begin, gather_cfg::cout, ALIUtils::debug, Model::MeasurementList(), and DeviationsFromFileSensor2D::setApply().
Referenced by fitNextEvent(), redoMatrices(), WriteVisualisationFiles(), and ~Fit().
|
staticprivate |
Definition at line 1545 of file Fit.cc.
References funct::abs(), ALI_DBL_MIN, AMatrix, begin, MessageLogger_cfi::cerr, gather_cfg::cout, ALIUtils::debug, Model::EntryList(), Exception, FALSE, cuy::ii, Model::MeasurementList(), MatrixMeschach::NoLines(), and TRUE.
Referenced by GetAtWAMatrix(), and multiplyMatrices().
|
staticprivate |
Definition at line 1626 of file Fit.cc.
References funct::abs(), ALI_DBL_MIN, AMatrix, gather_cfg::cout, ALIUtils::debug, cuy::ii, findQualityFiles::jj, MatrixMeschach::NoColumns(), and MatrixMeschach::NoLines().
Referenced by GetAtWAMatrix().
|
staticprivate |
Definition at line 557 of file Fit.cc.
References AMatrix, begin, gather_cfg::cout, ALIUtils::debug, Model::EntryList(), GlobalOptionMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), Model::MeasurementList(), theMinimumEntryQuality, WMatrix, and yfMatrix.
Referenced by noFitIterations(), and PropagateErrors().
|
staticprivate |
Definition at line 538 of file Fit.cc.
References AMatrix, AtMatrix, AtWAMatrix, DaMatrix, WMatrix, and yfMatrix.
Referenced by noFitIterations(), and redoMatrices().
|
static |
Definition at line 1319 of file Fit.cc.
References funct::abs(), AtWAMatrix, gather_cfg::cout, ALIUtils::debug, Entry::fitPos(), MatrixMeschach::Mat(), Entry::name(), OpticalObject::name(), Entry::OptOCurrent(), Entry::OutputSigmaDimensionFactor(), Entry::OutputValueDimensionFactor(), Entry::quality(), ALIUtils::report, Entry::sigma(), mathSSE::sqrt(), theMinimumEntryQuality, Entry::value(), and Entry::valueDisplacementByFitting().
Referenced by dumpFittedValues(), printCentreInOptOFrame(), printRotationAnglesInOptOFrame(), and ~Fit().
|
static |
Definition at line 1370 of file Fit.cc.
References funct::abs(), AtWAMatrix, begin, corr, gather_cfg::cout, ALIUtils::debug, OpticalObjectMgr::dumpOptOs(), Model::EntryList(), OpticalObjectMgr::getInstance(), MatrixMeschach::Mat(), mathSSE::sqrt(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by dumpFittedValues(), and ~Fit().
|
static |
Definition at line 1147 of file Fit.cc.
References begin, MessageLogger_cfi::cerr, gather_cfg::cout, ALIUtils::debug, dumpEntryAfterFit(), dumpEntryCorrelations(), getEntryValue(), cuy::ii, Model::OptOList(), OpticalObject::parent(), printCentreInOptOFrame(), and printRotationAnglesInOptOFrame().
Referenced by fitNextEvent(), and ~Fit().
|
static |
Definition at line 1210 of file Fit.cc.
References begin, OpticalObject::longName(), Model::OptOList(), OpticalObject::parent(), printCentreInOptOFrame(), and printRotationAnglesInOptOFrame().
Referenced by fitNextEvent(), and ~Fit().
|
static |
Definition at line 1422 of file Fit.cc.
References AMatrix, AtMatrix, AtWAMatrix, DaMatrix, ALIFileOut::getInstance(), Model::MatricesFName(), MatrixMeschach::ostrDump(), theNoFitIterations, WMatrix, and yfMatrix.
Referenced by fitNextEvent(), and ~Fit().
|
staticprivate |
Referenced by noFitIterations().
|
staticprivate |
Definition at line 709 of file Fit.cc.
References MatrixMeschach::AddData(), AMatrix, begin, gather_cfg::cout, ALIUtils::debug, Model::EntryList(), GlobalOptionMgr::getGlobalOptionValue(), GlobalOptionMgr::getInstance(), Model::MeasurementList(), WMatrix, and yfMatrix.
Referenced by noFitIterations(), and PropagateErrors().
|
staticprivate |
Definition at line 626 of file Fit.cc.
References MatrixMeschach::AddData(), AMatrix, begin, Measurement::cameraScaleFactor, MessageLogger_cfi::cerr, gather_cfg::cout, ALIUtils::debug, MatrixMeschach::Dump(), findQualityFiles::jj, Model::MeasurementList(), theMinimumEntryQuality, WMatrix, and yfMatrix.
Referenced by noFitIterations(), and PropagateErrors().
|
static |
Definition at line 1445 of file Fit.cc.
References MessageLogger_cfi::cerr, OpticalObject::CoordinateEntryList(), cmsRelvalreport::exit, OpticalObject::ExtraEntryList(), and Model::getOptOByName().
Referenced by ~Fit().
Definition at line 149 of file Fit.cc.
References addDaMatrixToEntries(), FittedEntriesManager::AddFittedEntriesSet(), AtWAMatrix, begin, calculateSimulatedMeasurementsWithOriginalValues(), MessageLogger_cfi::cerr, COCOA_FirstIterationInEvent, COCOA_NextIterationInEvent, gather_cfg::cout, ALIUtils::debug, ALIUtils::dumpDimensions(), dumpFittedValues(), dumpFittedValuesInAllAncestorFrames(), dumpMatrices(), Model::EntryList(), FALSE, NtupleManager::FillChi2(), NtupleManager::FillFitParameters(), NtupleManager::FillMeasurements(), NtupleManager::FillNtupleTree(), NtupleManager::FillOptObjects(), fitParameters(), FQbigDistanceToMinimum, FQchiSquareWorsened, FQsmallDistanceToMinimum, CocoaDaqReader::GetDaqReader(), Model::getFittedEntriesReader(), GlobalOptionMgr::getGlobalOptionValue(), FittedEntriesManager::getInstance(), GlobalOptionMgr::getInstance(), NtupleManager::getInstance(), ALIFileOut::getInstance(), GlobalOptionMgr::GlobalOptions(), NtupleManager::InitNtuple(), MaxNoFitIterations, Measurement::only1, Model::OptOList(), FittedEntriesReader::readFittedEntriesFromFile(), CocoaDaqReader::ReadNextEvent(), ALIUtils::report, Model::ReportFName(), Model::setCocoaStatus(), setFittableEntries(), substractLastDisplacementToEntries(), theMinDaFactor, theNoFitIterations, and TRUE.
Referenced by startFit(), and ~Fit().
|
staticprivate |
Definition at line 392 of file Fit.cc.
References COCOA_FirstIterationInEvent, gather_cfg::cout, ALIUtils::debug, cmsRelvalreport::exit, Model::getCocoaStatus(), getFitQuality(), GlobalOptionMgr::getInstance(), GetSChi2(), GlobalOptionMgr::GlobalOptions(), redoMatrices(), theNoFitIterations, and thePreviousIterationFitQuality.
Referenced by fitNextEvent(), and ~Fit().
|
inlinestatic |
Definition at line 146 of file Fit.h.
References AtWAMatrix, CheckIfFitPossible(), CheckIfMeasIsProportionalToAnother(), GetMeasurementName(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by CocoaDBMgr::GetEntryError(), and CocoaDBMgr::GetOptAlignInfoFromOptO().
|
staticprivate |
Definition at line 1301 of file Fit.cc.
References gather_cfg::cout, ALIUtils::debug, Entry::OutputValueDimensionFactor(), Entry::type(), Entry::value(), and Entry::valueDisplacementByFitting().
Referenced by dumpFittedValues(), and noFitIterations().
|
staticprivate |
Definition at line 900 of file Fit.cc.
References funct::abs(), AtMatrix, MessageLogger_cfi::cerr, gather_cfg::cout, DaMatrix, ALIUtils::debug, MatrixMeschach::Dump(), FQbigDistanceToMinimum, FQchiSquareWorsened, FQsmallDistanceToMinimum, ALIFileOut::getInstance(), GetSChi2(), cmsPerfSuiteHarvest::now, ALIUtils::report, Model::ReportFName(), ALIUtils::set_time_now(), theFitQualityCut, theNoFitIterations, thePreviousIterationFitQuality, theRelativeFitQualityCut, ALIUtils::time_now(), MatrixMeschach::transpose(), WMatrix, and yfMatrix.
Referenced by fitParameters(), and noFitIterations().
|
static |
Definition at line 71 of file Fit.cc.
References gather_cfg::cout, ALIUtils::debug, Fit(), GlobalOptionMgr::getGlobalOptionValue(), GlobalOptionMgr::getInstance(), ALIUtils::getMaximumDeviationDerivative(), instance, createfilelist::int, MaxNoFitIterations, ALIUtils::setMaximumDeviationDerivative(), theFitQualityCut, theMinDaFactor, and theRelativeFitQualityCut.
Referenced by CocoaAnalyzer::RunCocoa(), and ~Fit().
|
staticprivate |
Definition at line 1674 of file Fit.cc.
References begin, gather_cfg::cout, findQualityFiles::jj, Model::MeasurementList(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by GetAtWAMatrix().
Definition at line 1000 of file Fit.cc.
References AMatrix, AtMatrix, AtWAMatrix, gather_cfg::cout, DaMatrix, ALIUtils::debug, MatrixMeschach::Dump(), MatrixByMatrix(), PrintChi2(), MatrixMeschach::transpose(), WMatrix, and yfMatrix.
Referenced by fitParameters(), getFitQuality(), and noFitIterations().
|
staticprivate |
Definition at line 821 of file Fit.cc.
References AMatrix, AtMatrix, AtWAMatrix, begin, CheckIfFitPossible(), gather_cfg::cout, ALIUtils::debug, MatrixMeschach::Dump(), Model::EntryList(), MatrixMeschach::inverse(), MatrixMeschach::Mat(), cmsPerfSuiteHarvest::now, ALIUtils::set_time_now(), mathSSE::sqrt(), theMinimumEntryQuality, ALIUtils::time_now(), MatrixMeschach::transpose(), WMatrix, and yfMatrix.
Referenced by noFitIterations(), and PropagateErrors().
|
inlinestatic |
Definition at line 96 of file Fit.h.
References addDaMatrixToEntries(), CreateMatrices(), deleteMatrices(), evaluateFitQuality(), FillMatricesWithCalibratedParameters(), FillMatricesWithMeasurements(), getEntryValue(), getFitQuality(), GetSChi2(), cuy::isFirst, multiplyMatrices(), PrintChi2(), setCorrelationFromParamFitted(), setCorrelationsInWMatrix(), substractLastDisplacementToEntries(), theNoFitIterations, and TRUE.
|
static |
Definition at line 1257 of file Fit.cc.
References OpticalObject::centreGlob(), OpticalObject::CoordinateEntryList(), gather_cfg::cout, ALIUtils::debug, dumpEntryAfterFit(), ALIUtils::dumprm(), cuy::ii, OpticalObject::name(), OpticalObject::rmGlob(), and OpticalObject::type().
Referenced by dumpFittedValues(), dumpFittedValuesInAllAncestorFrames(), and ~Fit().
Definition at line 1479 of file Fit.cc.
References begin, gather_cfg::cout, ALIUtils::debug, Model::EntryList(), ALIFileOut::getInstance(), cuy::ii, Model::MeasurementList(), ALIUtils::report, Model::ReportFName(), and theNoFitIterations.
Referenced by GetSChi2(), and noFitIterations().
|
static |
Definition at line 1289 of file Fit.cc.
References OpticalObject::CoordinateEntryList(), dumpEntryAfterFit(), OpticalObject::getRotationAnglesInOptOFrame(), and cuy::ii.
Referenced by dumpFittedValues(), dumpFittedValuesInAllAncestorFrames(), and ~Fit().
|
staticprivate |
Definition at line 446 of file Fit.cc.
References AMatrix, gather_cfg::cout, CreateMatrices(), ALIUtils::debug, MatrixMeschach::Dump(), cmsRelvalreport::exit, FillMatricesWithCalibratedParameters(), FillMatricesWithMeasurements(), ALIUtils::getFirstTime(), GlobalOptionMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), MatrixMeschach::inverse(), MatrixMeschach::MatNonConst(), multiplyMatrices(), cmsPerfSuiteHarvest::now, ALIUtils::set_time_now(), setCorrelationsInWMatrix(), ALIUtils::setFirstTime(), ALIUtils::time_now(), WMatrix, and yfMatrix.
Referenced by redoMatrices(), and ~Fit().
|
staticprivate |
Definition at line 429 of file Fit.cc.
References calculateSimulatedMeasurementsWithOriginalValues(), gather_cfg::cout, ALIUtils::debug, deleteMatrices(), and PropagateErrors().
Referenced by fitParameters(), and ~Fit().
|
staticprivate |
Definition at line 793 of file Fit.cc.
References gather_cfg::cout, Entry::fitPos(), Model::getEntryByName(), MatrixMeschach::NoLines(), and WMatrix.
Referenced by noFitIterations(), and setCorrelationsInWMatrix().
|
staticprivate |
Definition at line 809 of file Fit.cc.
References gather_cfg::cout, MatrixMeschach::SetCorrelation(), and WMatrix.
|
staticprivate |
Definition at line 770 of file Fit.cc.
References corr, gather_cfg::cout, ALIUtils::debug, ErrorCorrelation::getCorrelation(), ErrorCorrelationMgr::getCorrelation(), ErrorCorrelation::getEntry1(), ErrorCorrelation::getEntry2(), ErrorCorrelationMgr::getInstance(), ErrorCorrelationMgr::getNumberOfCorrelations(), cuy::ii, and setCorrelationFromParamFitted().
Referenced by noFitIterations(), and PropagateErrors().
|
static |
Definition at line 364 of file Fit.cc.
References begin, gather_cfg::cout, ALIUtils::debug, Model::EntryList(), GlobalOptionMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), createfilelist::int, and theMinimumEntryQuality.
Referenced by fitNextEvent(), and ~Fit().
|
static |
Definition at line 105 of file Fit.cc.
References NtupleManager::BookNtuple(), gather_cfg::cout, ALIUtils::debug, CocoaDBMgr::DumpCocoaResults(), fitNextEvent(), FittedEntriesManager::getInstance(), GlobalOptionMgr::getInstance(), NtupleManager::getInstance(), CocoaDBMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), FittedEntriesManager::MakeHistos(), nEvent, ALIUtils::setFirstTime(), NtupleManager::WriteNtuple(), and WriteVisualisationFiles().
Referenced by CocoaAnalyzer::RunCocoa(), and ~Fit().
|
staticprivate |
Definition at line 1119 of file Fit.cc.
References begin, gather_cfg::cout, ALIUtils::debug, Model::EntryList(), and theMinimumEntryQuality.
Referenced by fitNextEvent(), and noFitIterations().
|
staticprivate |
Definition at line 338 of file Fit.cc.
References calculateSimulatedMeasurementsWithOriginalValues(), gather_cfg::cout, ALIUtils::debug, cmsRelvalreport::exit, ALIUtils::getFirstTime(), GlobalOptionMgr::getInstance(), and GlobalOptionMgr::GlobalOptions().
Referenced by startFit(), and ~Fit().
|
staticprivate |
Definition at line 160 of file Fit.h.
Referenced by CheckIfFitPossible(), CheckIfMeasIsProportionalToAnother(), CreateMatrices(), deleteMatrices(), dumpMatrices(), FillMatricesWithCalibratedParameters(), FillMatricesWithMeasurements(), GetSChi2(), multiplyMatrices(), and PropagateErrors().
|
staticprivate |
Definition at line 161 of file Fit.h.
Referenced by deleteMatrices(), dumpMatrices(), getFitQuality(), GetSChi2(), and multiplyMatrices().
|
staticprivate |
Definition at line 163 of file Fit.h.
Referenced by deleteMatrices(), dumpEntryAfterFit(), dumpEntryCorrelations(), dumpMatrices(), fitNextEvent(), GetAtWAMatrix(), GetSChi2(), and multiplyMatrices().
|
staticprivate |
Definition at line 165 of file Fit.h.
Referenced by addDaMatrixToEntries(), deleteMatrices(), dumpMatrices(), getFitQuality(), and GetSChi2().
|
staticprivate |
Definition at line 158 of file Fit.h.
Referenced by getInstance(), and production_tasks.Task::getname().
|
staticprivate |
Definition at line 198 of file Fit.h.
Referenced by fitNextEvent(), and getInstance().
|
static |
Definition at line 204 of file Fit.h.
Referenced by CocoaDBMgr::DumpCocoaResults(), startFit(), and ~Fit().
|
staticprivate |
Definition at line 190 of file Fit.h.
Referenced by getFitQuality(), and getInstance().
|
staticprivate |
Definition at line 201 of file Fit.h.
Referenced by fitNextEvent(), and getInstance().
|
staticprivate |
Definition at line 184 of file Fit.h.
Referenced by addDaMatrixToEntries(), CreateMatrices(), dumpEntryAfterFit(), FillMatricesWithMeasurements(), multiplyMatrices(), setFittableEntries(), and substractLastDisplacementToEntries().
|
staticprivate |
Definition at line 196 of file Fit.h.
Referenced by dumpMatrices(), fitNextEvent(), fitParameters(), getFitQuality(), noFitIterations(), and PrintChi2().
|
staticprivate |
Definition at line 187 of file Fit.h.
Referenced by fitParameters(), and getFitQuality().
|
staticprivate |
Definition at line 193 of file Fit.h.
Referenced by getFitQuality(), and getInstance().
|
staticprivate |
Definition at line 162 of file Fit.h.
Referenced by CreateMatrices(), deleteMatrices(), dumpMatrices(), FillMatricesWithCalibratedParameters(), FillMatricesWithMeasurements(), getFitQuality(), GetSChi2(), multiplyMatrices(), PropagateErrors(), and setCorrelationFromParamFitted().
|
staticprivate |
Definition at line 170 of file Fit.h.
Referenced by CreateMatrices(), deleteMatrices(), dumpMatrices(), FillMatricesWithCalibratedParameters(), FillMatricesWithMeasurements(), getFitQuality(), GetSChi2(), multiplyMatrices(), and PropagateErrors().