12 centroid_phis_.clear();
15 if (!
ifile.is_open()) {
16 throw std::runtime_error(
"Unable to open file: " +
filename);
19 while (!
ifile.eof()) {
21 float dxdy_slope, centroid_phi;
25 ifile.read(reinterpret_cast<char*>(&dxdy_slope),
sizeof(dxdy_slope));
26 ifile.read(reinterpret_cast<char*>(¢roid_phi),
sizeof(centroid_phi));
29 dxdy_slope_[
detid] = dxdy_slope;
30 centroid_phis_[
detid] = centroid_phi;
34 throw std::runtime_error(
"Failed to read Endcap Geometry binary data.");
39 fillGeoMapArraysExplicit();
43 nEndCapMap = centroid_phis_.size();
45 geoMapDetId_buf.reserve(nEndCapMap);
46 geoMapPhi_buf.reserve(nEndCapMap);
48 for (
auto it = centroid_phis_.begin();
it != centroid_phis_.end(); ++
it) {
50 float Phi =
it->second;
51 geoMapPhi_buf.push_back(
Phi);
52 geoMapDetId_buf.push_back(
detId);
58 return res == dxdy_slope_.end() ? 0.f :
res->second;
void fillGeoMapArraysExplicit()
void load(std::string const &)
float getdxdy_slope(unsigned int detid) const