11 using namespace InDet;
21 constexpr
unsigned int n_different_pixel_matrices_max=6;
22 m_dimPerHist.reserve(n_different_pixel_matrices_max);
23 m_hist.reserve(n_different_pixel_matrices_max);
25 m_moduleHist =
new TH2F(
"rejected_hits_per_module",
"Rejected hits per module",
29 m_moduleHist->GetXaxis()->SetTitle(
"ID hash % 100");
30 m_moduleHist->GetYaxis()->SetTitle(
"ID hash / 100");
32 return StatusCode::FAILURE;
36 return StatusCode::SUCCESS;
40 return StatusCode::SUCCESS;
44 unsigned int key=(n_rows << 16) | n_cols;
45 std::vector<unsigned int>::const_iterator iter =
std::find(m_dimPerHist.begin(),m_dimPerHist.end(),
key );
46 if (iter == m_dimPerHist.end()) {
47 if (m_dimPerHist.size() == m_dimPerHist.capacity()) {
48 if (m_dimPerHist.capacity()==0) {
56 std::stringstream
name;
57 name <<
"rejected_hits_" << n_rows <<
"_" << n_cols;
58 std::stringstream
title;
59 title <<
"Rejected hits for " << n_rows <<
"(rows) #times " << n_cols <<
" (columns)";
60 m_hist.push_back(
new TH2F(
name.str().c_str(),
title.str().c_str(),
61 n_cols, -0.5, n_cols-0.5,
62 n_rows, -0.5, n_rows-0.5
64 m_hist.back()->GetXaxis()->SetTitle(
"offline column");
65 m_hist.back()->GetYaxis()->SetTitle(
"offline row");
67 throw std::runtime_error(
"Failed to register histogram.");
69 m_dimPerHist.push_back(
key);
74 return m_hist.at(iter-m_dimPerHist.begin());