#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 | ( | ) |
|
inline |
|
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 MessageLogger_cfi::cerr, Measurement::constructFromOA(), gather_cfg::cout, ALIUtils::debug, cppFunctionSkipper::exception, OpticalAlignMeasurements::oaMeasurements_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by CocoaAnalyzer::RunCocoa(), and setCocoaStatus().
|
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(), and setMeasurementsTime().
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(), and setCocoaStatus().
|
inlinestaticprivate |
Definition at line 271 of file Model.h.
References cuy::ii, and theParamFittedSigmaVector.
|
inlinestaticprivate |
Definition at line 278 of file Model.h.
References copyMeasurements(), and theParamFittedValueDisplacementMap.
|
private |
Definition at line 887 of file Model.cc.
References cuy::ii.
|
staticprivate |
Definition at line 902 of file Model.cc.
References 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(), mps_merge::newName, AlCaHLTBitMon_QueryRunRegistry::string, and Measurement::type().
Referenced by cleanParamFittedValueDisplacementMap().
**************** 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 MessageLogger_cfi::cerr, cppFunctionSkipper::exception, and OpticalAlignInfo::name_.
Referenced by setCocoaStatus().
|
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(), getEntryByName(), 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(), and getEntryByName().
--— Search an Entry name in the Entry* list and return a pointer to it
Definition at line 633 of file Model.cc.
References begin, MessageLogger_cfi::cerr, gather_cfg::cout, ALIUtils::debug, and cmsRelvalreport::exit.
Referenced by MeasurementDiffEntry::calculateSimulatedValue(), FittedEntry::FittedEntry(), getEntryByName(), MatricesFName(), 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 mps_splice::entry, getComponentOptOs(), getComponentOptOTypes(), and 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(), and ~Model().
|
static |
Definition at line 653 of file Model.cc.
References MessageLogger_cfi::cerr.
Referenced by MeasurementList().
|
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, MessageLogger_cfi::cerr, gather_cfg::cout, ALIUtils::debug, and cmsRelvalreport::exit.
Referenced by Measurement::buildOptOList(), Fit::findEntryFitPosition(), MatricesFName(), 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, MessageLogger_cfi::cerr, and cmsRelvalreport::exit.
Referenced by MatricesFName().
************ 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().
Referenced by MatricesFName().
Definition at line 1319 of file Model.cc.
References MessageLogger_cfi::cerr, cmsRelvalreport::exit, and position.
|
inlinestatic |
the name of the File for storing the matrices
Definition at line 101 of file Model.h.
References getEntryByName(), getOptOByName(), getOptOByType(), getParameterValue(), theMatricesFName, and heppy_batch::val.
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 getMeasurementByName(), dataset::name, and 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, harvestTrackValidationPlots::str, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by setCocoaStatus().
|
static |
Definition at line 1336 of file Model.cc.
References begin, MessageLogger_cfi::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(), heppy_report::oname, Measurement::only1, Measurement::only1Date, Measurement::only1Time, Measurement::setCurrentDate(), Measurement::setSigma(), ctppsDiamondLocalTracks_cfi::sigma, Measurement::sigma(), and Measurement::valueType().
Referenced by setMeasurementsTime().
|
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(), begin, buildMeasurementsLinksToOptOs(), MessageLogger_cfi::cerr, ALIFileIn::close(), COCOA_Init, Measurement::construct(), OpticalObject::construct(), popcon2dropbox::copy(), gather_cfg::cout, ALIUtils::debug, ALIUtils::dumpVS(), end, ALIFileIn::eof(), ALIFileIn::ErrorInLine(), cmsRelvalreport::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(), ParameterMgr::setRandomSeed(), and findQualityFiles::size.
Referenced by setCocoaStatus().
|
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.
Referenced by setMeasurementsTime().
|
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 BuildMeasurementsFromOA(), BuildSystemDescriptionFromOA(), fwrapper::cs, FindOptAlignInfoByType(), printCocoaStatus(), readSystemDescription(), AlCaHLTBitMon_QueryRunRegistry::string, and theCocoaStatus.
Referenced by Fit::fitNextEvent(), and readSystemDescription().
|
inlinestatic |
Definition at line 164 of file Model.h.
References dataset::name, and theMatricesFName.
|
inlinestatic |
Definition at line 168 of file Model.h.
References buildMeasurementsLinksToOptOs(), readMeasurementsFromFile(), reorderOptODictionary(), SetValueDisplacementsFromReportOut(), and theMeasurementsTime.
|
inlinestatic |
Definition at line 160 of file Model.h.
References dataset::name, and theReportFName.
|
inlinestatic |
Definition at line 156 of file Model.h.
References dataset::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().
Referenced by setMeasurementsTime().
|
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().