#include <FittedEntriesSet.h>
Definition at line 22 of file FittedEntriesSet.h.
FittedEntriesSet::FittedEntriesSet | ( | MatrixMeschach * | AtWAMatrix | ) |
Definition at line 21 of file FittedEntriesSet.cc.
References Fill(), Measurement::getCurrentDate(), stor::utils::getCurrentTime(), theDate, theEntriesErrorMatrix, theMinEntryQuality, and theTime.
{ //- theTime = Model::MeasurementsTime(); theDate = Measurement::getCurrentDate(); theTime = Measurement::getCurrentTime(); theMinEntryQuality = 2; theEntriesErrorMatrix = AtWAMatrix; Fill(); }
FittedEntriesSet::FittedEntriesSet | ( | std::vector< ALIstring > | wl | ) |
Definition at line 36 of file FittedEntriesSet.cc.
References FillEntriesFromFile(), theDate, theEntriesErrorMatrix, theMinEntryQuality, and theTime.
{ //- theTime = Model::MeasurementsTime(); theDate = wl[0]; theTime = "99:99"; theMinEntryQuality = 2; theEntriesErrorMatrix = (MatrixMeschach*)0; FillEntriesFromFile( wl ); }
FittedEntriesSet::FittedEntriesSet | ( | std::vector< FittedEntriesSet * > | vSets | ) |
Definition at line 50 of file FittedEntriesSet.cc.
References FillEntriesAveragingSets(), theDate, theEntriesErrorMatrix, theMinEntryQuality, and theTime.
{ theDate = "99/99/99"; theTime = "99:99"; theMinEntryQuality = 2; theEntriesErrorMatrix = (MatrixMeschach*)0; FillEntriesAveragingSets( vSets ); }
FittedEntriesSet::~FittedEntriesSet | ( | ) | [inline] |
Definition at line 31 of file FittedEntriesSet.h.
{ };
FittedEntriesSet::FittedEntriesSet | ( | MatrixMeschach * | AtWAMatrix | ) |
FittedEntriesSet::FittedEntriesSet | ( | std::vector< ALIstring > | wl | ) |
FittedEntriesSet::FittedEntriesSet | ( | std::vector< FittedEntriesSet * > | vSets | ) |
FittedEntriesSet::~FittedEntriesSet | ( | ) | [inline] |
Definition at line 31 of file FittedEntriesSet.h.
{ };
void FittedEntriesSet::CreateCorrelationMatrix | ( | const ALIuint | nent | ) |
Definition at line 126 of file FittedEntriesSet.cc.
References theCorrelationMatrix.
Referenced by FillCorrelations().
{ std::vector<ALIdouble> vd( nent, 0.); std::vector< std::vector<ALIdouble> > vvd( nent, vd); theCorrelationMatrix = vvd; }
void FittedEntriesSet::CreateCorrelationMatrix | ( | const ALIuint | nent | ) |
void FittedEntriesSet::Fill | ( | ) |
Definition at line 64 of file FittedEntriesSet.cc.
References FillCorrelations(), and FillEntries().
Referenced by FittedEntriesSet().
{ FillEntries( ); FillCorrelations( ); }
void FittedEntriesSet::Fill | ( | ) |
void FittedEntriesSet::FillCorrelations | ( | ) |
void FittedEntriesSet::FillCorrelations | ( | ) |
Definition at line 96 of file FittedEntriesSet.cc.
References begin, corr, CreateCorrelationMatrix(), Model::EntryList(), findQualityFiles::jj, MatrixMeschach::Mat(), mathSSE::sqrt(), theCorrelationMatrix, theEntriesErrorMatrix, and theMinEntryQuality.
Referenced by Fill().
{ //------ Count the number of entries that will be in the set ALIuint nent = 0; std::vector<Entry*>::const_iterator vecite; for ( vecite = Model::EntryList().begin(); vecite != Model::EntryList().end(); vecite++ ) { if((*vecite)->quality() > theMinEntryQuality ) { nent++; } } CreateCorrelationMatrix( nent ); //---------- Store correlations ALIuint ii; for( ii = 0; ii < nent; ii++) { for(ALIuint jj = ii+1; jj < nent; jj++) { ALIdouble corr = theEntriesErrorMatrix->Mat()->me[ii][jj]; if (corr != 0) { corr /= ( sqrt(theEntriesErrorMatrix->Mat()->me[ii][ii]) / sqrt(theEntriesErrorMatrix->Mat()->me[jj][jj]) ); theCorrelationMatrix[ii][jj] = corr; } } } }
void FittedEntriesSet::FillEntries | ( | ) |
Definition at line 74 of file FittedEntriesSet.cc.
References begin, Model::EntryList(), MatrixMeschach::Mat(), mathSSE::sqrt(), theEntriesErrorMatrix, theFittedEntries, and theMinEntryQuality.
Referenced by Fill().
{ //---------- Store Fitted Entries //----- Iterate over entry list std::vector<Entry*>::const_iterator vecite; for ( vecite = Model::EntryList().begin(); vecite != Model::EntryList().end(); vecite++ ) { //--- Only for good quality parameters (='unk') if ( (*vecite)->quality() >= theMinEntryQuality ) { // ALIdouble dimv = (*vecite)->ValueDimensionFactor(); // ALIdouble dims = (*vecite)->SigmaDimensionFactor(); ALIint ipos = (*vecite)->fitPos(); FittedEntry* fe = new FittedEntry( (*vecite), ipos, sqrt(theEntriesErrorMatrix->Mat()->me[ipos][ipos])); //- std::cout << fe << "IN fit FE " << fe->theValue<< " " << fe->Sigma()<< " " << sqrt(theEntriesErrorMatrix->Mat()->me[NoEnt][NoEnt]) / dims<< std::endl; theFittedEntries.push_back( fe ); } } }
void FittedEntriesSet::FillEntries | ( | ) |
void FittedEntriesSet::FillEntriesAveragingSets | ( | std::vector< FittedEntriesSet * > | vSets | ) |
void FittedEntriesSet::FillEntriesAveragingSets | ( | std::vector< FittedEntriesSet * > | vSets | ) |
Definition at line 150 of file FittedEntriesSet.cc.
References dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, ALIUtils::debug, cmsRelvalreport::exit, FittedEntries(), FittedEntry::getSigma(), FittedEntry::getValue(), findQualityFiles::jj, and theFittedEntries.
Referenced by FittedEntriesSet().
{ std::vector<FittedEntry*> vFEntry; ALIuint nEntry = vSets[0]->FittedEntries().size(); // ALIuint setssiz = vSets.size(); for( ALIuint ii = 0; ii < nEntry; ii++ ){ // loop to FittedEntry's if(ALIUtils::debug >= 5) std::cout << "FillEntriesAveragingSets entry " << ii << std::endl; vFEntry.clear(); for( ALIuint jj = 0; jj < vSets.size(); jj++ ){ // look for FittedEntry ii in each Sets if(ALIUtils::debug >= 5) std::cout << "FillEntriesAveragingSets set " << jj << std::endl; //----- Check all have the same number of entries if( vSets[jj]->FittedEntries().size() != nEntry ){ std::cerr << "!!! FATAL ERROR FittedEntriesSet::FillEntriesAveragingSets set number " << jj << " has different number of entries = " << vSets[jj]->FittedEntries().size() << " than first set = " << nEntry << std::endl; exit(1); } vFEntry.push_back( vSets[jj]->FittedEntries()[ii] ); } FittedEntry* fe = new FittedEntry( vFEntry ); if(ALIUtils::debug >= 5) std::cout << "FillEntriesAveragingSets new fentry " << fe->getValue() << " " << fe->getSigma() << std::endl; theFittedEntries.push_back( fe ); } }
void FittedEntriesSet::FillEntriesFromFile | ( | std::vector< ALIstring > | wl | ) |
Definition at line 137 of file FittedEntriesSet.cc.
References ALIUtils::getFloat(), and theFittedEntries.
Referenced by FittedEntriesSet().
{ ALIuint siz = wl.size(); for( ALIuint ii = 1; ii< siz; ii+=3 ) { FittedEntry* fe = new FittedEntry( wl[ii], ALIUtils::getFloat(wl[ii+1]), ALIUtils::getFloat(wl[ii+2])); theFittedEntries.push_back( fe ); } }
void FittedEntriesSet::FillEntriesFromFile | ( | std::vector< ALIstring > | wl | ) |
std::vector< FittedEntry* >& FittedEntriesSet::FittedEntries | ( | ) | [inline] |
Definition at line 42 of file FittedEntriesSet.h.
References theFittedEntries.
Referenced by FittedEntriesManager::dumpEntriesSubstraction(), and FillEntriesAveragingSets().
{ return theFittedEntries; }
std::vector< FittedEntry* >& FittedEntriesSet::FittedEntries | ( | ) | [inline] |
Definition at line 42 of file FittedEntriesSet.h.
References theFittedEntries.
{ return theFittedEntries; }
ALIstring& FittedEntriesSet::getDate | ( | ) | [inline] |
ALIstring& FittedEntriesSet::getDate | ( | ) | [inline] |
ALIstring& FittedEntriesSet::getTime | ( | ) | [inline] |
ALIstring& FittedEntriesSet::getTime | ( | ) | [inline] |
void FittedEntriesSet::SetOptOEntries | ( | ) |
Definition at line 182 of file FittedEntriesSet.cc.
References gather_cfg::cout, ALIUtils::debug, Model::getEntryByName(), FittedEntry::getEntryName(), Model::getOptOByName(), FittedEntry::getOptOName(), FittedEntry::getSigma(), FittedEntry::getValue(), OpticalObject::name(), OpticalObject::setGlobalCoordinates(), OpticalObject::setOriginalEntryValues(), Entry::setValue(), and theFittedEntries.
{ if(ALIUtils::debug >= 5) std::cout << " FittedEntriesSet::SetOptOEntries " << theFittedEntries.size() << std::endl; std::vector< FittedEntry* >::const_iterator ite; for( ite = theFittedEntries.begin();ite != theFittedEntries.end();ite++){ FittedEntry* fe = (*ite); OpticalObject * opto = Model::getOptOByName( fe->getOptOName() ); Entry* entry = Model::getEntryByName( fe->getOptOName(), fe->getEntryName() ); entry->setValue( fe->getValue() ); entry->setSigma( fe->getSigma() ); if(ALIUtils::debug >= 5) std::cout << " FittedEntriesSet::SetOptOEntries() " << opto->name() << " " << entry->name() << std::endl; opto->setGlobalCoordinates(); opto->setOriginalEntryValues(); } }
void FittedEntriesSet::SetOptOEntries | ( | ) |
std::vector< std::vector< ALIdouble > > FittedEntriesSet::theCorrelationMatrix [private] |
Definition at line 61 of file FittedEntriesSet.h.
Referenced by CreateCorrelationMatrix(), and FillCorrelations().
ALIstring FittedEntriesSet::theDate [private] |
Definition at line 59 of file FittedEntriesSet.h.
Referenced by FittedEntriesSet(), and getDate().
Definition at line 63 of file FittedEntriesSet.h.
Referenced by FillCorrelations(), FillEntries(), and FittedEntriesSet().
std::vector< FittedEntry * > FittedEntriesSet::theFittedEntries |
Definition at line 56 of file FittedEntriesSet.h.
Referenced by FillEntries(), FillEntriesAveragingSets(), FillEntriesFromFile(), FittedEntries(), and SetOptOEntries().
ALIint FittedEntriesSet::theMinEntryQuality [private] |
Definition at line 62 of file FittedEntriesSet.h.
Referenced by FillCorrelations(), FillEntries(), and FittedEntriesSet().
ALIstring FittedEntriesSet::theTime [private] |
Definition at line 60 of file FittedEntriesSet.h.
Referenced by FittedEntriesSet(), and getTime().