#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 ALIint fit_pos1, const ALIint fit_pos2, ALIdouble correl) |
static void | setCorrelationFromParamFitted (const pss &entry1, const pss &entry2, 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 = nullptr |
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 |
|
staticprivate |
Definition at line 1105 of file Fit.cc.
References gather_cfg::cout, DaMatrix, ALIUtils::debug, MatrixMeschach::Dump(), Model::EntryList(), and theMinimumEntryQuality.
Referenced by fitNextEvent().
|
static |
Definition at line 532 of file Fit.cc.
References gather_cfg::cout, ALIUtils::debug, Model::MeasurementList(), and DeviationsFromFileSensor2D::setApply().
Referenced by fitNextEvent(), redoMatrices(), and WriteVisualisationFiles().
|
staticprivate |
Definition at line 1588 of file Fit.cc.
References funct::abs(), ALI_DBL_MIN, AMatrix, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, gather_cfg::cout, ALIUtils::debug, Model::EntryList(), Exception, FALSE, cuy::ii, Model::MeasurementList(), MatrixMeschach::NoLines(), and TRUE.
Referenced by multiplyMatrices().
|
staticprivate |
Definition at line 1681 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().
|
staticprivate |
Definition at line 570 of file Fit.cc.
References AMatrix, gather_cfg::cout, ALIUtils::debug, Model::EntryList(), GlobalOptionMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), Model::MeasurementList(), theMinimumEntryQuality, WMatrix, and yfMatrix.
Referenced by PropagateErrors().
|
staticprivate |
Definition at line 553 of file Fit.cc.
References AMatrix, AtMatrix, AtWAMatrix, DaMatrix, WMatrix, and yfMatrix.
Referenced by redoMatrices().
|
static |
Definition at line 1365 of file Fit.cc.
References funct::abs(), AtWAMatrix, gather_cfg::cout, ALIUtils::debug, mps_splice::entry, MatrixMeschach::Mat(), ALIUtils::report, mathSSE::sqrt(), and theMinimumEntryQuality.
Referenced by dumpFittedValues(), printCentreInOptOFrame(), and printRotationAnglesInOptOFrame().
|
static |
Definition at line 1415 of file Fit.cc.
References funct::abs(), AtWAMatrix, alignCSCRings::corr, gather_cfg::cout, ALIUtils::debug, OpticalObjectMgr::dumpOptOs(), Model::EntryList(), OpticalObjectMgr::getInstance(), testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, MatrixMeschach::Mat(), mathSSE::sqrt(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by dumpFittedValues().
|
static |
Definition at line 1185 of file Fit.cc.
References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, gather_cfg::cout, ALIUtils::debug, dumpEntryAfterFit(), dumpEntryCorrelations(), getEntryValue(), cuy::ii, Model::OptOList(), OpticalObject::parent(), printCentreInOptOFrame(), and printRotationAnglesInOptOFrame().
Referenced by fitNextEvent().
|
static |
Definition at line 1251 of file Fit.cc.
References OpticalObject::longName(), Model::OptOList(), OpticalObject::parent(), printCentreInOptOFrame(), and printRotationAnglesInOptOFrame().
Referenced by fitNextEvent().
|
static |
Definition at line 1467 of file Fit.cc.
References AMatrix, AtMatrix, AtWAMatrix, DaMatrix, ALIFileOut::getInstance(), Model::MatricesFName(), MatrixMeschach::ostrDump(), theNoFitIterations, WMatrix, and yfMatrix.
Referenced by fitNextEvent().
|
staticprivate |
|
staticprivate |
Definition at line 724 of file Fit.cc.
References MatrixMeschach::AddData(), AMatrix, gather_cfg::cout, ALIUtils::debug, Model::EntryList(), GlobalOptionMgr::getGlobalOptionValue(), GlobalOptionMgr::getInstance(), Model::MeasurementList(), WMatrix, and yfMatrix.
Referenced by PropagateErrors().
|
staticprivate |
Definition at line 638 of file Fit.cc.
References MatrixMeschach::AddData(), AMatrix, Measurement::cameraScaleFactor, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, gather_cfg::cout, ALIUtils::debug, MatrixMeschach::Dump(), findQualityFiles::jj, Model::MeasurementList(), theMinimumEntryQuality, WMatrix, and yfMatrix.
Referenced by PropagateErrors().
|
static |
Definition at line 1487 of file Fit.cc.
References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, OpticalObject::CoordinateEntryList(), beamvalidation::exit(), OpticalObject::ExtraEntryList(), and Model::getOptOByName().
Definition at line 144 of file Fit.cc.
References addDaMatrixToEntries(), FittedEntriesManager::AddFittedEntriesSet(), AtWAMatrix, calculateSimulatedMeasurementsWithOriginalValues(), EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::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(), callgrindSwitch_cfi::lastEvent, MaxNoFitIterations, nEvent, Measurement::only1, Model::OptOList(), FittedEntriesReader::readFittedEntriesFromFile(), CocoaDaqReader::ReadNextEvent(), ALIUtils::report, Model::ReportFName(), Model::setCocoaStatus(), setFittableEntries(), substractLastDisplacementToEntries(), theMinDaFactor, theNoFitIterations, and TRUE.
Referenced by startFit().
|
staticprivate |
Definition at line 407 of file Fit.cc.
References COCOA_FirstIterationInEvent, gather_cfg::cout, ALIUtils::debug, beamvalidation::exit(), Model::getCocoaStatus(), getFitQuality(), GlobalOptionMgr::getInstance(), GetSChi2(), GlobalOptionMgr::GlobalOptions(), redoMatrices(), theNoFitIterations, and thePreviousIterationFitQuality.
Referenced by fitNextEvent().
|
inlinestatic |
|
staticprivate |
Definition at line 1347 of file Fit.cc.
References gather_cfg::cout, ALIUtils::debug, and mps_splice::entry.
Referenced by dumpFittedValues().
|
staticprivate |
Definition at line 915 of file Fit.cc.
References funct::abs(), AtMatrix, EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, gather_cfg::cout, DaMatrix, ALIUtils::debug, MatrixMeschach::Dump(), FQbigDistanceToMinimum, FQchiSquareWorsened, FQsmallDistanceToMinimum, ALIFileOut::getInstance(), GetSChi2(), submitPVValidationJobs::now, ALIUtils::report, Model::ReportFName(), ALIUtils::set_time_now(), theFitQualityCut, theNoFitIterations, thePreviousIterationFitQuality, theRelativeFitQualityCut, ALIUtils::time_now(), MatrixMeschach::transpose(), WMatrix, and yfMatrix.
Referenced by fitParameters().
|
static |
Definition at line 69 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().
|
staticprivate |
Definition at line 1734 of file Fit.cc.
References gather_cfg::cout, findQualityFiles::jj, Model::MeasurementList(), and AlCaHLTBitMon_QueryRunRegistry::string.
Definition at line 1034 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(), and getFitQuality().
|
staticprivate |
Definition at line 830 of file Fit.cc.
References AMatrix, AtMatrix, AtWAMatrix, CheckIfFitPossible(), gather_cfg::cout, ALIUtils::debug, MatrixMeschach::Dump(), Model::EntryList(), MatrixMeschach::inverse(), MatrixMeschach::Mat(), submitPVValidationJobs::now, ALIUtils::set_time_now(), mathSSE::sqrt(), theMinimumEntryQuality, ALIUtils::time_now(), MatrixMeschach::transpose(), WMatrix, and yfMatrix.
Referenced by PropagateErrors().
|
inlinestatic |
|
static |
Definition at line 1297 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(), and dumpFittedValuesInAllAncestorFrames().
Definition at line 1517 of file Fit.cc.
References gather_cfg::cout, ALIUtils::debug, Model::EntryList(), ALIFileOut::getInstance(), cuy::ii, cuy::isFirst, Model::MeasurementList(), ALIUtils::report, Model::ReportFName(), and theNoFitIterations.
Referenced by GetSChi2().
|
static |
Definition at line 1332 of file Fit.cc.
References OpticalObject::CoordinateEntryList(), dumpEntryAfterFit(), OpticalObject::getRotationAnglesInOptOFrame(), and cuy::ii.
Referenced by dumpFittedValues(), and dumpFittedValuesInAllAncestorFrames().
|
staticprivate |
Definition at line 457 of file Fit.cc.
References AMatrix, gather_cfg::cout, CreateMatrices(), ALIUtils::debug, MatrixMeschach::Dump(), beamvalidation::exit(), FillMatricesWithCalibratedParameters(), FillMatricesWithMeasurements(), ALIUtils::getFirstTime(), GlobalOptionMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), MatrixMeschach::inverse(), MatrixMeschach::MatNonConst(), multiplyMatrices(), submitPVValidationJobs::now, ALIUtils::set_time_now(), setCorrelationsInWMatrix(), ALIUtils::setFirstTime(), ALIUtils::time_now(), WMatrix, and yfMatrix.
Referenced by redoMatrices().
|
staticprivate |
Definition at line 442 of file Fit.cc.
References calculateSimulatedMeasurementsWithOriginalValues(), gather_cfg::cout, ALIUtils::debug, deleteMatrices(), and PropagateErrors().
Referenced by fitParameters().
|
staticprivate |
Definition at line 820 of file Fit.cc.
References gather_cfg::cout, MatrixMeschach::SetCorrelation(), and WMatrix.
|
staticprivate |
Definition at line 808 of file Fit.cc.
References gather_cfg::cout, Entry::fitPos(), Model::getEntryByName(), MatrixMeschach::NoLines(), and WMatrix.
Referenced by setCorrelationsInWMatrix().
|
staticprivate |
Definition at line 786 of file Fit.cc.
References alignCSCRings::corr, gather_cfg::cout, ALIUtils::debug, ErrorCorrelationMgr::getCorrelation(), ErrorCorrelationMgr::getInstance(), ErrorCorrelationMgr::getNumberOfCorrelations(), cuy::ii, and setCorrelationFromParamFitted().
Referenced by PropagateErrors().
|
static |
Definition at line 382 of file Fit.cc.
References gather_cfg::cout, ALIUtils::debug, Model::EntryList(), GlobalOptionMgr::getInstance(), GlobalOptionMgr::GlobalOptions(), createfilelist::int, and theMinimumEntryQuality.
Referenced by fitNextEvent().
|
static |
Definition at line 103 of file Fit.cc.
References trklet::bend(), 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().
|
staticprivate |
Definition at line 1159 of file Fit.cc.
References gather_cfg::cout, ALIUtils::debug, Model::EntryList(), DQMScaleToClient_cfi::factor, and theMinimumEntryQuality.
Referenced by fitNextEvent().
|
staticprivate |
Definition at line 354 of file Fit.cc.
References calculateSimulatedMeasurementsWithOriginalValues(), gather_cfg::cout, ALIUtils::debug, beamvalidation::exit(), ALIUtils::getFirstTime(), GlobalOptionMgr::getInstance(), and GlobalOptionMgr::GlobalOptions().
Referenced by startFit().
|
staticprivate |
Definition at line 164 of file Fit.h.
Referenced by CheckIfFitPossible(), CheckIfMeasIsProportionalToAnother(), CreateMatrices(), deleteMatrices(), dumpMatrices(), FillMatricesWithCalibratedParameters(), FillMatricesWithMeasurements(), GetSChi2(), multiplyMatrices(), and PropagateErrors().
|
staticprivate |
Definition at line 165 of file Fit.h.
Referenced by deleteMatrices(), dumpMatrices(), getFitQuality(), GetSChi2(), and multiplyMatrices().
|
staticprivate |
Definition at line 167 of file Fit.h.
Referenced by deleteMatrices(), dumpEntryAfterFit(), dumpEntryCorrelations(), dumpMatrices(), fitNextEvent(), GetAtWAMatrix(), GetSChi2(), and multiplyMatrices().
|
staticprivate |
Definition at line 169 of file Fit.h.
Referenced by addDaMatrixToEntries(), deleteMatrices(), dumpMatrices(), getFitQuality(), and GetSChi2().
|
staticprivate |
Definition at line 162 of file Fit.h.
Referenced by getInstance(), and production_tasks.Task::getname().
|
staticprivate |
Definition at line 202 of file Fit.h.
Referenced by fitNextEvent(), and getInstance().
|
static |
Definition at line 208 of file Fit.h.
Referenced by CocoaDBMgr::DumpCocoaResults(), fitNextEvent(), and startFit().
|
staticprivate |
Definition at line 194 of file Fit.h.
Referenced by getFitQuality(), and getInstance().
|
staticprivate |
Definition at line 205 of file Fit.h.
Referenced by fitNextEvent(), and getInstance().
|
staticprivate |
Definition at line 188 of file Fit.h.
Referenced by addDaMatrixToEntries(), CreateMatrices(), dumpEntryAfterFit(), FillMatricesWithMeasurements(), multiplyMatrices(), setFittableEntries(), and substractLastDisplacementToEntries().
|
staticprivate |
Definition at line 200 of file Fit.h.
Referenced by dumpMatrices(), fitNextEvent(), fitParameters(), getFitQuality(), noFitIterations(), and PrintChi2().
|
staticprivate |
Definition at line 191 of file Fit.h.
Referenced by fitParameters(), and getFitQuality().
|
staticprivate |
Definition at line 197 of file Fit.h.
Referenced by getFitQuality(), and getInstance().
|
staticprivate |
Definition at line 166 of file Fit.h.
Referenced by CreateMatrices(), deleteMatrices(), dumpMatrices(), FillMatricesWithCalibratedParameters(), FillMatricesWithMeasurements(), getFitQuality(), GetSChi2(), multiplyMatrices(), PropagateErrors(), and setCorrelationFromParamFitted().
|
staticprivate |
Definition at line 174 of file Fit.h.
Referenced by CreateMatrices(), deleteMatrices(), dumpMatrices(), FillMatricesWithCalibratedParameters(), FillMatricesWithMeasurements(), getFitQuality(), GetSChi2(), multiplyMatrices(), and PropagateErrors().