36 return StatusCode::SUCCESS;
49 CHECK(h_eventInfo.isValid());
56 CHECK(h_caloCells.isValid());
57 auto cells = *h_caloCells;
62 CHECK(h_outputCaloClusters.
record(std::make_unique<xAOD::CaloClusterContainer>(),
63 std::make_unique<xAOD::CaloClusterAuxContainer>()));
68 std::unique_ptr<Gep::IClusterMaker> clusterMaker{};
77 return StatusCode::FAILURE;
80 ATH_MSG_DEBUG(
"Running " << clusterMaker->getName() <<
" cluster algorithm." );
84 auto cell_map = std::make_unique<GepCellMap>();
88 std::vector<Gep::Cluster> customClusters =
89 clusterMaker->makeClusters(cell_map);
93 if (!customClusters.empty()){
99 h_outputCaloClusters->
reserve(customClusters.size());
101 for(
const auto& gepclus: customClusters){
104 auto caloCluster = std::make_unique<xAOD::CaloCluster>();
105 auto *ptr = caloCluster.get();
108 h_outputCaloClusters->
push_back(std::move(caloCluster));
112 ptr->setE(gepclus.vec.E());
113 ptr->setEta(gepclus.vec.Eta());
114 ptr->setPhi(gepclus.vec.Phi());
115 ptr->setTime(gepclus.time);
118 for (
auto cell_id : gepclus.cell_id)
119 cccl->
addCell(cell_map->at(cell_id).index, 1.0);
121 ptr->addCellLink(cccl);
125 return StatusCode::SUCCESS;