#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=1) |
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 = 0 |
static Model * | theInstance = 0 |
Only instance of Model. More... | |
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 145 of file Model.h.
References theEntryVector.
Referenced by OpticalObject::fillCoordinateEntry(), OpticalObject::fillExtraEntry(), and OpticalObject::setAnglesNull().
|
inlinestatic |
Definition at line 150 of file Model.h.
References theMeasurementVector.
Referenced by Measurement::postConstruct().
void Model::BuildMeasurementsFromOA | ( | OpticalAlignMeasurements & | measList | ) |
Definition at line 1626 of file Model.cc.
References dtNoiseDBValidation_cfg::cerr, Measurement::constructFromOA(), gather_cfg::cout, ALIUtils::debug, cppFunctionSkipper::exception, OpticalAlignMeasurements::oaMeasurements_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by CocoaAnalyzer::RunCocoa().
|
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 546 of file Model.cc.
References begin.
Referenced by readSystemDescription().
void Model::BuildSystemDescriptionFromOA | ( | OpticalAlignments & | optAlig | ) |
Definition at line 1580 of file Model.cc.
References OpticalObject::constructFromOptAligInfo(), OpticalAlignInfo::name_, and OpticalAlignments::opticalAlignments().
Referenced by CocoaAnalyzer::RunCocoa().
|
inlinestaticprivate |
Definition at line 271 of file Model.h.
References cuy::ii, and theParamFittedSigmaVector.
|
inlinestaticprivate |
Definition at line 278 of file Model.h.
References theParamFittedValueDisplacementMap.
|
private |
Definition at line 887 of file Model.cc.
References cuy::ii.
|
staticprivate |
Definition at line 902 of file Model.cc.
References 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 829 of file Model.cc.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
Definition at line 1458 of file Model.cc.
References ALIUtils::changeName(), Measurement::copyMeas(), gather_cfg::cout, spr::find(), Measurement::name(), AlCaHLTBitMon_QueryRunRegistry::string, and Measurement::type().
**************** FOR COPYING AN OPTO
Definition at line 769 of file Model.cc.
References gather_cfg::cout, and ALIUtils::debug.
Referenced by OpticalObject::createComponentOptOs().
|
staticprivate |
Definition at line 1147 of file Model.cc.
|
staticprivate |
Definition at line 1157 of file Model.cc.
References OpticalObject::CoordinateEntryList(), gather_cfg::cout, ALIUtils::debug, OpticalObject::ExtraEntryList(), spr::find(), and OpticalObject::name().
|
inlinestatic |
Definition at line 75 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 790 of file Model.cc.
References gather_cfg::cout, ALIUtils::debug, and OpticalObject::name().
OpticalAlignInfo Model::FindOptAlignInfoByType | ( | const ALIstring & | type | ) |
Definition at line 1597 of file Model.cc.
References dtNoiseDBValidation_cfg::cerr, cppFunctionSkipper::exception, and OpticalAlignInfo::name_.
|
inlinestatic |
Definition at line 48 of file Model.h.
References theCocoaStatus.
Referenced by Fit::fitParameters().
|
static |
--— Get from theOptOList the list of pointers to component OptOs
Definition at line 723 of file Model.cc.
References begin, 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 690 of file Model.cc.
References begin.
Referenced by OpticalObject::createComponentOptOs().
--— Search an Entry name in the Entry* list and return a pointer to it
Definition at line 633 of file Model.cc.
References begin, dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, ALIUtils::debug, and cmsRelvalreport::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 122 of file Model.h.
References getEntryByName().
|
inlinestatic |
Definition at line 267 of file Model.h.
References theFittedEntriesReader.
Referenced by Fit::fitNextEvent().
|
static |
-------— Gets the only instance of this class
Definition at line 81 of file Model.cc.
Referenced by CocoaAnalyzer::RunCocoa().
|
static |
Definition at line 653 of file Model.cc.
References dtNoiseDBValidation_cfg::cerr.
|
inlinestatic |
Definition at line 141 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 578 of file Model.cc.
References begin, dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, ALIUtils::debug, and cmsRelvalreport::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 610 of file Model.cc.
References begin, dtNoiseDBValidation_cfg::cerr, and cmsRelvalreport::exit.
************ ACCESS INFO FROM STATIC DATA
--— Search a string in theParameters and return 1 if found
Definition at line 565 of file Model.cc.
References ParameterMgr::getInstance(), and ParameterMgr::getParameterValue().
Definition at line 1319 of file Model.cc.
References dtNoiseDBValidation_cfg::cerr, cmsRelvalreport::exit, and position.
|
inlinestatic |
the name of the File for storing the matrices
Definition at line 101 of file Model.h.
References theMatricesFName.
Referenced by Fit::dumpMatrices().
|
inlinestatic |
the name of the Measurements File
Definition at line 91 of file Model.h.
References theMeasFName.
|
inlinestatic |
Definition at line 79 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 816 of file Model.cc.
References gather_cfg::cout, and ALIUtils::debug.
Referenced by OpticalObject::copyData().
|
inlinestatic |
ACCESS STATIC DATA MEMBERS.
Definition at line 67 of file Model.h.
References theOptODictionary.
Referenced by readSystemDescription().
|
inlinestatic |
Definition at line 71 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 1553 of file Model.cc.
References COCOA_FitCannotImprove, COCOA_FitChi2Worsened, COCOA_FitImproving, COCOA_FitMatrixNonInversable, COCOA_FitOK, COCOA_Init, COCOA_InitFit, COCOA_ReadingModel, and AlCaHLTBitMon_QueryRunRegistry::string.
|
static |
Definition at line 1336 of file Model.cc.
References begin, dtNoiseDBValidation_cfg::cerr, Measurement::correctValueAndSigma(), gather_cfg::cout, ALIUtils::debug, Measurement::dim(), ALIUtils::dumpVS(), end, ALIFileIn::eof(), ALIFileIn::ErrorInLine(), cmsRelvalreport::exit, Measurement::fillData(), GlobalOptionMgr::getInstance(), ALIFileIn::getInstance(), ALIFileIn::getWordsInLine(), GlobalOptionMgr::GlobalOptions(), cuy::ii, MeasurementList(), Measurement::measurementsFileName(), 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 101 of file Model.cc.
References ParameterMgr::addParameter(), ParameterMgr::addRandomFlatParameter(), ParameterMgr::addRandomGaussParameter(), assert(), begin, buildMeasurementsLinksToOptOs(), dtNoiseDBValidation_cfg::cerr, ALIFileIn::close(), COCOA_Init, Measurement::construct(), OpticalObject::construct(), filterCSVwithJSON::copy, gather_cfg::cout, ALIUtils::debug, ALIUtils::dumpVS(), end, ALIFileIn::eof(), ALIFileIn::ErrorInLine(), cmsRelvalreport::exit, spr::find(), ALIUtils::getFloat(), ParameterMgr::getInstance(), EntryMgr::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(), ParameterMgr::setRandomSeed(), and findQualityFiles::size.
|
staticprivate |
|
staticprivate |
********** private METHODS
Reorder the list of OptOs in a hierarchical structure (tree-like)
Definition at line 511 of file Model.cc.
References begin.
|
inlinestatic |
the name of the report File
Definition at line 96 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 86 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 49 of file Model.h.
References fwrapper::cs, and theCocoaStatus.
Referenced by Fit::fitNextEvent(), and readSystemDescription().
|
inlinestatic |
Definition at line 164 of file Model.h.
References mergeVDriftHistosByStation::name, and theMatricesFName.
|
inlinestatic |
|
inlinestatic |
Definition at line 160 of file Model.h.
References mergeVDriftHistosByStation::name, and theReportFName.
|
inlinestatic |
Definition at line 156 of file Model.h.
References mergeVDriftHistosByStation::name, and theSDFName.
|
staticprivate |
Definition at line 1530 of file Model.cc.
References gather_cfg::cout, ALIUtils::debug, EntryList(), EntryMgr::findEntryByLongName(), EntryMgr::getInstance(), EntryMgr::numberOfEntries(), and EntryData::valueDisplacement().
|
staticprivate |
Definition at line 253 of file Model.h.
Referenced by CMSLinkDeleteOptOs().
|
static |
|
staticprivate |
Definition at line 286 of file Model.h.
Referenced by getCocoaStatus(), and setCocoaStatus().
|
staticprivate |
std::vector of all Entries
Definition at line 206 of file Model.h.
Referenced by addEntryToList(), and EntryList().
|
staticprivate |
Definition at line 294 of file Model.h.
Referenced by getFittedEntriesReader().
|
staticprivate |
|
staticprivate |
the name of the File for storing the matrices
Definition at line 218 of file Model.h.
Referenced by MatricesFName(), and setMatricesFName().
|
staticprivate |
the name of the Measurements File
Definition at line 214 of file Model.h.
Referenced by MeasFName().
|
staticprivate |
Definition at line 292 of file Model.h.
Referenced by MeasurementsTime(), and setMeasurementsTime().
|
staticprivate |
std::vector of all Measurements
Definition at line 209 of file Model.h.
Referenced by addMeasurementToList(), and MeasurementList().
|
staticprivate |
Definition at line 296 of file Model.h.
Referenced by getOpticalAlignments().
|
staticprivate |
parameters
std::vector of OptOs with components (in tree structure)
Definition at line 197 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 203 of file Model.h.
Referenced by OptOList().
|
staticprivate |
|
staticprivate |
|
staticprivate |
Definition at line 288 of file Model.h.
Referenced by cleanParamFittedSigmaVector().
|
staticprivate |
Definition at line 290 of file Model.h.
Referenced by cleanParamFittedValueDisplacementMap().
|
staticprivate |
the name of the report File
Definition at line 216 of file Model.h.
Referenced by ReportFName(), and setReportFName().
|
staticprivate |
the name of the System Description File
Definition at line 212 of file Model.h.
Referenced by SDFName(), and setSDFName().