44 #ifdef OS_OSPACE_STD_NAMESPACE
45 using namespace os_std;
82 theInstance =
new Model;
106 std::vector<ALIstring> SectionTitle;
107 SectionTitle.push_back(
ALIstring(
"GLOBAL_OPTIONS"));
108 SectionTitle.push_back(
ALIstring(
"PARAMETERS"));
109 SectionTitle.push_back(
ALIstring(
"SYSTEM_TREE_DESCRIPTION"));
110 SectionTitle.push_back(
ALIstring(
"SYSTEM_TREE_DATA"));
111 SectionTitle.push_back(
ALIstring(
"MEASUREMENTS"));
112 SectionTitle.push_back(
ALIstring(
"REPORT.OUT"));
113 std::vector<ALIstring>::iterator SectionTitleIterator;
116 std::vector<ALIstring> wordlist;
118 ALIint currentSectionNo = -1;
119 while (!filein.
eof()) {
122 assert(!wordlist.empty());
132 SectionTitleIterator =
find(SectionTitle.begin(), SectionTitle.end(), *wordlist.begin());
133 if (SectionTitleIterator != SectionTitle.end()) {
135 currentSectionNo = SectionTitleIterator - SectionTitle.begin();
136 if (currentSectionNo != InSectionNo + 1) {
139 std::cerr <<
"BAD ORDER OF SECTIONS, reading section " << *SectionTitleIterator << std::endl
140 <<
" currentSectionNo = " << currentSectionNo <<
" InSectionNo = " << InSectionNo << std::endl
141 <<
" --------- Please see documentation ---------- " << std::endl;
150 SetValueDisplacementsFromReportOut();
154 std::cout << std::endl <<
"START OF SECTION: " << currentSectionNo <<
" " << *SectionTitleIterator << std::endl;
162 if (wordlist.size() == 2) {
165 if (!isnumber && wordlist[0] !=
ALIstring(
"external_meas")) {
167 std::cerr <<
": EXPECTING A NUMBER, FOUND: " << wordlist[1] << std::endl;
183 std::cerr <<
": IN GLOBAL_OPTIONS section TWO-WORD LINES ARE EXPECTED " << std::endl;
201 if (wordlist.size() == 2) {
216 }
else if (wordlist.size() == 3) {
217 if (wordlist[1] !=
"seed") {
219 std::cerr <<
": For a three-word parameter line, second has to be 'seed', it is " << wordlist[1]
224 if (wordlist[0] ==
"gauss" || wordlist[0] ==
"flat") {
228 std::cerr <<
": For a three-word parameter line, first has to be 'gauss' or 'flat', it is " << wordlist[0]
232 }
else if (wordlist.size() == 4) {
233 if (wordlist[0] ==
"gauss") {
235 }
else if (wordlist[0] ==
"flat") {
239 std::cerr <<
": For a four-word parameter line, first has to be 'gauss' or 'flat', it is " << wordlist[0]
245 std::cerr <<
": IN PARAMETERS section TWO-WORD-LINES ARE EXPECTED " << std::endl;
260 std::vector<ALIstring> wordlist2 = wordlist;
261 std::vector<ALIstring>::iterator vsite;
262 ALIint wsiz = wordlist.size();
267 for (vsite = wordlist2.begin(); vsite != wordlist2.end(); ++vsite) {
269 int nOpticalObjects = atoi((*vsite).c_str());
271 if (nOpticalObjects == 1) {
274 <<
" number of repeated OpticalObjects = 1. Please avoid the numbering " << std::endl;
280 std::cerr <<
"NUMBER SHOULD BE FOLLOWED BY an OpticalObject type" << std::endl;
289 wordlist.push_back(*(vsite + 1));
294 wordlist.push_back(*vsite);
305 if (wordlist[0] ==
ALIstring(
"object")) {
307 std::vector<std::vector<ALIstring> >::iterator vvsite;
308 for (vvsite = theOptODictionary.begin(); vvsite != theOptODictionary.end(); ++vvsite) {
311 if (*((*vvsite).begin()) == wordlist[1]) {
313 std::cerr <<
"SYSTEM_TREE_DESCRIPTION: REPEATED object " << *((*vvsite).begin())
314 <<
" ( NOT ALLOWED NEITHER WITH EQUAL NOR WITH DIFFERENT COMPONENTS)" << std::endl;
319 std::vector<ALIstring> vstemp;
320 copy(wordlist.begin() + 1, wordlist.end(), back_inserter(vstemp));
324 if (OptODictionary().
empty()) {
326 std::cerr <<
"SYSTEM_TREE_DESCRIPTION section: FIRST LINE SHOULD START WITH 'object'" << std::endl;
329 copy(wordlist.begin(), wordlist.end(), back_inserter(*(OptODictionary().
end() - 1)));
339 std::vector<std::vector<ALIstring> > OptODictionary2;
340 reorderOptODictionary(
"system", OptODictionary2);
341 if (OptODictionary2.empty()) {
342 std::cerr <<
"SYSTEM_TREE_DESCRIPTION section: no object 'system' found " << std::endl;
347 std::vector<std::vector<ALIstring> >::const_iterator vvscite, vvscite2;
349 for (vvscite = theOptODictionary.begin(); vvscite != theOptODictionary.end(); ++vvscite) {
351 for (vvscite2 = OptODictionary2.begin(); vvscite2 != OptODictionary2.end(); ++vvscite2) {
352 if (*((*vvscite).begin()) == *((*vvscite2).begin())) {
358 std::cerr <<
"!!!SYSTEM_TREE_DESCRIPTION section: object " << *((*vvscite).begin())
359 <<
" is not hanging from object 'system' " << std::endl;
360 for (vvscite = OptODictionary().begin(); vvscite != OptODictionary().end(); ++vvscite) {
361 std::vector<ALIstring> ptemp = *vvscite;
367 theOptODictionary = OptODictionary2;
373 std::vector<std::vector<ALIstring> >::iterator itevs;
374 for (itevs = OptODictionary().
begin(); itevs != OptODictionary().end(); ++itevs) {
375 std::vector<ALIstring> ptemp = *itevs;
382 if (wordlist[0] !=
"system") {
383 std::cerr <<
"SYSTEM_TREE_DATA section: object 'system' is not the first one " << std::endl;
391 theOptOList.push_back(OptOsystem);
396 std::cerr <<
" STILL SOME LINES AFTER ALL SYSTEM TREE IS READ!!!" << std::endl;
407 if (wordlist.size() == 2) {
408 measName = wordlist[1];
417 }
else if (measType ==
ALIstring(
"DISTANCEMETER3DIM")) {
421 }
else if (measType ==
ALIstring(
"DISTANCEMETER") || measType ==
ALIstring(
"DISTANCEMETER1DIM")) {
425 }
else if (measType ==
ALIstring(
"TILTMETER")) {
429 }
else if (measType ==
ALIstring(
"COPS")) {
433 }
else if (measType ==
ALIstring(
"DIFFENTRY")) {
436 }
else if (measType ==
ALIstring(
"measurements_from_file") || measType ==
ALIstring(
"@measurements_from_file")) {
440 if (wordlist.size() == 4) {
446 }
else if (measType ==
ALIstring(
"measurements_from_file_ROOT") ||
447 measType ==
ALIstring(
"@measurements_from_file")) {
449 }
else if (wordlist[0] ==
ALIstring(
"correlations_from_file") ||
450 wordlist[0] ==
ALIstring(
"@correlations_from_file")) {
452 }
else if (wordlist[0] ==
ALIstring(
"copy_measurements") || wordlist[0] ==
ALIstring(
"@copy_measurements")) {
453 copyMeasurements(wordlist);
456 }
else if (wordlist[0] ==
ALIstring(
"fittedEntries_from_file")) {
459 std::cout <<
" setting fittedEntries_from_file " << wordlist[0] <<
" == " << wordlist[1] << std::endl;
461 std::cerr <<
"Measurement:" << std::endl;
463 std::cerr <<
"!!! type of measurement not allowed: " << wordlist[0] << std::endl;
464 std::cerr <<
" Allowed types: SENSOR2D, DISTANCEMETER, DISTANCEMETER1DIM, TILTMETER, COPS, DIFFENTRY "
475 std::cerr <<
"BAD ORDER OF SECTIONS, reading section " << *SectionTitleIterator << std::endl
476 <<
" currentSectionNo = " << currentSectionNo <<
" InSectionNo = " << InSectionNo << std::endl
477 <<
" --------- Please see documentation ---------- " << std::endl;
489 std::cout << std::endl <<
"@@@@ Building Measurements links to OptOs" << std::endl;
493 std::cout <<
"---------- SYSTEM SUCCESFULLY READ ----------" << std::endl << std::endl;
506 std::vector<std::vector<ALIstring> >::iterator vvsite;
507 std::vector<ALIstring>::iterator vsite;
510 for (vvsite = OptODictionary().
begin(); vvsite != OptODictionary().end(); ++vvsite) {
511 if (*((*vvsite).begin()) == ssearch) {
513 OptODictionary2.push_back(*vvsite);
520 for (vsite = (*vvsite).begin() + 1; vsite != (*vvsite).end(); ++vsite) {
521 reorderOptODictionary(*vsite, OptODictionary2);
539 std::vector<Measurement*>::const_iterator vmcite;
540 for (vmcite = MeasurementList().
begin(); vmcite != MeasurementList().end(); ++vmcite) {
564 std::vector<OpticalObject*>::const_iterator vocite;
565 for (vocite = OptOList().
begin(); vocite != OptOList().end(); ++vocite) {
566 if ((*vocite)->name() == opto_name)
570 if (vocite == OptOList().end()) {
572 std::cerr <<
" LIST OF OpticalObjects " << std::endl;
573 for (vocite = OptOList().begin(); vocite != OptOList().end(); ++vocite) {
574 std::cerr << (*vocite)->name() << std::endl;
576 std::cerr <<
"!!EXITING at getOptOByName: Optical Object " << opto_name <<
" doesn't exist!!" << std::endl;
582 std::cout << opto_name.c_str() <<
"SSOptOitem" << (*vocite) << (*vocite)->name() <<
"len" << OptOList().size()
595 std::vector<OpticalObject*>::const_iterator vocite;
596 for (vocite = OptOList().
begin(); vocite != OptOList().end(); ++vocite) {
598 if ((*vocite)->type() == opto_type)
602 if (vocite == OptOList().end()) {
604 std::cerr <<
"!!EXITING at getOptOByType: Optical Object " << opto_type <<
" doesn't exist!!" << std::endl;
617 std::vector<Entry*>::const_iterator vecite;
618 for (vecite = EntryList().
begin(); vecite != EntryList().end(); ++vecite) {
620 std::cout <<
"getEntryByName: " << (*vecite)->OptOCurrent()->name() <<
" E " << (*vecite)->name()
621 <<
" Searching: " << opto_name <<
" E " << entry_name << std::endl;
623 if ((*vecite)->OptOCurrent()->name() == opto_name && (*vecite)->name() == entry_name) {
628 std::cerr <<
"!!!EXITING at getEntryByName: Entry name not found:" << opto_name <<
" " << entry_name << std::endl;
635 std::vector<Measurement*>::const_iterator vmcite;
636 for (vmcite = theMeasurementVector.begin(); vmcite != theMeasurementVector.end(); ++vmcite) {
637 if ((*vmcite)->name() == meas_name)
641 if (vmcite != theMeasurementVector.end()) {
647 std::cerr <<
" LIST OF Measurements " << std::endl;
648 for (vmcite = theMeasurementVector.begin(); vmcite != theMeasurementVector.end(); ++vmcite) {
649 std::cerr << (*vmcite)->name() << std::endl;
651 std::cerr <<
"!!EXITING at getMeasurementByName: Measurement " << meas_name <<
" doesn't exist!!" << std::endl;
668 std::vector<ALIstring>::iterator vsite;
669 for (vsite = vcomponents.begin(); vsite != vcomponents.end(); ++vsite) {
670 vcomponents.pop_back();
674 ALIint ALIstring_found = 0;
675 std::vector<std::vector<ALIstring> >::iterator vvsite;
676 for (vvsite = OptODictionary().
begin(); vvsite != OptODictionary().end(); ++vvsite) {
677 if (*((*vvsite).begin()) == opto_type) {
680 vcomponents = *vvsite;
681 vcomponents.erase(vcomponents.begin());
686 if (ALIstring_found) {
699 std::vector<OpticalObject*>::iterator voite;
700 for (voite = vcomponents.begin(); voite != vcomponents.end(); ++voite) {
701 vcomponents.pop_back();
708 std::cout << opto_name <<
"getComponentOptOs: opto " << opto << opto->
name() << std::endl;
709 std::vector<OpticalObject*>::const_iterator vocite;
712 std::cout <<
"optolist size " << OptOList().size() << std::endl;
714 for (vocite = OptOList().
begin(); vocite != OptOList().end(); ++vocite) {
715 if ((*vocite)->parent() !=
nullptr) {
717 if ((*vocite)->parent()->name() == opto_name) {
719 vcomponents.push_back((*vocite));
745 std::cout <<
"createCopyComponentList " << typ << std::endl;
749 theOptOsToCopyList.erase(theOptOsToCopyList.begin(), theOptOsToCopyList.end());
752 fillCopyComponentList(start_opto);
755 theOptOsToCopyListIterator = theOptOsToCopyList.begin();
764 std::cout <<
"entering fillCopyComponentList(): OptO" << opto->
name() << std::endl;
766 std::vector<OpticalObject*> vopto;
767 ALIbool opto_found = getComponentOptOs(opto->
name(), vopto);
770 std::cout <<
"fillCopyComponentList: NO COMPONENTS TO COPY IN THIS OptO" << opto->
name() << std::endl;
774 std::vector<OpticalObject*>::const_iterator vocite;
775 for (vocite = vopto.begin(); vocite != vopto.end(); ++vocite) {
776 theOptOsToCopyList.push_back(*vocite);
778 std::cout <<
"fillCopyOptOList " << (*vocite)->type() <<
" " << (*vocite)->name() << std::endl;
780 fillCopyComponentList(*vocite);
790 std::cout <<
"entering nextOptOToCopy() " << std::endl;
791 ++theOptOsToCopyListIterator;
793 return *(theOptOsToCopyListIterator - 1);
859 ALIuint odsize = theOptODictionary.size();
861 theOptODictionary.pop_back();
877 std::cout <<
"CMSLinkDeleteOptOs: cms_link_halfplanes " << cmslink_halfplanes << cmslink_iter << std::endl;
879 if (cmslink_iter == 1) {
883 deleteOptO(
"s/mabsL");
885 if (cmslink_method == 1) {
886 deleteOptO(
"s/tracker/det_trkDL");
887 deleteOptO(
"s/tracker/det_trkDR");
890 if (cmslink_halfplanes == 2) {
892 deleteOptO(
"s/mabsR");
895 }
else if (cmslink_iter == 2) {
898 deleteOptO(
"s/mabsL");
899 deleteOptO(
"s/tracker/CST/wheel_trkL/peri/mirror");
900 deleteOptO(
"s/tracker/CST/wheel_trkL/det_trkU");
904 if (cmslink_halfplanes <= 1) {
905 deleteOptO(
"s/tracker/CST/wheel_trkR");
906 }
else if (cmslink_halfplanes == 2) {
908 deleteOptO(
"s/mabsR");
909 deleteOptO(
"s/tracker/CST/wheel_trkR/peri/mirror");
910 deleteOptO(
"s/tracker/CST/wheel_trkR/det_trkU");
913 }
else if (cmslink_iter == 3) {
916 deleteOptO(
"s/tracker");
918 if (cmslink_halfplanes == 2) {
1115 std::vector<Entry*>::const_iterator vecite;
1116 std::vector<Entry*>::iterator veite2;
1118 std::cout <<
"SIZE" << theEntryVector.size() << std::endl;
1121 veite2 =
find(theEntryVector.begin(), theEntryVector.end(), (*vecite));
1124 theEntryVector.erase(veite2);
1129 veite2 =
find(theEntryVector.begin(), theEntryVector.end(), (*vecite));
1132 theEntryVector.erase(veite2);
1135 for (vecite = theEntryVector.begin(); vecite != theEntryVector.end(); ++vecite) {
1140 std::vector<Measurement*> MeasToBeDeleted;
1141 std::vector<Measurement*>::const_iterator vmite;
1142 std::vector<OpticalObject*>::const_iterator vocite;
1143 for (vmite = MeasurementList().begin(); vmite != MeasurementList().end(); ++vmite) {
1145 std::cout <<
"Deleting Measurement" << (*vmite)->name() << std::endl;
1147 for (vocite = (*vmite)->OptOList().begin(); vocite != (*vmite)->OptOList().end(); ++vocite) {
1148 if ((*vocite) == opto) {
1150 MeasToBeDeleted.push_back(*vmite);
1158 std::vector<Measurement*>::const_iterator vmcite;
1159 std::vector<Measurement*>::iterator vmite2;
1161 std::cout <<
"SIZEMEAS" << MeasToBeDeleted.size() << std::endl;
1162 for (vmcite = MeasToBeDeleted.begin(); vmcite != MeasToBeDeleted.end(); ++vmcite) {
1163 vmite2 =
find(theMeasurementVector.begin(), theMeasurementVector.end(), (*vmcite));
1166 theMeasurementVector.erase(vmite2);
1171 std::vector<OpticalObject*> vopto;
1173 for (vocite = vopto.begin(); vocite != vopto.end(); ++vocite) {
1174 deleteOptO(*vocite);
1182 std::vector<OpticalObject*>::iterator dvoite =
1185 theOptOList.erase(dvoite);
1268 if (position >= theParamFittedSigmaVector.size()) {
1269 std::cerr <<
"!!EXITING at getParamFittedSigma: position" << position
1270 <<
" bigger than dimension of theParamFittedSigmaVector " << theParamFittedSigmaVector.size()
1274 std::vector<ALIdouble>::const_iterator vdcite = theParamFittedSigmaVector.begin() +
position;
1288 std::vector<ALIstring> wordlist;
1295 std::cout <<
"@@@@ No more measurements left" << std::endl;
1318 if (wordlist[0] ==
"DATE:") {
1326 <<
" DATE: " << wordlist[1] <<
" " << wordlist[1] << std::endl;
1329 for (ii = 0; ii < nMeas; ii++) {
1332 wordlist[0] ==
ALIstring(
"DISTANCEMETER") || wordlist[0] ==
ALIstring(
"DISTANCEMETER1DIM") ||
1334 if (wordlist.size() != 2) {
1335 std::cerr <<
"!!!EXITING Model::readMeasurementsFromFile. number of words should be 2 instead of "
1336 << wordlist.size() << std::endl;
1340 std::vector<Measurement*>::const_iterator vmcite;
1341 for (vmcite = MeasurementList().
begin(); vmcite != MeasurementList().end(); ++vmcite) {
1349 ALIint fcolon = (*vmcite)->name().find(
':');
1351 oname = oname.substr(fcolon + 1, oname.length());
1353 if (oname == wordlist[1]) {
1355 if ((*vmcite)->type() != wordlist[0]) {
1356 std::cerr <<
"!!! Reading measurement from file: type in file is " << wordlist[0] <<
" and should be "
1357 << (*vmcite)->type() << std::endl;
1365 for (
ALIuint ii = 0; ii < meastemp->
dim(); ii++) {
1374 if (meastemp->
valueType(ii) != wordlist[0]) {
1376 std::cerr <<
"!!!FATAL ERROR: Measurement value type is " << wordlist[0]
1377 <<
" while in setup definition was " << meastemp->
valueType(ii) << std::endl;
1389 if (vmcite == MeasurementList().
end()) {
1390 for (vmcite = MeasurementList().
begin(); vmcite != MeasurementList().end(); ++vmcite) {
1391 std::cerr <<
"MEAS: " << (*vmcite)->name() <<
" " << (*vmcite)->type() << std::endl;
1393 std::cerr <<
"!!! Reading measurement from file: measurement not found in list: type in file is " << wordlist[1]
1398 std::cerr <<
" wrong type of measurement: " << wordlist[0] << std::endl
1399 <<
" Available types are SENSOR2D, TILTMETER, DISTANCEMETER, DISTANCEMETER1DIM, COPS" << std::endl;
1417 std::string subsstr2 = wl[1].substr(wl[1].
find(
'/') + 1, wl[1].rfind(
'/') - wl[1].
find(
'/') - 1);
1418 std::string querystr = wl[1].substr(wl[1].rfind(
'/') + 1, wl[1].length());
1420 std::cout <<
" Model::copyMeasurements "
1421 <<
" subsstr1 " << subsstr1 <<
" subsstr2 " << subsstr2 <<
" querystr " << querystr << std::endl;
1423 std::vector<Measurement*> measToCopy;
1424 std::vector<Measurement*>::iterator mite;
1425 for (mite = theMeasurementVector.begin(); mite != theMeasurementVector.end(); ++mite) {
1428 if (meas->
name().find(querystr) != std::string::npos) {
1429 measToCopy.push_back(meas);
1435 for (mite = measToCopy.begin(); mite != measToCopy.end(); ++mite) {
1437 std::vector<ALIstring> wlt;
1438 wlt.push_back(meas->
type());
1442 std::cout <<
" newName " << newName << std::endl;
1443 wlt.push_back(newName);
1447 if (wlt.size() == 2) {
1469 throw cms::Exception(
"LogicError") <<
"@SUB=Model::copyMeasurements\n"
1470 <<
"unknown measurement type: " << meas->
type();
1474 meastemp->
copyMeas(meas, subsstr1, subsstr2);
1483 std::cout <<
" Model::SetValueDisplacementsFromReportOut() " << std::endl;
1490 std::vector<Entry*>::const_iterator vecite;
1493 entryData = entryMgr->
findEntryByLongName((*vecite)->OptOCurrent()->longName(), (*vecite)->name());
1495 std::cout <<
"SetValueDisplacementsFromReportOut " << (*vecite)->OptOCurrent()->longName() <<
" "
1507 str =
"COCOA_Init ";
1509 str =
"COCOA_ReadingModel";
1511 str =
"COCOA_InitFit";
1513 str =
"COCOA_FitOK";
1515 str =
"COCOA_FitImproving";
1517 str =
"COCOA_FitCannotImprove";
1519 str =
"COCOA_FitChi2Worsened";
1521 str =
"COCOA_FitMatrixNonInversable";
1539 theOptOList.push_back(OptOsystem);
1547 std::vector<OpticalAlignInfo>::iterator ite;
1548 for (ite = theOpticalAlignments.begin(); ite != theOpticalAlignments.end(); ++ite) {
1550 if ((*ite).type_ == type) {
1555 std::cerr <<
"!! WARNING: Model::FindOptAlignInfoByType more than one objects of type " << type << std::endl;
1556 std::cerr <<
" returning object " << oai.
name_ << std::endl <<
" skipping object " << (*ite).name_ << std::endl;
1561 std::cerr <<
"!! ERROR: Model::FindOptAlignInfoByType object not found, of type " << type << std::endl;
1570 std::vector<OpticalAlignMeasurementInfo>::iterator mite;
1573 std::cout <<
" BuildMeasurementsFromOA " << std::endl;
1574 std::vector<OpticalAlignMeasurementInfo> measInfos = measList.
oaMeasurements_;
1575 for (mite = measInfos.begin(); mite != measInfos.end(); ++mite) {
1579 std::cout <<
" BuildMeasurementsFromOA measType " << measType <<
" measName " << measName << std::endl;
1582 if (measType ==
ALIstring(
"SENSOR2D")) {
1584 }
else if (measType ==
ALIstring(
"DISTANCEMETER3DIM")) {
1586 }
else if (measType ==
ALIstring(
"DISTANCEMETER") || measType ==
ALIstring(
"DISTANCEMETER1DIM")) {
1588 }
else if (measType ==
ALIstring(
"TILTMETER")) {
1590 }
else if (measType ==
ALIstring(
"COPS")) {
1596 }
else if (measType ==
ALIstring(
"DIFFENTRY")) {
1599 std::cerr <<
" !!! Model::BuildMeasurementsFromOA : measType not found " << measType << std::endl;
void BuildMeasurementsFromOA(OpticalAlignMeasurements &measList)
static ALIbool getComponentOptOs(const ALIstring &opto_name, std::vector< OpticalObject * > &vcomponents)
--— Get from theOptOList the list of pointers to component OptOs
static ALIint CMSLinkIteration
static void saveParamFittedSigma(const ALIstring &opto_name, const ALIstring &entry_name)
static void CMSLinkSaveParamFittedValueDisplacement(ALIint cmslink)
static std::vector< OpticalAlignInfo > theOpticalAlignments
static ALIFileIn & getInstance(const ALIstring &name)
OpticalAlignInfo FindOptAlignInfoByType(const ALIstring &type)
static void deleteOptO(const ALIstring &opto_name)
const ALIuint dim() const
static void setCocoaStatus(const cocoaStatus cs)
static std::string printCocoaStatus(const cocoaStatus cs)
const ALIstring valueType(ALIuint ii) const
unique_ptr< ClusterSequence > cs
static void SetOutputLengthDimensionFactors()
static void buildMeasurementsLinksToOptOs()
Read Measurements (to be implemented for reading from an external file the DATA of the measurements) ...
static ParameterMgr * getInstance()
static std::map< ALIstring, ALIdouble, std::less< ALIstring > > theParamFittedValueDisplacementMap
std::vector< OpticalAlignInfo > opticalAlignments() const
void readFromReportFile(const ALIstring &filename)
static OpticalObject * getOptOByName(const ALIstring &opto_name)
--— Find an OptO name in theOptOList and return a pointer to it
static ALIstring & SDFName()
the name of the System Description File
static OpticalObject * nextOptOToCopy()
static ErrorCorrelationMgr * getInstance()
static Model * theInstance
static ALIstring only1Time
static GlobalOptionMgr * getInstance()
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static ALIstring theMatricesFName
the name of the File for storing the matrices
static ALIstring theSDFName
the name of the System Description File
const std::vector< Entry * > & CoordinateEntryList() const
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
static ALIint Ncmslinkrange
*************** FOR RANGE STUDIES
static double getFloat(const ALIstring &str)
Convert a string to an float, checking that it is really a number.
static void copyMeasurements(const std::vector< ALIstring > &wl)
ALIint getParameterValue(const ALIstring &name, ALIdouble &val)
static ALIdouble getParamFittedSigmaVectorItem(const ALIuint position)
int getGlobalOptionValue(const ALIstring &sstr, ALIdouble &val)
--— Search a string in theGlobalOptions and return 1 if found
void fillData(ALIuint coor, const std::vector< ALIstring > &wl)
void addRandomGaussParameter(const ALIstring &name, const ALIstring &valMean, const ALIstring &valStdDev)
void setRandomSeed(const long seed)
Container::value_type value_type
void setSigma(ALIint coor, ALIdouble val)
static int IsNumber(const ALIstring &str)
static OpticalObject * getOptOByType(const ALIstring &type)
--— Find the first OptO of type 'opto_type' in theOptOList and return a pointer to it ...
const ALIdouble * sigma() const
static void readSystemDescription()
-------— Read the different sections of the SDF and act accordingly
static std::vector< OpticalObject * > theOptOsToCopyList
static std::vector< OpticalObject * > theOptOList
map of OptO*/type of parent OptO, for navigation down the tree structure
virtual void setConversionFactor(const std::vector< ALIstring > &wordlist)
static Model & getInstance()
-------— Gets the only instance of this class
static void SetValueDisplacementsFromReportOut()
static std::vector< OpticalObject * >::const_iterator theOptOsToCopyListIterator
std::vector< OpticalAlignMeasurementInfo > oaMeasurements_
static std::vector< Measurement * > theMeasurementVector
std::vector of all Measurements
void BuildSystemDescriptionFromOA(OpticalAlignments &optAlig)
static ALIbool createCopyComponentList(const ALIstring &optoname)
**************** FOR COPYING AN OPTO
static void SetAngleDimensionFactors()
static ALIbool fillCopyComponentList(const OpticalObject *opto)
static void SetOutputAngleDimensionFactors()
void setGlobalOption(const ALIstring go, const ALIdouble val, ALIFileIn &filein)
static ALIstring theMeasFName
the name of the Measurements File
void addRandomFlatParameter(const ALIstring &name, const ALIstring &valMean, const ALIstring &valInterval)
ALIint getWordsInLine(std::vector< ALIstring > &wl)
static ALIstring theReportFName
the name of the report File
static ALIbool getComponentOptOTypes(const ALIstring &opto_type, std::vector< ALIstring > &vcomponents)
--— Get from theOptODictionary the list of component OptO types
static ALIstring & measurementsFileName()
static int getParameterValue(const ALIstring &sstr, ALIdouble &val)
************ ACCESS INFO FROM STATIC DATA
static std::vector< Entry * > theEntryVector
std::vector of all Entries
static void SetLengthDimensionFactors()
static std::vector< ALIdouble > CMSLinkRangeDetValue
static FittedEntriesReader * theFittedEntriesReader
static std::string changeName(const std::string &oldName, const std::string &subsstr1, const std::string &subsstr2)
static void recoverParamFittedSigma(const ALIstring &opto_name, const ALIstring &entry_name, const ALIuint position)
static EntryMgr * getInstance()
static Measurement * getMeasurementByName(const ALIstring &name, ALIbool exists=true)
static void dumpVS(const std::vector< ALIstring > &wl, const std::string &msg, std::ostream &outs=std::cout)
dumps a vector of strings with a message to outs
std::map< ALIstring, ALIdouble, std::less< ALIstring > > & GlobalOptions()
static void CMSLinkRecoverParamFittedValueDisplacement(ALIint cmslink)
static std::vector< ALIdouble > theParamFittedSigmaVector
const ALIstring & type() const
static int position[264][3]
static cocoaStatus theCocoaStatus
static void saveParamFittedCorrelation(const ALIstring &opto_name1, const ALIstring &entry_name1, const ALIstring &opto_name2, const ALIstring &entry_name2)
void constructFromOptAligInfo(const OpticalAlignInfo &oaInfo)
static void reorderOptODictionary(const ALIstring &ssearch, std::vector< std::vector< ALIstring > > &OptODictionary2)
********** private METHODS
ALIbool readEntryFromReportOut(const std::vector< ALIstring > &wl)
static ALIbool readMeasurementsFromFile(ALIstring only1Date=ALIstring(""), ALIstring only1Time=ALIstring(""))
const ALIstring & name() const
static void CMSLinkDeleteOptOs()
const ALIstring & name() const
void constructFromOA(OpticalAlignMeasurementInfo &measInfo)
virtual void correctValueAndSigma()
static std::vector< std::vector< ALIstring > > theOptODictionary
parameters
static std::vector< Measurement * > & MeasurementList()
static int getInt(const ALIstring &str)
Convert a string to an integer, checking that it is really an integer.
void addParameter(const ALIstring &name, const ALIstring &valstr)
void CMSLinkFit(ALIint cmslink)
*************** FOR CMS LINK SYSTEM (to fit it part by part)
static void CMSLinkRecoverParamFittedSigma(ALIint cmslink)
EntryData * findEntryByLongName(const ALIstring &optoName, const ALIstring &entryName="")
static ALIstring only1Date
static void CMSLinkSaveParamFittedSigma(ALIint cmslink)
static std::vector< Entry * > & EntryList()
ALIdouble valueDisplacement() const
void copyMeas(Measurement *meas, const std::string &subsstr1, const std::string &subsstr2)
const std::vector< Entry * > & ExtraEntryList() const
static void setCurrentDate(const std::vector< ALIstring > &wl)
set the date of the current measurement
static std::vector< std::vector< ALIstring > > & OptODictionary()
ACCESS STATIC DATA MEMBERS.