13 if (!inputFile.is_open())
18 const float undef = -999;
19 while (getline(inputFile, line)) {
23 std::stringstream
ss(line);
24 ss >> etaMin >> etaMax >> effArea;
29 if (etaMin == undef || etaMax == undef || effArea == undef)
31 <<
"wrong file format, file name " <<
filename_ << std::endl;
58 printf(
"EffectiveAreas: source file %s\n",
filename_.c_str());
59 printf(
" eta_min eta_max effective area\n");
71 <<
"found no effective area constans in the file " <<
filename_ << std::endl;
78 <<
"eta ranges improperly defined (min>max) in the file" <<
filename_ << std::endl;
82 if (iEta != nEtaBins - 1)
85 <<
"eta ranges improperly defined (disjointed) in the file " <<
filename_ << std::endl;
92 <<
"effective area values are too large or negative in the file" <<
filename_ << std::endl;
const float getEffectiveArea(float eta) const
EffectiveAreas(const std::string &filename)
std::vector< float > absEtaMax_
std::vector< float > effectiveAreaValues_
Abs< T >::type abs(const T &t)
std::vector< float > absEtaMin_
void checkConsistency() const
void printEffectiveAreas() const
const std::string filename_