22 {
23
24
26 CHECK(h_caloClusters.isValid());
27
28 auto dvec = *h_caloClusters;
29 ATH_MSG_DEBUG(
"number of retrieved clusters: " << dvec.size());
30
31 const CaloCell_ID* calocell_id{nullptr};
33
34
35 auto EMB1_sel = [&calocell_id](
const CaloCell*
cell) {
36 return
38 CaloCell_Base_ID::EMB1;
39 };
40
41
42
43
44 for(const auto cl : dvec){
45 const auto *cell_links =
cl->getCellLinks();
46 if (!cell_links){
48 return StatusCode::FAILURE;
49 } else {
50 ATH_MSG_DEBUG(
"Number of cells from cell_links " << cell_links->size());
51 }
52
53
54 auto c_iter = cell_links->begin();
55 auto c_end = cell_links->end();
56
57 std::vector<const CaloCell*> cluster_cells;
58 std::copy_if(c_iter,
59 c_end,
60 std::back_inserter(cluster_cells),
61 EMB1_sel);
62
63
64
65
66 if (cluster_cells.size() > 1) {
67 cells.push_back(std::move(cluster_cells));
68 }
69 }
70
71 return StatusCode::SUCCESS;
72}
#define CHECK(...)
Evaluate an expression and check for errors.
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
virtual StatusCode cells(std::vector< std::vector< const CaloCell * > > &, const EventContext &) const override
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_caloClustersKey
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]