19 #include "GaudiKernel/StatusCode.h"
45 return StatusCode::SUCCESS;
51 const auto monitoring_number = ctx.eventID().event_number();
55 return StatusCode::SUCCESS;
65 if (!cluster_collection.
isValid())
68 return StatusCode::FAILURE;
77 time_clusMaker.start();
78 time_clusCorr.start();
79 time_clusMaker.stop();
93 std::vector<double> clus_phi;
94 std::vector<double> clus_eta;
95 std::vector<double> clus_n_bad_cells;
96 std::vector<double> clus_eng_frac_max;
97 std::vector<unsigned int> size_vec;
98 clus_phi.reserve(1024);
99 clus_eta.reserve(1024);
100 clus_n_bad_cells.reserve(1024);
101 clus_eng_frac_max.reserve(1024);
102 size_vec.reserve(1024);
116 mon_container_size = cluster_collection_ptr->
size();
123 size_vec.push_back(0);
127 size_vec.push_back(num_cell_links->
size());
129 clus_phi.push_back(
cl->phi());
130 clus_eta.push_back(
cl->eta());
140 read_mu = eventInfoDecor(0);
148 int count_1thrsigma = 0, count_2thrsigma = 0;
150 if (really_monitor_cells)
153 if ( !cell_collection.
isValid() )
155 ATH_MSG_ERROR(
" Cannot retrieve CaloCellContainer: " << cell_collection.
name() );
156 return StatusCode::FAILURE;
161 for (
const auto &
cell : *cell_collection)
165 const bool is_tile = cdde->
is_tile();
172 const float cell_energy =
cell->energy();
186 count_1thrsigma += 1;
189 count_2thrsigma += 1;
196 if (really_monitor_cells)
201 auto moncount_1thrsigma_by_mu2 =
Monitored::Scalar(
"count_1thrsigma_by_mu2", -999.0);
202 auto moncount_2thrsigma_by_mu2 =
Monitored::Scalar(
"count_2thrsigma_by_mu2", -999.0);
207 const float rev_mu = 1.f / read_mu;
208 mon_container_size_by_mu = rev_mu * cluster_collection_ptr->size();
209 const float sqr_rev_mu = rev_mu * rev_mu;
210 moncount_1thrsigma_by_mu2 = sqr_rev_mu * count_1thrsigma;
211 moncount_2thrsigma_by_mu2 = sqr_rev_mu * count_2thrsigma;
214 moncount_1thrsigma = count_1thrsigma;
215 moncount_2thrsigma = count_2thrsigma;
218 mon_clusEt, mon_clusPhi, mon_clusEta, mon_clusSignalState, mon_clusSize,
219 mon_badCells, mon_engFrac, mon_size, monmu, mon_container_size_by_mu,
220 moncount_1thrsigma, moncount_2thrsigma, moncount_1thrsigma_by_mu2, moncount_2thrsigma_by_mu2 );
226 mon_container_size_by_mu = cluster_collection_ptr->size() / read_mu;
229 mon_clusEt, mon_clusPhi, mon_clusEta, mon_clusSignalState, mon_clusSize,
230 mon_badCells, mon_engFrac, mon_size, monmu, mon_container_size_by_mu);
233 return StatusCode::SUCCESS;