#include <Model.h>
Public Member Functions | |
void | BuildMeasurementsFromOA (OpticalAlignMeasurements &measList) |
void | BuildSystemDescriptionFromOA (OpticalAlignments &optAlig) |
void | CMSLinkFit (ALIint cmslink) |
*************** FOR CMS LINK SYSTEM (to fit it part by part) More... | |
OpticalAlignInfo | FindOptAlignInfoByType (const ALIstring &type) |
Model () | |
~Model () | |
Static Public Member Functions | |
static void | addEntryToList (Entry *entry) |
***************** SET DATA MEMBERS More... | |
static void | addMeasurementToList (Measurement *measadd) |
static ALIbool | createCopyComponentList (const ALIstring &optoname) |
**************** FOR COPYING AN OPTO More... | |
static std::vector< Entry * > & | EntryList () |
static cocoaStatus | getCocoaStatus () |
static ALIbool | getComponentOptOs (const ALIstring &opto_name, std::vector< OpticalObject *> &vcomponents) |
--— Get from theOptOList the list of pointers to component OptOs More... | |
static ALIbool | getComponentOptOTypes (const ALIstring &opto_type, std::vector< ALIstring > &vcomponents) |
--— Get from theOptODictionary the list of component OptO types More... | |
static Entry * | getEntryByName (const ALIstring &opto_name, const ALIstring &entry_name) |
--— Search an Entry name in the Entry* list and return a pointer to it More... | |
static Entry * | getEntryByName (const ALIstring &opto_entry_name) |
static FittedEntriesReader * | getFittedEntriesReader () |
static Model & | getInstance () |
-------— Gets the only instance of this class More... | |
static Measurement * | getMeasurementByName (const ALIstring &name, ALIbool exists=true) |
static std::vector< OpticalAlignInfo > | getOpticalAlignments () |
static OpticalObject * | getOptOByName (const ALIstring &opto_name) |
--— Find an OptO name in theOptOList and return a pointer to it More... | |
static OpticalObject * | getOptOByType (const ALIstring &type) |
--— Find the first OptO of type 'opto_type' in theOptOList and return a pointer to it More... | |
static int | getParameterValue (const ALIstring &sstr, ALIdouble &val) |
************ ACCESS INFO FROM STATIC DATA More... | |
static ALIdouble | getParamFittedSigmaVectorItem (const ALIuint position) |
static ALIstring & | MatricesFName () |
the name of the File for storing the matrices More... | |
static ALIstring & | MeasFName () |
the name of the Measurements File More... | |
static std::vector< Measurement * > & | MeasurementList () |
static struct tm & | MeasurementsTime () |
static OpticalObject * | nextOptOToCopy () |
static std::vector< std::vector< ALIstring > > & | OptODictionary () |
ACCESS STATIC DATA MEMBERS. More... | |
static std::vector< OpticalObject * > & | OptOList () |
static std::string | printCocoaStatus (const cocoaStatus cs) |
static ALIbool | readMeasurementsFromFile (ALIstring only1Date=ALIstring(""), ALIstring only1Time=ALIstring("")) |
static void | readSystemDescription () |
-------— Read the different sections of the SDF and act accordingly More... | |
static ALIstring & | ReportFName () |
the name of the report File More... | |
static ALIstring & | SDFName () |
the name of the System Description File More... | |
static void | setCocoaStatus (const cocoaStatus cs) |
static void | setMatricesFName (const ALIstring &name) |
static void | setMeasurementsTime (struct tm &tim) |
static void | setReportFName (const ALIstring &name) |
static void | setSDFName (const ALIstring &name) |
Static Public Attributes | |
static std::vector< ALIdouble > | CMSLinkRangeDetValue |
static ALIint | Ncmslinkrange = 0 |
*************** FOR RANGE STUDIES More... | |
Private Member Functions | |
void | CMSLinkCleanModel () |
Static Private Member Functions | |
static void | buildMeasurementsLinksToOptOs () |
Read Measurements (to be implemented for reading from an external file the DATA of the measurements) More... | |
static void | cleanParamFittedSigmaVector () |
static void | cleanParamFittedValueDisplacementMap () |
static void | CMSLinkDeleteOptOs () |
static void | CMSLinkRecoverParamFittedSigma (ALIint cmslink) |
static void | CMSLinkRecoverParamFittedValueDisplacement (ALIint cmslink) |
static void | CMSLinkSaveParamFittedSigma (ALIint cmslink) |
static void | CMSLinkSaveParamFittedValueDisplacement (ALIint cmslink) |
static void | copyMeasurements (const std::vector< ALIstring > &wl) |
static void | deleteOptO (const ALIstring &opto_name) |
static void | deleteOptO (OpticalObject *opto) |
static ALIbool | fillCopyComponentList (const OpticalObject *opto) |
static void | recoverParamFittedSigma (const ALIstring &opto_name, const ALIstring &entry_name, const ALIuint position) |
static void | reorderOptODictionary (const ALIstring &ssearch, std::vector< std::vector< ALIstring > > &OptODictionary2) |
********** private METHODS More... | |
static void | saveParamFittedCorrelation (const ALIstring &opto_name1, const ALIstring &entry_name1, const ALIstring &opto_name2, const ALIstring &entry_name2) |
static void | saveParamFittedSigma (const ALIstring &opto_name, const ALIstring &entry_name) |
static void | SetValueDisplacementsFromReportOut () |
Static Private Attributes | |
static ALIint | CMSLinkIteration = 0 |
static cocoaStatus | theCocoaStatus = COCOA_Init |
static std::vector< Entry * > | theEntryVector |
std::vector of all Entries More... | |
static FittedEntriesReader * | theFittedEntriesReader = nullptr |
static Model * | theInstance = nullptr |
static ALIstring | theMatricesFName = "matrices.out" |
the name of the File for storing the matrices More... | |
static ALIstring | theMeasFName = "Measurements.txt" |
the name of the Measurements File More... | |
static struct tm | theMeasurementsTime |
static std::vector< Measurement * > | theMeasurementVector |
std::vector of all Measurements More... | |
static std::vector< OpticalAlignInfo > | theOpticalAlignments |
static std::vector< std::vector< ALIstring > > | theOptODictionary |
parameters More... | |
static std::vector< OpticalObject * > | theOptOList |
map of OptO*/type of parent OptO, for navigation down the tree structure More... | |
static std::vector< OpticalObject * > | theOptOsToCopyList |
static std::vector< OpticalObject * >::const_iterator | theOptOsToCopyListIterator |
static std::vector< ALIdouble > | theParamFittedSigmaVector |
static std::map< ALIstring, ALIdouble, std::less< ALIstring > > | theParamFittedValueDisplacementMap |
static ALIstring | theReportFName = "report.out" |
the name of the report File More... | |
static ALIstring | theSDFName = "SystemDescription.txt" |
the name of the System Description File More... | |
Model::Model | ( | ) |
|
inlinestatic |
***************** SET DATA MEMBERS
Definition at line 140 of file Model.h.
References mps_splice::entry, and theEntryVector.
Referenced by OpticalObject::fillCoordinateEntry(), OpticalObject::fillExtraEntry(), and OpticalObject::setAnglesNull().
|
inlinestatic |
Definition at line 145 of file Model.h.
References theMeasurementVector.
Referenced by Measurement::postConstruct().
void Model::BuildMeasurementsFromOA | ( | OpticalAlignMeasurements & | measList | ) |
Definition at line 1569 of file Model.cc.
References DMR_cfg::cerr, Measurement::constructFromOA(), gather_cfg::cout, ALIUtils::debug, cppFunctionSkipper::exception, OpticalAlignMeasurements::oaMeasurements_, and AlCaHLTBitMon_QueryRunRegistry::string.
|
staticprivate |
Read Measurements (to be implemented for reading from an external file the DATA of the measurements)
Build for each measuremnt its link to the OptO that take part in it
Definition at line 537 of file Model.cc.
Referenced by readSystemDescription().
void Model::BuildSystemDescriptionFromOA | ( | OpticalAlignments & | optAlig | ) |
Definition at line 1528 of file Model.cc.
References OpticalObject::constructFromOptAligInfo(), OpticalAlignInfo::name_, and OpticalAlignments::opticalAlignments().
|
inlinestaticprivate |
Definition at line 257 of file Model.h.
References cuy::ii, and theParamFittedSigmaVector.
|
inlinestaticprivate |
Definition at line 264 of file Model.h.
References theParamFittedValueDisplacementMap.
|
private |
Definition at line 856 of file Model.cc.
References cuy::ii.
|
staticprivate |
Definition at line 868 of file Model.cc.
References cms::cuda::assert(), CMSLinkIteration, gather_cfg::cout, ALIUtils::debug, GlobalOptionMgr::getGlobalOptionValue(), and GlobalOptionMgr::getInstance().
void Model::CMSLinkFit | ( | ALIint | cmslink | ) |
*************** FOR CMS LINK SYSTEM (to fit it part by part)
Definition at line 800 of file Model.cc.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
Definition at line 1411 of file Model.cc.
References ALIUtils::changeName(), Measurement::copyMeas(), gather_cfg::cout, Exception, spr::find(), Measurement::name(), mps_merge::newName, AlCaHLTBitMon_QueryRunRegistry::string, Measurement::type(), and LaserClient_cfi::wl.
**************** FOR COPYING AN OPTO
Definition at line 742 of file Model.cc.
References gather_cfg::cout, and ALIUtils::debug.
Referenced by OpticalObject::createComponentOptOs().
|
staticprivate |
Definition at line 1102 of file Model.cc.
|
staticprivate |
Definition at line 1110 of file Model.cc.
References OpticalObject::CoordinateEntryList(), gather_cfg::cout, ALIUtils::debug, OpticalObject::ExtraEntryList(), spr::find(), and OpticalObject::name().
|
inlinestatic |
Definition at line 86 of file Model.h.
References theEntryVector.
Referenced by Fit::addDaMatrixToEntries(), Fit::CheckIfFitPossible(), Fit::CreateMatrices(), Fit::dumpEntryCorrelations(), NtupleManager::FillChi2(), FittedEntriesSet::FillCorrelations(), FittedEntriesSet::FillEntries(), NtupleManager::FillFitParameters(), Fit::FillMatricesWithCalibratedParameters(), Fit::fitNextEvent(), Fit::multiplyMatrices(), Fit::PrintChi2(), Fit::setFittableEntries(), SetValueDisplacementsFromReportOut(), and Fit::substractLastDisplacementToEntries().
|
staticprivate |
Definition at line 762 of file Model.cc.
References gather_cfg::cout, ALIUtils::debug, and OpticalObject::name().
OpticalAlignInfo Model::FindOptAlignInfoByType | ( | const ALIstring & | type | ) |
Definition at line 1543 of file Model.cc.
References DMR_cfg::cerr, cppFunctionSkipper::exception, and OpticalAlignInfo::name_.
|
inlinestatic |
Definition at line 63 of file Model.h.
References theCocoaStatus.
Referenced by Fit::fitParameters().
|
static |
--— Get from theOptOList the list of pointers to component OptOs
Definition at line 697 of file Model.cc.
References gather_cfg::cout, ALIUtils::debug, and OpticalObject::name().
Referenced by OpticalObject::displaceCentreGlob(), OpticalObject::displaceCentreGlobOriginal(), OpticalObject::displaceCentreGlobOriginalOriginal(), OpticalObject::displaceRmGlobAroundGlobal(), OpticalObject::displaceRmGlobAroundLocal(), OpticalObject::displaceRmGlobOriginal(), OpticalObject::displaceRmGlobOriginalOriginal(), OpticalObject::propagateGlobalRMOriginalOriginalChangeToChildren(), OpticalObject::resetGlobalCoordinates(), OpticalObject::resetOriginalOriginalCoordinates(), OpticalObject::setGlobalCoordinatesOfComponents(), and OpticalObject::setGlobalRMOriginalOriginal().
|
static |
--— Get from theOptODictionary the list of component OptO types
Definition at line 666 of file Model.cc.
Referenced by OpticalObject::createComponentOptOs().
--— Search an Entry name in the Entry* list and return a pointer to it
Definition at line 615 of file Model.cc.
References DMR_cfg::cerr, gather_cfg::cout, ALIUtils::debug, and beamvalidation::exit().
Referenced by MeasurementDiffEntry::calculateSimulatedValue(), FittedEntry::FittedEntry(), getEntryByName(), FittedEntriesReader::readFittedEntriesFromFile(), Fit::setCorrelationFromParamFitted(), and FittedEntriesSet::SetOptOEntries().
--— Search an Entry from the full entry path (first substract the name of the OptO and then look in the Entry* list)
Definition at line 120 of file Model.h.
References mps_splice::entry, and getEntryByName().
|
inlinestatic |
Definition at line 254 of file Model.h.
References theFittedEntriesReader.
Referenced by Fit::fitNextEvent().
|
static |
-------— Gets the only instance of this class
Definition at line 80 of file Model.cc.
Referenced by CocoaAnalyzer::runCocoa().
|
static |
Definition at line 633 of file Model.cc.
References DMR_cfg::cerr.
|
inlinestatic |
Definition at line 137 of file Model.h.
References theOpticalAlignments.
Referenced by OpticalObject::createComponentOptOsFromOptAlignInfo().
|
static |
--— Find an OptO name in theOptOList and return a pointer to it
Definition at line 562 of file Model.cc.
References DMR_cfg::cerr, gather_cfg::cout, ALIUtils::debug, and beamvalidation::exit().
Referenced by Measurement::buildOptOList(), Fit::findEntryFitPosition(), and FittedEntriesSet::SetOptOEntries().
|
static |
--— Find the first OptO of type 'opto_type' in theOptOList and return a pointer to it
Definition at line 593 of file Model.cc.
References DMR_cfg::cerr, and beamvalidation::exit().
************ ACCESS INFO FROM STATIC DATA
--— Search a string in theParameters and return 1 if found
Definition at line 552 of file Model.cc.
References ParameterMgr::getInstance(), ParameterMgr::getParameterValue(), and heppy_batch::val.
Definition at line 1267 of file Model.cc.
References DMR_cfg::cerr, beamvalidation::exit(), and position.
|
inlinestatic |
the name of the File for storing the matrices
Definition at line 102 of file Model.h.
References theMatricesFName.
Referenced by Fit::dumpMatrices().
|
inlinestatic |
the name of the Measurements File
Definition at line 96 of file Model.h.
References theMeasFName.
|
inlinestatic |
Definition at line 88 of file Model.h.
References theMeasurementVector.
Referenced by CocoaDaqReaderRoot::BuildMeasurementsFromOptAlign(), Fit::calculateSimulatedMeasurementsWithOriginalValues(), Fit::CheckIfFitPossible(), Fit::CreateMatrices(), OptOSensor2D::fastTraversesLightRay(), NtupleManager::FillChi2(), Fit::FillMatricesWithCalibratedParameters(), Fit::FillMatricesWithMeasurements(), NtupleManager::FillMeasurements(), Fit::GetMeasurementName(), CocoaToDDLMgr::measurementsAsSpecPars(), Measurement::postConstruct(), Fit::PrintChi2(), readMeasurementsFromFile(), and CocoaDaqReaderText::ReadNextEvent().
|
inlinestatic |
|
static |
Definition at line 788 of file Model.cc.
References gather_cfg::cout, and ALIUtils::debug.
Referenced by OpticalObject::copyData().
|
inlinestatic |
ACCESS STATIC DATA MEMBERS.
Definition at line 82 of file Model.h.
References theOptODictionary.
Referenced by readSystemDescription().
|
inlinestatic |
Definition at line 84 of file Model.h.
References theOptOList.
Referenced by CocoaDBMgr::BuildAlignments(), CocoaDBMgr::BuildOpticalAlignments(), OpticalObject::createComponentOptOs(), OpticalObject::createComponentOptOsFromOptAlignInfo(), Fit::dumpFittedValues(), Fit::dumpFittedValuesInAllAncestorFrames(), OpticalObjectMgr::dumpOptOs(), NtupleManager::FillOptObjects(), Fit::fitNextEvent(), FittedEntriesManager::GetDifferentBetweenLasers(), CocoaToDDLMgr::writeLogicalVolumes(), CocoaToDDLMgr::writeMaterials(), CocoaToDDLMgr::writePhysicalVolumes(), CocoaToDDLMgr::writeSolids(), CocoaToDDLMgr::writeSpecPars(), and CocoaToDDLMgr::writeSpecParsCocoa().
|
static |
Definition at line 1503 of file Model.cc.
References COCOA_FitCannotImprove, COCOA_FitChi2Worsened, COCOA_FitImproving, COCOA_FitMatrixNonInversable, COCOA_FitOK, COCOA_Init, COCOA_InitFit, COCOA_ReadingModel, callgraph::cs, str, and AlCaHLTBitMon_QueryRunRegistry::string.
|
static |
Definition at line 1281 of file Model.cc.
References DMR_cfg::cerr, Measurement::correctValueAndSigma(), gather_cfg::cout, ALIUtils::debug, Measurement::dim(), ALIUtils::dumpVS(), relativeConstraints::empty, mps_fire::end, ALIFileIn::eof(), ALIFileIn::ErrorInLine(), beamvalidation::exit(), Measurement::fillData(), GlobalOptionMgr::getInstance(), ALIFileIn::getInstance(), ALIFileIn::getWordsInLine(), GlobalOptionMgr::GlobalOptions(), cuy::ii, MeasurementList(), Measurement::measurementsFileName(), heppy_report::oname, Measurement::only1, Measurement::only1Date, Measurement::only1Time, Measurement::setCurrentDate(), Measurement::setSigma(), Measurement::sigma(), and Measurement::valueType().
|
static |
-------— Read the different sections of the SDF and act accordingly
Definition at line 97 of file Model.cc.
References ParameterMgr::addParameter(), ParameterMgr::addRandomFlatParameter(), ParameterMgr::addRandomGaussParameter(), cms::cuda::assert(), buildMeasurementsLinksToOptOs(), DMR_cfg::cerr, ALIFileIn::close(), COCOA_Init, Measurement::construct(), OpticalObject::construct(), filterCSVwithJSON::copy, gather_cfg::cout, ALIUtils::debug, ALIUtils::dumpVS(), relativeConstraints::empty, mps_fire::end, ALIFileIn::eof(), ALIFileIn::ErrorInLine(), beamvalidation::exit(), spr::find(), ALIUtils::getFloat(), EntryMgr::getInstance(), ParameterMgr::getInstance(), ErrorCorrelationMgr::getInstance(), GlobalOptionMgr::getInstance(), ALIFileIn::getInstance(), ALIUtils::getInt(), ALIFileIn::getWordsInLine(), cuy::ii, ALIUtils::IsNumber(), ALIFileIn::nline(), Measurement::only1, Measurement::only1Date, Measurement::only1Time, OptODictionary(), EntryMgr::readEntryFromReportOut(), ErrorCorrelationMgr::readFromReportFile(), SDFName(), sectGlobalOptions, sectMeasurements, sectParameters, sectReportOut, sectSystemTreeData, sectSystemTreeDescription, ALIUtils::SetAngleDimensionFactors(), setCocoaStatus(), Measurement::setConversionFactor(), GlobalOptionMgr::setGlobalOption(), ALIUtils::SetLengthDimensionFactors(), ALIUtils::SetOutputAngleDimensionFactors(), ALIUtils::SetOutputLengthDimensionFactors(), and ParameterMgr::setRandomSeed().
|
staticprivate |
|
staticprivate |
********** private METHODS
Reorder the list of OptOs in a hierarchical structure (tree-like)
Definition at line 504 of file Model.cc.
|
inlinestatic |
the name of the report File
Definition at line 99 of file Model.h.
References theReportFName.
Referenced by Fit::fitNextEvent(), Fit::getFitQuality(), Fit::PrintChi2(), and CocoaAnalyzer::runCocoa().
|
staticprivate |
|
staticprivate |
|
inlinestatic |
the name of the System Description File
Definition at line 93 of file Model.h.
References theSDFName.
Referenced by MeasurementDiffEntry::buildOptONamesList(), Measurement::construct(), OpticalObject::construct(), Entry::fill(), Entry::fillFromInputFileQuality(), Entry::fillFromInputFileSigma(), Entry::fillFromInputFileValue(), and readSystemDescription().
|
inlinestatic |
Definition at line 64 of file Model.h.
References callgraph::cs, and theCocoaStatus.
Referenced by Fit::fitNextEvent(), and readSystemDescription().
|
inlinestatic |
Definition at line 155 of file Model.h.
References Skims_PA_cff::name, and theMatricesFName.
|
inlinestatic |
|
inlinestatic |
Definition at line 153 of file Model.h.
References Skims_PA_cff::name, and theReportFName.
|
inlinestatic |
Definition at line 151 of file Model.h.
References Skims_PA_cff::name, and theSDFName.
|
staticprivate |
Definition at line 1481 of file Model.cc.
References gather_cfg::cout, ALIUtils::debug, EntryList(), EntryMgr::findEntryByLongName(), EntryMgr::getInstance(), EntryMgr::numberOfEntries(), and EntryData::valueDisplacement().
|
staticprivate |
Definition at line 237 of file Model.h.
Referenced by CMSLinkDeleteOptOs().
|
static |
|
staticprivate |
Definition at line 272 of file Model.h.
Referenced by getCocoaStatus(), and setCocoaStatus().
|
staticprivate |
std::vector of all Entries
Definition at line 191 of file Model.h.
Referenced by addEntryToList(), and EntryList().
|
staticprivate |
Definition at line 280 of file Model.h.
Referenced by getFittedEntriesReader().
|
staticprivate |
the name of the File for storing the matrices
Definition at line 203 of file Model.h.
Referenced by MatricesFName(), and setMatricesFName().
|
staticprivate |
the name of the Measurements File
Definition at line 199 of file Model.h.
Referenced by MeasFName().
|
staticprivate |
Definition at line 278 of file Model.h.
Referenced by MeasurementsTime(), and setMeasurementsTime().
|
staticprivate |
std::vector of all Measurements
Definition at line 194 of file Model.h.
Referenced by addMeasurementToList(), and MeasurementList().
|
staticprivate |
Definition at line 282 of file Model.h.
Referenced by getOpticalAlignments().
|
staticprivate |
parameters
std::vector of OptOs with components (in tree structure)
Definition at line 182 of file Model.h.
Referenced by OptODictionary().
|
staticprivate |
map of OptO*/type of parent OptO, for navigation down the tree structure
map of OptO*/name of OptO for quick search based on name
Definition at line 188 of file Model.h.
Referenced by OptOList().
|
staticprivate |
|
staticprivate |
|
staticprivate |
Definition at line 274 of file Model.h.
Referenced by cleanParamFittedSigmaVector().
|
staticprivate |
Definition at line 276 of file Model.h.
Referenced by cleanParamFittedValueDisplacementMap().
|
staticprivate |
the name of the report File
Definition at line 201 of file Model.h.
Referenced by ReportFName(), and setReportFName().
|
staticprivate |
the name of the System Description File
Definition at line 197 of file Model.h.
Referenced by SDFName(), and setSDFName().