50 CHECK(h_eventInfo.isValid());
55 CHECK(h_caloClusters.isValid());
56 ATH_MSG_DEBUG(
"Read in " << h_caloClusters->size() <<
" clusters");
59 CHECK(h_caloCells.isValid());
64 CHECK(h_outputCaloClusters.
record(std::make_unique<xAOD::CaloClusterContainer>(),
65 std::make_unique<xAOD::CaloClusterAuxContainer>()));
68 std::unique_ptr<Gep::ITowerMaker> towerMaker{};
79 return StatusCode::FAILURE;
82 ATH_MSG_DEBUG(
"Running " << towerMaker->getName() <<
" tower algorithm." );
87 std::vector<Gep::Cluster> customTowers = towerMaker->makeTowers(clusters,cells);
91 if (!customTowers.empty()){
96 h_outputCaloClusters->reserve(customTowers.size());
98 for(
const auto& gepclus: customTowers){
101 auto *ptr = h_outputCaloClusters->push_back(std::make_unique<xAOD::CaloCluster>());
104 ptr->setE(gepclus.vec.E());
105 ptr->setEta(gepclus.vec.Eta());
106 ptr->setPhi(gepclus.vec.Phi());
107 ptr->setTime(gepclus.time);
110 return StatusCode::SUCCESS;