32 std::array<float, 5> etaBounds{3.1, 3.5, 4.0, 4.45, 4.9};
33 constexpr std::size_t nEtaTowers = etaBounds.size() - 1;
34 constexpr std::size_t nPhiTowers = 16;
35 float dPhi = 2 * TMath::Pi() / nPhiTowers;
36 for (std::size_t iEta = 0; iEta < etaBounds.size() - 1; ++iEta)
38 float eta = (etaBounds[iEta] + etaBounds[iEta + 1]) / 2;
39 float dEta = etaBounds[iEta + 1] - etaBounds[iEta];
41 for (
int sign : {1, -1})
43 for (std::size_t iPhi = 0; iPhi < nPhiTowers; ++iPhi)
46 float phi = dPhi * (iPhi + 0.5);
47 if (
phi > TMath::Pi())
48 phi -= 2 * TMath::Pi();
50 helper.SetSampling(2);
51 for (std::size_t scIdx = 0; scIdx <
m_scid->calo_cell_hash_max(); ++scIdx)
54 if (
m_scid->is_tile(scid) &&
m_scid->sampling(scid) != 2)
60 return StatusCode::FAILURE;
62 if (std::abs(dde->
eta_raw()) < 3.2)
65 helper.SetSCIndices(scIdx);
67 data.push_back(std::move(helper));
71 helper.setPreviousEtaIndex(
index - 2 * nPhiTowers);
73 helper.setNextEtaIndex(
index - 2 * nPhiTowers);
75 if (iEta < nEtaTowers - 1)
78 helper.setNextEtaIndex(
index - 2 * nPhiTowers);
80 helper.setPreviousEtaIndex(
index - 2 * nPhiTowers);
82 helper.setPreviousPhiIndex(iPhi == 0 ?
index + nPhiTowers - 1 :
index - 1);
83 helper.setNextPhiIndex(iPhi == nPhiTowers - 1 ?
index - (nPhiTowers - 1) :
index + 1);
87 return StatusCode::SUCCESS;