46 #ifdef OS_OSPACE_STD_NAMESPACE 47 using namespace os_std;
86 theInstance =
new Model;
113 std::vector<ALIstring> SectionTitle;
114 SectionTitle.push_back(
ALIstring(
"GLOBAL_OPTIONS"));
115 SectionTitle.push_back(
ALIstring(
"PARAMETERS"));
116 SectionTitle.push_back(
ALIstring(
"SYSTEM_TREE_DESCRIPTION"));
117 SectionTitle.push_back(
ALIstring(
"SYSTEM_TREE_DATA"));
118 SectionTitle.push_back(
ALIstring(
"MEASUREMENTS"));
119 SectionTitle.push_back(
ALIstring(
"REPORT.OUT"));
120 std::vector<ALIstring>::iterator SectionTitleIterator;
123 std::vector<ALIstring> wordlist;
125 ALIint currentSectionNo = -1;
126 while (!filein.
eof()) {
129 assert( !wordlist.empty() );
139 SectionTitleIterator =
find(SectionTitle.begin(), SectionTitle.end(), *wordlist.begin());
140 if( SectionTitleIterator != SectionTitle.end() ) {
142 currentSectionNo = SectionTitleIterator - SectionTitle.begin();
143 if ( currentSectionNo != InSectionNo + 1 ) {
146 std::cerr <<
"BAD ORDER OF SECTIONS, reading section " 147 << *SectionTitleIterator << std::endl
148 <<
" currentSectionNo = " << currentSectionNo <<
" InSectionNo = " << InSectionNo << std::endl
149 <<
" --------- Please see documentation ---------- " << std::endl;
158 SetValueDisplacementsFromReportOut();
161 if(
ALIUtils::debug >= 4)
std::cout << std::endl <<
"START OF SECTION: " << currentSectionNo <<
" " << *SectionTitleIterator << std::endl;
169 if( wordlist.size() == 2 ) {
172 if (!isnumber && wordlist[0] !=
ALIstring(
"external_meas")) {
174 std::cerr <<
": EXPECTING A NUMBER, FOUND: " << wordlist[1] << std::endl;
190 std::cerr <<
": IN GLOBAL_OPTIONS section TWO-WORD LINES ARE EXPECTED " << std::endl;
203 currentSectionNo == -1 ) {
207 if( wordlist.size() == 2 ) {
222 }
else if( wordlist.size() == 3 ) {
223 if( wordlist[1] !=
"seed" ) {
225 std::cerr <<
": For a three-word parameter line, second has to be 'seed', it is " << wordlist[1] << std::endl;
229 if( wordlist[0] ==
"gauss" || wordlist[0] ==
"flat" ){
233 std::cerr <<
": For a three-word parameter line, first has to be 'gauss' or 'flat', it is " << wordlist[0] << std::endl;
236 }
else if( wordlist.size() == 4 ) {
237 if( wordlist[0] ==
"gauss" ) {
239 }
else if( wordlist[0] ==
"flat" ) {
243 std::cerr <<
": For a four-word parameter line, first has to be 'gauss' or 'flat', it is " << wordlist[0] << std::endl;
248 std::cerr <<
": IN PARAMETERS section TWO-WORD-LINES ARE EXPECTED " << std::endl;
264 std::vector<ALIstring> wordlist2 = wordlist;
265 std::vector<ALIstring>::iterator vsite;
266 ALIint wsiz = wordlist.size();
271 for ( vsite=wordlist2.begin(); vsite!=wordlist2.end(); ++vsite ) {
273 int nOpticalObjects = atoi( (*vsite).c_str() );
275 if( nOpticalObjects == 1 ) {
277 <<
" number of repeated OpticalObjects = 1. Please avoid the numbering " << std::endl;
283 std::cerr <<
"NUMBER SHOULD BE FOLLOWED BY an OpticalObject type" << std::endl;
292 wordlist.push_back( *(vsite+1) );
297 wordlist.push_back( *vsite );
308 if ( wordlist[0] ==
ALIstring(
"object") ) {
310 std::vector< std::vector<ALIstring> >::iterator vvsite;
311 for ( vvsite = theOptODictionary.begin(); vvsite != theOptODictionary.end(); ++vvsite) {
314 if( *( (*vvsite).begin() ) == wordlist[1] ) {
316 std::cerr <<
"SYSTEM_TREE_DESCRIPTION: REPEATED object " << *((*vvsite).begin()) <<
" ( NOT ALLOWED NEITHER WITH EQUAL NOR WITH DIFFERENT COMPONENTS)" << std::endl;
321 std::vector<ALIstring> vstemp;
322 copy( wordlist.begin()+1, wordlist.end(),back_inserter( vstemp ) );
326 if(OptODictionary().
empty()) {
328 std::cerr <<
"SYSTEM_TREE_DESCRIPTION section: FIRST LINE SHOULD START WITH 'object'" << std::endl;
331 copy(wordlist.begin(), wordlist.end(),
332 back_inserter( *(OptODictionary().
end()-1) ) );
339 if ( !data_reading ) {
342 std::vector< std::vector<ALIstring> > OptODictionary2;
343 reorderOptODictionary(
"system", OptODictionary2);
344 if(OptODictionary2.empty()) {
345 std::cerr <<
"SYSTEM_TREE_DESCRIPTION section: no object 'system' found " << std::endl;
350 std::vector< std::vector<ALIstring> >::const_iterator vvscite, vvscite2;
352 for( vvscite = theOptODictionary.begin(); vvscite != theOptODictionary.end(); ++vvscite) {
354 for( vvscite2 = OptODictionary2.begin(); vvscite2 != OptODictionary2.end(); ++vvscite2) {
355 if( *( (*vvscite).begin() ) == *( (*vvscite2).begin() ) ) {
361 std::cerr <<
"!!!SYSTEM_TREE_DESCRIPTION section: object " << *( (*vvscite).begin()) <<
" is not hanging from object 'system' " << std::endl;
362 for (vvscite=OptODictionary().begin();vvscite!=OptODictionary().end();++vvscite){
363 std::vector<ALIstring> ptemp = *vvscite;
369 theOptODictionary = OptODictionary2;
375 std::vector< std::vector<ALIstring> >::iterator itevs;
376 for (itevs=OptODictionary().
begin();itevs!=OptODictionary().end();++itevs){
377 std::vector<ALIstring> ptemp = *itevs;
384 if(wordlist[0] !=
"system" ) {
385 std::cerr <<
"SYSTEM_TREE_DATA section: object 'system' is not the first one " << std::endl;
393 theOptOList.push_back( OptOsystem );
398 std::cerr <<
" STILL SOME LINES AFTER ALL SYSTEM TREE IS READ!!!"<< std::endl;
409 if( wordlist.size() == 2 ) {
410 measName = wordlist[1];
415 if ( measType ==
ALIstring(
"SENSOR2D") ) {
419 }
else if ( measType ==
ALIstring(
"DISTANCEMETER3DIM") ) {
423 }
else if ( measType ==
ALIstring(
"DISTANCEMETER") ||
424 measType ==
ALIstring(
"DISTANCEMETER1DIM") ) {
428 }
else if ( measType ==
ALIstring(
"TILTMETER") ) {
432 }
else if ( measType ==
ALIstring(
"COPS") ) {
436 }
else if ( measType ==
ALIstring(
"DIFFCENTRE") ) {
439 }
else if ( measType ==
ALIstring(
"DIFFANGLE") ) {
442 }
else if ( measType ==
ALIstring(
"DIFFENTRY") ) {
445 }
else if ( measType ==
ALIstring(
"measurements_from_file") || measType ==
ALIstring(
"@measurements_from_file") ) {
449 if( wordlist.size() == 4) {
455 }
else if ( measType ==
ALIstring(
"measurements_from_file_ROOT") || measType ==
ALIstring(
"@measurements_from_file") ) {
457 }
else if ( wordlist[0] ==
ALIstring(
"correlations_from_file") || wordlist[0] ==
ALIstring(
"@correlations_from_file") ) {
459 }
else if ( wordlist[0] ==
ALIstring(
"copy_measurements") || wordlist[0] ==
ALIstring(
"@copy_measurements") ) {
460 copyMeasurements( wordlist );
463 }
else if ( wordlist[0] ==
ALIstring(
"fittedEntries_from_file") ) {
465 if (
ALIUtils::debug >= 2)
std::cout <<
" setting fittedEntries_from_file " << wordlist[0] <<
" == " << wordlist[1] << std::endl;
467 std::cerr <<
"Measurement:" << std::endl;
469 std::cerr <<
"!!! type of measurement not allowed: " << wordlist[0]
471 std::cerr <<
" Allowed types: SENSOR2D, DISTANCEMETER, DISTANCEMETER1DIM, TILTMETER, COPS, DIFFENTRY " << std::endl;
481 std::cerr <<
"BAD ORDER OF SECTIONS, reading section " 482 << *SectionTitleIterator << std::endl
483 <<
" currentSectionNo = " << currentSectionNo <<
" InSectionNo = " << InSectionNo << std::endl
484 <<
" --------- Please see documentation ---------- " << std::endl;
500 std::cout <<
"---------- SYSTEM SUCCESFULLY READ ----------" << std::endl << std::endl;
516 std::vector< std::vector<ALIstring> >::iterator vvsite;
517 std::vector< ALIstring >::iterator vsite;
520 for( vvsite = OptODictionary().
begin(); vvsite != OptODictionary().end(); ++vvsite) {
521 if( *( (*vvsite).begin() ) == ssearch ) {
523 OptODictionary2.push_back(*vvsite);
530 for( vsite = (*vvsite).begin()+1; vsite != (*vvsite).end(); ++vsite ) {
531 reorderOptODictionary( *vsite, OptODictionary2 );
551 std::vector< Measurement* >::const_iterator vmcite;
552 for ( vmcite = MeasurementList().
begin(); vmcite != MeasurementList().end(); ++vmcite) {
583 std::vector< OpticalObject* >::const_iterator vocite;
584 for( vocite = OptOList().
begin(); vocite != OptOList().end(); ++vocite ) {
585 if( (*vocite)->name() == opto_name )
break;
588 if ( vocite == OptOList().end() ) {
590 std::cerr <<
" LIST OF OpticalObjects " << std::endl;
591 for( vocite = OptOList().begin(); vocite != OptOList().end(); ++vocite ) {
592 std::cerr << (*vocite)->name() << std::endl;
594 std::cerr <<
"!!EXITING at getOptOByName: Optical Object " << opto_name <<
" doesn't exist!!" << std::endl;
600 std::cout << opto_name.c_str() <<
"SSOptOitem" << (*vocite) << (*vocite)->name() <<
"len" << OptOList().size() << std::endl;
615 std::vector< OpticalObject* >::const_iterator vocite;
616 for( vocite = OptOList().
begin(); vocite != OptOList().end(); ++vocite ) {
618 if( (*vocite)->type() == opto_type )
break;
621 if ( vocite == OptOList().end() ) {
623 std::cerr <<
"!!EXITING at getOptOByType: Optical Object " << opto_type <<
" doesn't exist!!" << std::endl;
638 std::vector<Entry*>::const_iterator vecite;
639 for( vecite = EntryList().
begin(); vecite != EntryList().end(); ++vecite) {
641 <<
" E " << (*vecite)->name() <<
" Searching: " << opto_name <<
" E " << entry_name << std::endl;
643 if( (*vecite)->OptOCurrent()->name() == opto_name &&
644 (*vecite)->name() == entry_name ) {
649 std::cerr <<
"!!!EXITING at getEntryByName: Entry name not found:" << opto_name <<
" " << entry_name << std::endl;
658 std::vector< Measurement* >::const_iterator vmcite;
659 for( vmcite = theMeasurementVector.begin(); vmcite != theMeasurementVector.end(); ++vmcite ) {
660 if( (*vmcite)->name() == meas_name )
break;
663 if ( vmcite != theMeasurementVector.end() ) {
669 std::cerr <<
" LIST OF Measurements " << std::endl;
670 for( vmcite = theMeasurementVector.begin(); vmcite != theMeasurementVector.end(); ++vmcite ) {
671 std::cerr << (*vmcite)->name() << std::endl;
673 std::cerr <<
"!!EXITING at getMeasurementByName: Measurement " << meas_name <<
" doesn't exist!!" << std::endl;
695 std::vector<ALIstring>::iterator vsite;
696 for (vsite = vcomponents.begin(); vsite != vcomponents.end(); ++vsite) {
697 vcomponents.pop_back();
701 ALIint ALIstring_found = 0;
702 std::vector< std::vector<ALIstring> >::iterator vvsite;
703 for( vvsite = OptODictionary().
begin(); vvsite != OptODictionary().end(); ++vvsite) {
704 if( *( (*vvsite).begin() ) == opto_type ) {
707 vcomponents = *vvsite;
708 vcomponents.erase( vcomponents.begin() );
713 if ( ALIstring_found ) {
728 std::vector<OpticalObject*>::iterator voite;
729 for (voite = vcomponents.begin(); voite != vcomponents.end(); ++voite) {
730 vcomponents.pop_back();
737 std::vector<OpticalObject*>::const_iterator vocite;
741 for (vocite = OptOList().
begin(); vocite != OptOList().end(); ++vocite) {
742 if( (*vocite)->parent() !=
nullptr ) {
744 if( (*vocite)->parent()->name() == opto_name ) {
746 vcomponents.push_back( (*vocite) );
778 theOptOsToCopyList.erase( theOptOsToCopyList.begin(), theOptOsToCopyList.end() );
781 fillCopyComponentList( start_opto );
784 theOptOsToCopyListIterator = theOptOsToCopyList.begin();
796 std::vector<OpticalObject*> vopto;
797 ALIbool opto_found = getComponentOptOs( opto->
name(), vopto);
803 std::vector<OpticalObject*>::const_iterator vocite;
804 for( vocite = vopto.begin(); vocite != vopto.end(); ++vocite ){
805 theOptOsToCopyList.push_back( *vocite );
806 if(
ALIUtils::debug >= 5)
std::cout <<
"fillCopyOptOList " << (*vocite)->type() <<
" " << (*vocite)->name() << std::endl;
808 fillCopyComponentList( *vocite );
821 ++theOptOsToCopyListIterator;
823 return *(theOptOsToCopyListIterator-1);
893 ALIuint odsize = theOptODictionary.size();
895 theOptODictionary.pop_back();
913 if(
ALIUtils::debug >= 2)
std::cout <<
"CMSLinkDeleteOptOs: cms_link_halfplanes " << cmslink_halfplanes << cmslink_iter << std::endl;
915 if( cmslink_iter == 1){
919 deleteOptO(
"s/mabsL");
921 if (cmslink_method == 1){
922 deleteOptO(
"s/tracker/det_trkDL");
923 deleteOptO(
"s/tracker/det_trkDR");
926 if( cmslink_halfplanes == 2) {
928 deleteOptO(
"s/mabsR");
931 }
else if( cmslink_iter == 2) {
934 deleteOptO(
"s/mabsL");
935 deleteOptO(
"s/tracker/CST/wheel_trkL/peri/mirror");
936 deleteOptO(
"s/tracker/CST/wheel_trkL/det_trkU");
940 if( cmslink_halfplanes <= 1) {
941 deleteOptO(
"s/tracker/CST/wheel_trkR");
942 }
else if( cmslink_halfplanes == 2) {
944 deleteOptO(
"s/mabsR");
945 deleteOptO(
"s/tracker/CST/wheel_trkR/peri/mirror");
946 deleteOptO(
"s/tracker/CST/wheel_trkR/det_trkU");
949 }
else if( cmslink_iter == 3) {
952 deleteOptO(
"s/tracker");
954 if( cmslink_halfplanes == 2) {
1164 std::vector<Entry*>::const_iterator vecite;
1165 std::vector<Entry*>::iterator veite2;
1169 veite2 =
find( theEntryVector.begin(), theEntryVector.end(), (*vecite) );
1171 delete ( (*veite2) );
1172 theEntryVector.erase( veite2 );
1177 veite2 =
find( theEntryVector.begin(), theEntryVector.end(), (*vecite) );
1179 delete ( (*veite2) );
1180 theEntryVector.erase( veite2 );
1184 for( vecite = theEntryVector.begin(); vecite != theEntryVector.end(); ++vecite ) {
1189 std::vector<Measurement*> MeasToBeDeleted;
1190 std::vector<Measurement*>::const_iterator vmite;
1191 std::vector<OpticalObject*>::const_iterator vocite;
1192 for( vmite = MeasurementList().begin(); vmite != MeasurementList().end(); ++vmite ) {
1195 for( vocite = (*vmite)->OptOList().begin(); vocite != (*vmite)->OptOList().end(); ++vocite) {
1196 if( (*vocite) == opto ) {
1198 MeasToBeDeleted.push_back( *vmite );
1206 std::vector<Measurement*>::const_iterator vmcite;
1207 std::vector<Measurement*>::iterator vmite2;
1209 for( vmcite = MeasToBeDeleted.begin(); vmcite != MeasToBeDeleted.end(); ++vmcite) {
1210 vmite2 =
find( theMeasurementVector.begin(), theMeasurementVector.end(), (*vmcite) );
1212 delete ( (*vmite2) );
1213 theMeasurementVector.erase( vmite2 );
1219 std::vector<OpticalObject*> vopto;
1221 for( vocite = vopto.begin(); vocite != vopto.end(); ++vocite ) {
1222 deleteOptO( *vocite );
1230 std::vector< OpticalObject* >::iterator dvoite =
1231 find( theOptOList.begin(), theOptOList.end(),
1234 theOptOList.erase( dvoite );
1323 if( position >= theParamFittedSigmaVector.size() ) {
1324 std::cerr <<
"!!EXITING at getParamFittedSigma: position" << position <<
1325 " bigger than dimension of theParamFittedSigmaVector " << theParamFittedSigmaVector.size() << std::endl;
1328 std::vector<ALIdouble>::const_iterator vdcite = theParamFittedSigmaVector.begin() +
position;
1344 std::vector<ALIstring> wordlist;
1371 if( wordlist[0] ==
"DATE:" ) {
1379 <<
" DATE: " << wordlist[1] <<
" " << wordlist[1] << std::endl;
1382 for(ii = 0; ii < nMeas; ii++) {
1385 if( wordlist.size() != 2 ) {
1386 std::cerr <<
"!!!EXITING Model::readMeasurementsFromFile. number of words should be 2 instead of " << wordlist.size() << std::endl;
1390 std::vector< Measurement* >::const_iterator vmcite;
1391 for( vmcite = MeasurementList().
begin(); vmcite != MeasurementList().end(); ++vmcite ) {
1399 ALIint fcolon = (*vmcite)->name().find(
':');
1401 oname = oname.substr(fcolon+1,oname.length());
1403 if( oname == wordlist[1] ) {
1405 if( (*vmcite)->type() != wordlist[0] ) {
1406 std::cerr <<
"!!! Reading measurement from file: type in file is " 1407 << wordlist[0] <<
" and should be " << (*vmcite)->type() << std::endl;
1415 for (
ALIuint ii=0; ii < meastemp->
dim(); ii++){
1424 if( meastemp->
valueType(ii) != wordlist[0] ) {
1426 std::cerr <<
"!!!FATAL ERROR: Measurement value type is " << wordlist[0] <<
" while in setup definition was " << meastemp->
valueType(ii) << std::endl;
1429 meastemp->
fillData( ii, wordlist );
1438 if( vmcite == MeasurementList().
end() ) {
1439 for( vmcite = MeasurementList().
begin(); vmcite != MeasurementList().end(); ++vmcite ) {
1440 std::cerr <<
"MEAS: " << (*vmcite)->name() <<
" " << (*vmcite)->type() << std::endl;
1442 std::cerr <<
"!!! Reading measurement from file: measurement not found in list: type in file is " << wordlist[1] << std::endl;
1446 std::cerr <<
" wrong type of measurement: " << wordlist[0] << std::endl
1447 <<
" Available types are SENSOR2D, TILTMETER, DISTANCEMETER, DISTANCEMETER1DIM, COPS" << std::endl;
1469 std::string subsstr2 = wl[1].substr( wl[1].
find(
"/")+1, wl[1].rfind(
"/") - wl[1].
find(
"/")-1 );
1470 std::string querystr = wl[1].substr( wl[1].rfind(
"/")+1, wl[1].length() );
1472 std::cout <<
" Model::copyMeasurements " <<
" subsstr1 " << subsstr1 <<
" subsstr2 " << subsstr2 <<
" querystr " << querystr << std::endl;
1474 std::vector< Measurement* > measToCopy;
1475 std::vector< Measurement* >::iterator mite;
1476 for( mite = theMeasurementVector.begin(); mite != theMeasurementVector.end(); ++mite) {
1479 if( meas->
name().find( querystr ) != std::string::npos ) {
1480 measToCopy.push_back( meas );
1486 for( mite = measToCopy.begin(); mite != measToCopy.end(); ++mite) {
1488 std::vector<ALIstring> wlt;
1489 wlt.push_back( meas->
type() );
1493 std::cout <<
" newName " << newName << std::endl;
1494 wlt.push_back( newName );
1498 if( wlt.size() == 2 ) {
1522 <<
"@SUB=Model::copyMeasurements\n" 1523 <<
"unknown measurement type: " << meas->
type();
1527 meastemp->
copyMeas(meas, subsstr1, subsstr2);
1545 std::vector<Entry*>::const_iterator vecite;
1549 entryData = entryMgr->
findEntryByLongName( (*vecite)->OptOCurrent()->longName(), (*vecite)->name() );
1564 str =
"COCOA_Init ";
1566 str =
"COCOA_ReadingModel";
1568 str =
"COCOA_InitFit";
1570 str =
"COCOA_FitOK";
1572 str =
"COCOA_FitImproving";
1574 str =
"COCOA_FitCannotImprove";
1576 str =
"COCOA_FitChi2Worsened";
1578 str =
"COCOA_FitMatrixNonInversable";
1598 theOptOList.push_back( OptOsystem );
1608 std::vector<OpticalAlignInfo>::iterator ite;
1609 for( ite = theOpticalAlignments.begin(); ite != theOpticalAlignments.end(); ++ite ){
1611 if( (*ite).type_ == type ) {
1616 std::cerr <<
"!! WARNING: Model::FindOptAlignInfoByType more than one objects of type " << type << std::endl;
1618 <<
" skipping object " << (*ite).name_ << std::endl;
1623 std::cerr <<
"!! ERROR: Model::FindOptAlignInfoByType object not found, of type " << type << std::endl;
1634 std::vector<OpticalAlignMeasurementInfo>::iterator mite;
1637 std::vector<OpticalAlignMeasurementInfo> measInfos = measList.
oaMeasurements_;
1638 for( mite = measInfos.begin(); mite != measInfos.end(); ++mite ) {
1641 if(
ALIUtils::debug >= 4 )
std::cout <<
" BuildMeasurementsFromOA measType " << measType <<
" measName " << measName << std::endl;
1644 if ( measType ==
ALIstring(
"SENSOR2D") ) {
1646 }
else if ( measType ==
ALIstring(
"DISTANCEMETER3DIM") ) {
1648 }
else if ( measType ==
ALIstring(
"DISTANCEMETER") ||
1649 measType ==
ALIstring(
"DISTANCEMETER1DIM") ) {
1651 }
else if ( measType ==
ALIstring(
"TILTMETER") ) {
1653 }
else if ( measType ==
ALIstring(
"COPS") ) {
1659 }
else if ( measType ==
ALIstring(
"DIFFENTRY") ) {
1662 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 std::vector< Entry * > & ExtraEntryList() const
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
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 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)
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
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 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()
static void setCurrentDate(const std::vector< ALIstring > &wl)
set the date of the current measurement