44 #ifdef OS_OSPACE_STD_NAMESPACE
45 using namespace os_std;
84 theInstance =
new Model;
111 std::vector<ALIstring> SectionTitle;
112 SectionTitle.push_back(
ALIstring(
"GLOBAL_OPTIONS"));
113 SectionTitle.push_back(
ALIstring(
"PARAMETERS"));
114 SectionTitle.push_back(
ALIstring(
"SYSTEM_TREE_DESCRIPTION"));
115 SectionTitle.push_back(
ALIstring(
"SYSTEM_TREE_DATA"));
116 SectionTitle.push_back(
ALIstring(
"MEASUREMENTS"));
117 SectionTitle.push_back(
ALIstring(
"REPORT.OUT"));
118 std::vector<ALIstring>::iterator SectionTitleIterator;
121 std::vector<ALIstring> wordlist;
123 ALIint currentSectionNo = -1;
124 while (!filein.
eof()) {
127 assert( wordlist.size() != 0 );
137 SectionTitleIterator =
find(SectionTitle.begin(), SectionTitle.end(), *wordlist.begin());
138 if( SectionTitleIterator != SectionTitle.end() ) {
140 currentSectionNo = SectionTitleIterator - SectionTitle.begin();
141 if ( currentSectionNo != InSectionNo + 1 ) {
144 std::cerr <<
"BAD ORDER OF SECTIONS, reading section "
145 << *SectionTitleIterator << std::endl
146 <<
" currentSectionNo = " << currentSectionNo <<
" InSectionNo = " << InSectionNo << std::endl
147 <<
" --------- Please see documentation ---------- " << std::endl;
156 SetValueDisplacementsFromReportOut();
159 if(
ALIUtils::debug >= 4)
std::cout << std::endl <<
"START OF SECTION: " << currentSectionNo <<
" " << *SectionTitleIterator << std::endl;
167 if( wordlist.size() == 2 ) {
170 if (!isnumber && wordlist[0] !=
ALIstring(
"external_meas")) {
172 std::cerr <<
": EXPECTING A NUMBER, FOUND: " << wordlist[1] << std::endl;
188 std::cerr <<
": IN GLOBAL_OPTIONS section TWO-WORD LINES ARE EXPECTED " << std::endl;
201 currentSectionNo == -1 ) {
205 if( wordlist.size() == 2 ) {
220 }
else if( wordlist.size() == 3 ) {
221 if( wordlist[1] !=
"seed" ) {
223 std::cerr <<
": For a three-word parameter line, second has to be 'seed', it is " << wordlist[1] << std::endl;
227 if( wordlist[0] ==
"gauss" || wordlist[0] ==
"flat" ){
231 std::cerr <<
": For a three-word parameter line, first has to be 'gauss' or 'flat', it is " << wordlist[0] << std::endl;
234 }
else if( wordlist.size() == 4 ) {
235 if( wordlist[0] ==
"gauss" ) {
237 }
else if( wordlist[0] ==
"flat" ) {
241 std::cerr <<
": For a four-word parameter line, first has to be 'gauss' or 'flat', it is " << wordlist[0] << std::endl;
246 std::cerr <<
": IN PARAMETERS section TWO-WORD-LINES ARE EXPECTED " << std::endl;
262 std::vector<ALIstring> wordlist2 = wordlist;
263 std::vector<ALIstring>::iterator vsite;
264 ALIint wsiz = wordlist.size();
265 for (
ALIint ii = 0; ii < wsiz; ii++) {
269 for ( vsite=wordlist2.begin(); vsite!=wordlist2.end(); vsite++ ) {
271 int nOpticalObjects = atoi( (*vsite).c_str() );
273 if( nOpticalObjects == 1 ) {
275 <<
" number of repeated OpticalObjects = 1. Please avoid the numbering " << std::endl;
281 std::cerr <<
"NUMBER SHOULD BE FOLLOWED BY an OpticalObject type" << std::endl;
288 for (
ALIint ii=0; ii<nOpticalObjects-1; ii++ ) {
290 wordlist.push_back( *(vsite+1) );
295 wordlist.push_back( *vsite );
306 if ( wordlist[0] ==
ALIstring(
"object") ) {
308 std::vector< std::vector<ALIstring> >::iterator vvsite;
309 for ( vvsite = theOptODictionary.begin(); vvsite != theOptODictionary.end(); vvsite++) {
312 if( *( (*vvsite).begin() ) == wordlist[1] ) {
314 std::cerr <<
"SYSTEM_TREE_DESCRIPTION: REPEATED object " << *((*vvsite).begin()) <<
" ( 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().
size() == 0) {
326 std::cerr <<
"SYSTEM_TREE_DESCRIPTION section: FIRST LINE SHOULD START WITH 'object'" << std::endl;
329 copy(wordlist.begin(), wordlist.end(),
330 back_inserter( *(OptODictionary().
end()-1) ) );
337 if ( !data_reading ) {
340 std::vector< std::vector<ALIstring> > OptODictionary2;
341 reorderOptODictionary(
"system", OptODictionary2);
342 if(OptODictionary2.size() == 0) {
343 std::cerr <<
"SYSTEM_TREE_DESCRIPTION section: no object 'system' found " << std::endl;
348 std::vector< std::vector<ALIstring> >::const_iterator vvscite, vvscite2;
350 for( vvscite = theOptODictionary.begin(); vvscite != theOptODictionary.end(); vvscite++) {
352 for( vvscite2 = OptODictionary2.begin(); vvscite2 != OptODictionary2.end(); vvscite2++) {
353 if( *( (*vvscite).begin() ) == *( (*vvscite2).begin() ) ) {
359 std::cerr <<
"!!!SYSTEM_TREE_DESCRIPTION section: object " << *( (*vvscite).begin()) <<
" 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];
413 if ( measType ==
ALIstring(
"SENSOR2D") ) {
417 }
else if ( measType ==
ALIstring(
"DISTANCEMETER3DIM") ) {
421 }
else if ( measType ==
ALIstring(
"DISTANCEMETER") ||
422 measType ==
ALIstring(
"DISTANCEMETER1DIM") ) {
426 }
else if ( measType ==
ALIstring(
"TILTMETER") ) {
430 }
else if ( measType ==
ALIstring(
"COPS") ) {
434 }
else if ( measType ==
ALIstring(
"DIFFCENTRE") ) {
437 }
else if ( measType ==
ALIstring(
"DIFFANGLE") ) {
440 }
else if ( measType ==
ALIstring(
"DIFFENTRY") ) {
443 }
else if ( measType ==
ALIstring(
"measurements_from_file") || measType ==
ALIstring(
"@measurements_from_file") ) {
447 if( wordlist.size() == 4) {
453 }
else if ( measType ==
ALIstring(
"measurements_from_file_ROOT") || measType ==
ALIstring(
"@measurements_from_file") ) {
455 }
else if ( wordlist[0] ==
ALIstring(
"correlations_from_file") || wordlist[0] ==
ALIstring(
"@correlations_from_file") ) {
457 }
else if ( wordlist[0] ==
ALIstring(
"copy_measurements") || wordlist[0] ==
ALIstring(
"@copy_measurements") ) {
458 copyMeasurements( wordlist );
461 }
else if ( wordlist[0] ==
ALIstring(
"fittedEntries_from_file") ) {
463 if (
ALIUtils::debug >= 2)
std::cout <<
" setting fittedEntries_from_file " << wordlist[0] <<
" == " << wordlist[1] << std::endl;
465 std::cerr <<
"Measurement:" << std::endl;
467 std::cerr <<
"!!! type of measurement not allowed: " << wordlist[0]
469 std::cerr <<
" Allowed types: SENSOR2D, DISTANCEMETER, DISTANCEMETER1DIM, TILTMETER, COPS, DIFFENTRY " << std::endl;
479 std::cerr <<
"BAD ORDER OF SECTIONS, reading section "
480 << *SectionTitleIterator << std::endl
481 <<
" currentSectionNo = " << currentSectionNo <<
" InSectionNo = " << InSectionNo << std::endl
482 <<
" --------- Please see documentation ---------- " << std::endl;
498 std::cout <<
"---------- SYSTEM SUCCESFULLY READ ----------" << std::endl << std::endl;
514 std::vector< std::vector<ALIstring> >::iterator vvsite;
515 std::vector< ALIstring >::iterator vsite;
518 for( vvsite = OptODictionary().
begin(); vvsite != OptODictionary().end(); ++vvsite) {
519 if( *( (*vvsite).begin() ) == ssearch ) {
521 OptODictionary2.push_back(*vvsite);
528 for( vsite = (*vvsite).begin()+1; vsite != (*vvsite).end(); ++vsite ) {
529 reorderOptODictionary( *vsite, OptODictionary2 );
549 std::vector< Measurement* >::const_iterator vmcite;
550 for ( vmcite = MeasurementList().
begin(); vmcite != MeasurementList().end(); vmcite++) {
581 std::vector< OpticalObject* >::const_iterator vocite;
582 for( vocite = OptOList().
begin(); vocite != OptOList().end(); vocite++ ) {
583 if( (*vocite)->name() == opto_name )
break;
586 if ( vocite == OptOList().end() ) {
588 std::cerr <<
" LIST OF OpticalObjects " << std::endl;
589 for( vocite = OptOList().begin(); vocite != OptOList().end(); vocite++ ) {
590 std::cerr << (*vocite)->name() << std::endl;
592 std::cerr <<
"!!EXITING at getOptOByName: Optical Object " << opto_name <<
" doesn't exist!!" << std::endl;
598 std::cout << opto_name.c_str() <<
"SSOptOitem" << (*vocite) << (*vocite)->name() <<
"len" << OptOList().size() << std::endl;
613 std::vector< OpticalObject* >::const_iterator vocite;
614 for( vocite = OptOList().
begin(); vocite != OptOList().end(); vocite++ ) {
616 if( (*vocite)->type() == opto_type )
break;
619 if ( vocite == OptOList().end() ) {
621 std::cerr <<
"!!EXITING at getOptOByType: Optical Object " << opto_type <<
" doesn't exist!!" << std::endl;
636 std::vector<Entry*>::const_iterator vecite;
637 for( vecite = EntryList().
begin(); vecite != EntryList().end(); vecite++) {
639 <<
" E " << (*vecite)->name() <<
" Searching: " << opto_name <<
" E " << entry_name << std::endl;
641 if( (*vecite)->OptOCurrent()->name() == opto_name &&
642 (*vecite)->name() == entry_name ) {
647 std::cerr <<
"!!!EXITING at getEntryByName: Entry name not found:" << opto_name <<
" " << entry_name << std::endl;
656 std::vector< Measurement* >::const_iterator vmcite;
657 for( vmcite = theMeasurementVector.begin(); vmcite != theMeasurementVector.end(); vmcite++ ) {
658 if( (*vmcite)->name() == meas_name )
break;
661 if ( vmcite != theMeasurementVector.end() ) {
667 std::cerr <<
" LIST OF Measurements " << std::endl;
668 for( vmcite = theMeasurementVector.begin(); vmcite != theMeasurementVector.end(); vmcite++ ) {
669 std::cerr << (*vmcite)->name() << std::endl;
671 std::cerr <<
"!!EXITING at getMeasurementByName: Measurement " << meas_name <<
" doesn't exist!!" << std::endl;
693 std::vector<ALIstring>::iterator vsite;
694 for (vsite = vcomponents.begin(); vsite != vcomponents.end(); vsite++) {
695 vcomponents.pop_back();
699 ALIint ALIstring_found = 0;
700 std::vector< std::vector<ALIstring> >::iterator vvsite;
701 for( vvsite = OptODictionary().
begin(); vvsite != OptODictionary().end(); ++vvsite) {
702 if( *( (*vvsite).begin() ) == opto_type ) {
705 vcomponents = *vvsite;
706 vcomponents.erase( vcomponents.begin() );
711 if ( ALIstring_found ) {
726 std::vector<OpticalObject*>::iterator voite;
727 for (voite = vcomponents.begin(); voite != vcomponents.end(); voite++) {
728 vcomponents.pop_back();
735 std::vector<OpticalObject*>::const_iterator vocite;
739 for (vocite = OptOList().
begin(); vocite != OptOList().end(); vocite++) {
740 if( (*vocite)->parent() != 0 ) {
742 if( (*vocite)->parent()->name() == opto_name ) {
744 vcomponents.push_back( (*vocite) );
776 theOptOsToCopyList.erase( theOptOsToCopyList.begin(), theOptOsToCopyList.end() );
779 fillCopyComponentList( start_opto );
782 theOptOsToCopyListIterator = theOptOsToCopyList.begin();
794 std::vector<OpticalObject*> vopto;
795 ALIbool opto_found = getComponentOptOs( opto->
name(), vopto);
801 std::vector<OpticalObject*>::const_iterator vocite;
802 for( vocite = vopto.begin(); vocite != vopto.end(); vocite++ ){
803 theOptOsToCopyList.push_back( *vocite );
804 if(
ALIUtils::debug >= 5)
std::cout <<
"fillCopyOptOList " << (*vocite)->type() <<
" " << (*vocite)->name() << std::endl;
806 fillCopyComponentList( *vocite );
819 theOptOsToCopyListIterator++;
821 return *(theOptOsToCopyListIterator-1);
891 ALIuint odsize = theOptODictionary.size();
892 for(
ALIuint ii = 0; ii < odsize; ii++) {
893 theOptODictionary.pop_back();
911 if(
ALIUtils::debug >= 2)
std::cout <<
"CMSLinkDeleteOptOs: cms_link_halfplanes " << cmslink_halfplanes << cmslink_iter << std::endl;
913 if( cmslink_iter == 1){
917 deleteOptO(
"s/mabsL");
919 if (cmslink_method == 1){
920 deleteOptO(
"s/tracker/det_trkDL");
921 deleteOptO(
"s/tracker/det_trkDR");
924 if( cmslink_halfplanes == 2) {
926 deleteOptO(
"s/mabsR");
929 }
else if( cmslink_iter == 2) {
932 deleteOptO(
"s/mabsL");
933 deleteOptO(
"s/tracker/CST/wheel_trkL/peri/mirror");
934 deleteOptO(
"s/tracker/CST/wheel_trkL/det_trkU");
938 if( cmslink_halfplanes <= 1) {
939 deleteOptO(
"s/tracker/CST/wheel_trkR");
940 }
else if( cmslink_halfplanes == 2) {
942 deleteOptO(
"s/mabsR");
943 deleteOptO(
"s/tracker/CST/wheel_trkR/peri/mirror");
944 deleteOptO(
"s/tracker/CST/wheel_trkR/det_trkU");
947 }
else if( cmslink_iter == 3) {
950 deleteOptO(
"s/tracker");
952 if( cmslink_halfplanes == 2) {
1162 std::vector<Entry*>::const_iterator vecite;
1163 std::vector<Entry*>::iterator veite2;
1167 veite2 =
find( theEntryVector.begin(), theEntryVector.end(), (*vecite) );
1169 delete ( (*veite2) );
1170 theEntryVector.erase( veite2 );
1175 veite2 =
find( theEntryVector.begin(), theEntryVector.end(), (*vecite) );
1177 delete ( (*veite2) );
1178 theEntryVector.erase( veite2 );
1182 for( vecite = theEntryVector.begin(); vecite != theEntryVector.end(); vecite++ ) {
1187 std::vector<Measurement*> MeasToBeDeleted;
1188 std::vector<Measurement*>::const_iterator vmite;
1189 std::vector<OpticalObject*>::const_iterator vocite;
1190 for( vmite = MeasurementList().begin(); vmite != MeasurementList().end(); vmite++ ) {
1193 for( vocite = (*vmite)->OptOList().begin(); vocite != (*vmite)->OptOList().end(); vocite++) {
1194 if( (*vocite) == opto ) {
1196 MeasToBeDeleted.push_back( *vmite );
1204 std::vector<Measurement*>::const_iterator vmcite;
1205 std::vector<Measurement*>::iterator vmite2;
1207 for( vmcite = MeasToBeDeleted.begin(); vmcite != MeasToBeDeleted.end(); vmcite++) {
1208 vmite2 =
find( theMeasurementVector.begin(), theMeasurementVector.end(), (*vmcite) );
1210 delete ( (*vmite2) );
1211 theMeasurementVector.erase( vmite2 );
1217 std::vector<OpticalObject*> vopto;
1219 for( vocite = vopto.begin(); vocite != vopto.end(); vocite++ ) {
1220 deleteOptO( *vocite );
1228 std::vector< OpticalObject* >::iterator dvoite =
1229 find( theOptOList.begin(), theOptOList.end(),
1232 theOptOList.erase( dvoite );
1321 if( position >= theParamFittedSigmaVector.size() ) {
1322 std::cerr <<
"!!EXITING at getParamFittedSigma: position" << position <<
1323 " bigger than dimension of theParamFittedSigmaVector " << theParamFittedSigmaVector.size() << std::endl;
1326 std::vector<ALIdouble>::const_iterator vdcite = theParamFittedSigmaVector.begin() +
position;
1342 std::vector<ALIstring> wordlist;
1369 if( wordlist[0] ==
"DATE:" ) {
1377 <<
" DATE: " << wordlist[1] <<
" " << wordlist[1] << std::endl;
1380 for(ii = 0; ii < nMeas; ii++) {
1383 if( wordlist.size() != 2 ) {
1384 std::cerr <<
"!!!EXITING Model::readMeasurementsFromFile. number of words should be 2 instead of " << wordlist.size() << std::endl;
1388 std::vector< Measurement* >::const_iterator vmcite;
1389 for( vmcite = MeasurementList().
begin(); vmcite != MeasurementList().end(); vmcite++ ) {
1397 ALIint fcolon = (*vmcite)->name().find(
':');
1399 oname = oname.substr(fcolon+1,oname.length());
1401 if( oname == wordlist[1] ) {
1403 if( (*vmcite)->type() != wordlist[0] ) {
1404 std::cerr <<
"!!! Reading measurement from file: type in file is "
1405 << wordlist[0] <<
" and should be " << (*vmcite)->type() << std::endl;
1413 for (
ALIuint ii=0; ii < meastemp->
dim(); ii++){
1422 if( meastemp->
valueType(ii) != wordlist[0] ) {
1424 std::cerr <<
"!!!FATAL ERROR: Measurement value type is " << wordlist[0] <<
" while in setup definition was " << meastemp->
valueType(ii) << std::endl;
1427 meastemp->
fillData( ii, wordlist );
1436 if( vmcite == MeasurementList().
end() ) {
1437 for( vmcite = MeasurementList().
begin(); vmcite != MeasurementList().end(); vmcite++ ) {
1438 std::cerr <<
"MEAS: " << (*vmcite)->name() <<
" " << (*vmcite)->type() << std::endl;
1440 std::cerr <<
"!!! Reading measurement from file: measurement not found in list: type in file is " << wordlist[1] << std::endl;
1444 std::cerr <<
" wrong type of measurement: " << wordlist[0] << std::endl
1445 <<
" Available types are SENSOR2D, TILTMETER, DISTANCEMETER, DISTANCEMETER1DIM, COPS" << std::endl;
1466 std::string subsstr1 = wl[1].substr( 0, wl[1].
find(
"/") );
1467 std::string subsstr2 = wl[1].substr( wl[1].
find(
"/")+1, wl[1].rfind(
"/") - wl[1].
find(
"/")-1 );
1468 std::string querystr = wl[1].substr( wl[1].rfind(
"/")+1, wl[1].length() );
1470 std::cout <<
" Model::copyMeasurements " <<
" subsstr1 " << subsstr1 <<
" subsstr2 " << subsstr2 <<
" querystr " << querystr << std::endl;
1472 std::vector< Measurement* > measToCopy;
1473 std::vector< Measurement* >::iterator mite;
1474 for( mite = theMeasurementVector.begin(); mite != theMeasurementVector.end(); mite++) {
1477 if( meas->
name().find( querystr ) != std::string::npos ) {
1478 measToCopy.push_back( meas );
1484 for( mite = measToCopy.begin(); mite != measToCopy.end(); mite++) {
1486 std::vector<ALIstring> wlt;
1487 wlt.push_back( meas->
type() );
1491 std::cout <<
" newName " << newName << std::endl;
1492 wlt.push_back( newName );
1496 if( wlt.size() == 2 ) {
1521 meastemp->
copyMeas(meas, subsstr1, subsstr2);
1539 std::vector<Entry*>::const_iterator vecite;
1543 entryData = entryMgr->
findEntryByLongName( (*vecite)->OptOCurrent()->longName(), (*vecite)->name() );
1555 std::string str =
"";
1558 str =
"COCOA_Init ";
1560 str =
"COCOA_ReadingModel";
1562 str =
"COCOA_InitFit";
1564 str =
"COCOA_FitOK";
1566 str =
"COCOA_FitImproving";
1568 str =
"COCOA_FitCannotImprove";
1570 str =
"COCOA_FitChi2Worsened";
1572 str =
"COCOA_FitMatrixNonInversable";
1592 theOptOList.push_back( OptOsystem );
1602 std::vector<OpticalAlignInfo>::iterator ite;
1603 for( ite = theOpticalAlignments.begin(); ite != theOpticalAlignments.end(); ite++ ){
1605 if( (*ite).type_ == type ) {
1610 std::cerr <<
"!! WARNING: Model::FindOptAlignInfoByType more than one objects of type " << type << std::endl;
1612 <<
" skipping object " << (*ite).name_ << std::endl;
1617 std::cerr <<
"!! ERROR: Model::FindOptAlignInfoByType object not found, of type " << type << std::endl;
1628 std::vector<OpticalAlignMeasurementInfo>::iterator mite;
1631 std::vector<OpticalAlignMeasurementInfo> measInfos = measList.
oaMeasurements_;
1632 for( mite = measInfos.begin(); mite != measInfos.end(); mite++ ) {
1633 std::string measType = (*mite).type_;
1634 std::string measName = (*mite).name_;
1635 if(
ALIUtils::debug >= 4 )
std::cout <<
" BuildMeasurementsFromOA measType " << measType <<
" measName " << measName << std::endl;
1638 if ( measType ==
ALIstring(
"SENSOR2D") ) {
1640 }
else if ( measType ==
ALIstring(
"DISTANCEMETER3DIM") ) {
1642 }
else if ( measType ==
ALIstring(
"DISTANCEMETER") ||
1643 measType ==
ALIstring(
"DISTANCEMETER1DIM") ) {
1645 }
else if ( measType ==
ALIstring(
"TILTMETER") ) {
1647 }
else if ( measType ==
ALIstring(
"COPS") ) {
1649 }
else if ( measType ==
ALIstring(
"DIFFCENTRE") ) {
1651 }
else if ( measType ==
ALIstring(
"DIFFANGLE") ) {
1653 }
else if ( measType ==
ALIstring(
"DIFFENTRY") ) {
1656 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)
auto_ptr< ClusterSequence > cs
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 std::vector< Entry * > & ExtraEntryList() const
const ALIstring valueType(ALIuint ii) const
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
const std::vector< Entry * > & CoordinateEntryList() const
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
Only instance of Model.
static ALIstring only1Time
static GlobalOptionMgr * getInstance()
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static std::vector< Entry * > & EntryList()
static ALIstring theMatricesFName
the name of the File for storing the matrices
static ALIstring theSDFName
the name of the System Description File
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 int position[TOTALCHAMBERS][3]
static std::vector< std::vector< ALIstring > > & OptODictionary()
ACCESS STATIC DATA MEMBERS.
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)
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
Container::value_type value_type
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 Measurement * getMeasurementByName(const ALIstring &name, ALIbool exists=1)
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 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
static void CMSLinkRecoverParamFittedValueDisplacement(ALIint cmslink)
static std::vector< ALIdouble > theParamFittedSigmaVector
const ALIstring & type() const
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 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)
std::map< ALIstring, ALIdouble, std::less< ALIstring > > & GlobalOptions()
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)
ALIdouble valueDisplacement() const
void copyMeas(Measurement *meas, const std::string &subsstr1, const std::string &subsstr2)
static std::vector< Measurement * > & MeasurementList()
tuple size
Write out results.
static void setCurrentDate(const std::vector< ALIstring > &wl)
set the date of the current measurement