20 #include "GaudiKernel/StatusCode.h"
77 for (ToolHandle<CaloClusterCollectionProcessor>& clproc :
m_clusterMakers) {
80 AlgTool* algtool =
dynamic_cast<AlgTool*
> (clproc.get());
81 if (clproc->name().find(
"CaloTopoClusterMaker") != std::string::npos) {
83 ATH_MSG_ERROR(
"Could not cast " << clproc->name() <<
" to an AlgTool!");
84 return StatusCode::FAILURE;
88 if (clproc->name().find(
"trigslw") != std::string::npos)
99 ATH_MSG_DEBUG(
"Initialization of TrigCaloClusterMaker completed successfully");
101 return StatusCode::SUCCESS;
116 bool shouldMon = ((ctx.eventID().event_number() % 20)==0);
121 ATH_CHECK( clusterContainer.record (std::make_unique<xAOD::CaloClusterContainer>(), std::make_unique<xAOD::CaloClusterTrigAuxContainer> () ));
124 ATH_MSG_VERBOSE(
" created ClusterContainer at 0x" << std::hex << pCaloClusterContainer<< std::dec);
131 std::vector<double> clus_phi;
132 std::vector<double> clus_eta;
133 std::vector<double> N_BAD_CELLS;
134 std::vector<double> ENG_FRAC_MAX;
135 std::vector<unsigned int> sizeVec;
136 clus_phi.reserve(300); clus_eta.reserve(300);
137 N_BAD_CELLS.reserve(300); ENG_FRAC_MAX.reserve(300);
138 sizeVec.reserve(300);
150 time_clusMaker.start();
158 mu = eventInfoDecor(0);
160 unsigned int count_1thrsigma(0), count_2thrsigma(0);
166 if (
energy <= 0.0 )
continue;
168 if (cdde->
is_tile() )
continue;
170 if (
energy <= thr )
continue;
180 for (
const ToolHandle<CaloClusterCollectionProcessor>& clproc :
m_clusterMakers) {
182 ATH_CHECK(clproc->execute(ctx, pCaloClusterContainer));
186 time_clusMaker.stop();
194 <<
cl->signalState() <<
", calE: " <<
cl->calE() <<
", calEta: " <<
cl->calEta() <<
", calPhi: " <<
cl->calPhi() <<
" calM: " <<
cl->calM());
199 cl->setRawE(
cl->calE());
200 cl->setRawEta(
cl->calEta());
201 cl->setRawPhi(
cl->calPhi());
202 cl->setRawM(
cl->calM());
214 time_clusCorr.start();
220 (std::abs(
cl->eta0()) < 1.45 && clcorr->name().find(
"37") != std::string::npos) ||
221 (std::abs(
cl->eta0()) >= 1.45 && clcorr->name().find(
"55") != std::string::npos) ) {
226 time_clusCorr.stop();
235 if(! num_cell_links) {
236 sizeVec.push_back(0);
237 mDecor_ncells(*
cl) = 0;
239 sizeVec.push_back(num_cell_links->
size());
240 mDecor_ncells(*
cl) = num_cell_links->
size();
242 clus_phi.push_back(
cl->phi());
243 clus_eta.push_back(
cl->eta());
252 ATH_MSG_DEBUG(
" REGTEST: Produced a Cluster Container of Size= " << pCaloClusterContainer->size() );
253 if(!pCaloClusterContainer->empty()) {
254 ATH_MSG_DEBUG(
" REGTEST: Last Cluster Et = " << (pCaloClusterContainer->back())->et() );
255 ATH_MSG_DEBUG(
" REGTEST: Last Cluster eta = " << (pCaloClusterContainer->back())->eta() );
256 ATH_MSG_DEBUG(
" REGTEST: Last Cluster phi = " << (pCaloClusterContainer->back())->phi() );
257 mon_container_size = pCaloClusterContainer->size();
264 auto moncount_1thrsigma_by_mu2 =
Monitored::Scalar(
"count_1thrsigma_by_mu2",-999.0);
265 auto moncount_2thrsigma_by_mu2 =
Monitored::Scalar(
"count_2thrsigma_by_mu2",-999.0);
266 moncount_1thrsigma = count_1thrsigma;
267 moncount_2thrsigma = count_2thrsigma;
269 mon_container_size_by_mu = pCaloClusterContainer->size()/
mu;
270 float onemu2 = 1.0/(
mu*
mu);
271 moncount_1thrsigma_by_mu2 = count_1thrsigma*onemu2;
272 moncount_2thrsigma_by_mu2 = count_2thrsigma*onemu2;
275 mon_clusPhi, mon_clusEta, mon_clusSignalState, mon_clusSize,
276 mon_badCells, mon_engFrac, mon_size, monmu, moncount_1thrsigma, moncount_2thrsigma, mon_container_size_by_mu, moncount_1thrsigma_by_mu2, moncount_2thrsigma_by_mu2);
279 mon_clusPhi, mon_clusEta, mon_clusSignalState, mon_clusSize,
280 mon_badCells, mon_engFrac, mon_size, monmu );
286 return StatusCode::SUCCESS;