50 fout.open(
"fittedEntries.out");
51 fout2.open(
"longFittedEntries.out");
59 std::vector<FittedEntriesSet*>::const_iterator vfescite;
60 std::vector<FittedEntry*>::const_iterator vfecite;
68 for (vfecite = ((*vfescite)->FittedEntries()).
begin(); vfecite != ((*vfescite)->FittedEntries()).
end();
71 fout << ii <<
": " << std::setw(13) << filename <<
" ";
74 std::cout << ii <<
": " << std::setw(13) << filename <<
" = " << (*vfecite)->getName() << std::endl;
78 std::cout <<
"OPENING FITTED ENTRIES file " << filename << std::endl;
92 fout << (*vfescite)->getDate() <<
" " << (*vfescite)->getTime() <<
" ";
93 fout2 << (*vfescite)->getDate() <<
" " << (*vfescite)->getTime() <<
" ";
97 for (vfecite = ((*vfescite)->FittedEntries()).
begin(); vfecite != ((*vfescite)->FittedEntries()).
end(); ++vfecite) {
100 fout << std::setprecision(8) << std::setw(10) << (*vfecite)->getValue() <<
" " << (*vfecite)->getSigma() <<
" ";
104 std::cout <<
" FITTEDENTRY:" << std::setprecision(5) << std::setw(8) << (*vfecite)->getValue() <<
" +- "
105 << (*vfecite)->getSigma() << std::endl;
108 fout2 << std::setprecision(8) << std::setw(10) << filename <<
" " << (*vfecite)->getValue() <<
" "
109 << (*vfecite)->getSigma() <<
" ";
131 std::vector<OpticalObject*>::const_iterator ite;
132 std::map<ALIstring, LightRay*> lrays;
134 for (ite = optoList.begin(); ite != optoList.end(); ++ite) {
135 if ((*ite)->type() ==
"laser") {
138 lrays[(*ite)->parent()->name()] = lightray;
142 std::map<ALIstring, LightRay*>::const_iterator lite1, lite2;
143 for (lite1 = lrays.begin(); lite1 != lrays.end(); ++lite1) {
146 for (; lite2 != lrays.end(); ++lite2) {
149 CLHEP::Hep3Vector dirdiff = ((*lite1).second->direction() - (*lite2).second->direction());
151 std::cout <<
"LASER DIFF " << (*lite1).first <<
" & " << (*lite2).first <<
" " << dirdiff.mag() * 180. /
M_PI
152 <<
"o " << dirdiff.mag() <<
" rad " << dirdiff << std::endl;
154 (*lite1).second->dumpData(
ALIstring(
" laser ") + (*lite1).first);
155 (*lite2).second->dumpData(
ALIstring(
" laser ") + (*lite2).first);
175 filename = optoName.substr(2, optoName.size());
178 slash = filename.find(
'/', slash + 1);
181 filename[
slash] =
'.';
185 ALIint space = entryName.rfind(
' ');
186 filename.append(
".");
195 std::cout <<
"filename " << filename << std::endl;
232 fout << std::setprecision(6) << std::setw(8) << val <<
" +- " << sig <<
" ";
234 std::cout <<
" FITTEDENTRY:" << std::setprecision(5) << std::setw(8) << val <<
" +- " << sig << std::endl;
void AddFittedEntriesSet(FittedEntriesSet *fents)
std::vector< FittedEntry * > & FittedEntries()
void dumpEntriesSubstraction(std::ofstream &fout, FittedEntriesSet &fes, ALIint order1, ALIint order2)
ALIstring createFileName(const ALIstring &optoName, const ALIstring &entryName)
static std::vector< OpticalObject * > & OptOList()
static GlobalOptionMgr * getInstance()
void GetDifferentBetweenLasers()
ALIdouble getSigma() const
static FittedEntriesManager * getInstance()
static FittedEntriesManager * instance
std::map< ALIstring, ALIdouble, std::less< ALIstring > > & GlobalOptions()
std::vector< FittedEntriesSet * > theFittedEntriesSets
void startLightRay(OpticalObject *opto)
ALIdouble getValue() const
tuple size
Write out results.
static void dumpDimensions(std::ofstream &fout)