16   constexpr 
float cellEtaSize = 0.1;
 
   17   constexpr 
float cellPhiSize = 0.1;
 
   36   ATH_CHECK(m_caloDetDescrMgrKey.initialize());
 
   38   ATH_MSG_DEBUG(
"Will store cookie cut clusters in this container " 
   39         << m_outClusterContainerKey.key());  
 
   40   ATH_CHECK(m_outClusterContainerKey.initialize());
 
   41   m_outClusterContainerCellLinkKey = m_outClusterContainerKey.key() + 
"_links";
 
   42   ATH_CHECK(m_outClusterContainerCellLinkKey.initialize());
 
   44   ATH_MSG_DEBUG(
"Using " << m_SGKey_electrons << 
" for electrons");
 
   45   ATH_CHECK(m_SGKey_electrons.initialize());
 
   47   const std::string containerKey = m_SGKey_electrons.key();
 
   48   for (
const auto& 
e : m_vecMName) {
 
   51       key = containerKey + 
".cookiecut" + 
e;
 
   52       m_SGKey_electrons_decorations.emplace_back(
key);
 
   55       key = containerKey + 
".original" + 
e;
 
   56       m_SGKey_electrons_decorations.emplace_back(
key);
 
   59   m_SGKey_electrons_decorations.emplace_back(
 
   60      containerKey + 
".cookiecutClusterLink");
 
   62   m_nDecor = m_SGKey_electrons_decorations.size();
 
   64   ATH_CHECK(m_SGKey_electrons_decorations.initialize());
 
   67     for (
const auto& 
s : m_SGKey_electrons_decorations)
 
   71   m_CookieCutPars.maxDelEta = m_maxDelEtaCells * cellEtaSize * 0.5;
 
   72   m_CookieCutPars.maxDelPhi = m_maxDelPhiCells * cellPhiSize * 0.5;
 
   73   m_CookieCutPars.maxDelR2  = m_maxDelR * m_maxDelR;
 
   76   if (!m_clusterCorrectionTools.empty()) {
 
   77     ATH_CHECK(m_clusterCorrectionTools.retrieve());
 
   78     m_CookieCutPars.recomputeMoments = 
true;
 
   81   return StatusCode::SUCCESS;
 
   90   static const std::vector<CaloSampling::CaloSample> s_sam
 
  104     m_outClusterContainerKey,
 
  110     m_outClusterContainerCellLinkKey,
 
  114     std::make_unique<CaloClusterCellLinkContainer>())
 
  122     return StatusCode::SUCCESS;
 
  125   std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>> decoM;
 
  126   decoM.reserve(m_nDecor);
 
  127   for (
int i = 0; 
i < m_nDecor - 1; 
i++) {
 
  128     decoM.emplace_back(m_SGKey_electrons_decorations[
i], ctx);
 
  132     std::call_once(m_Seen, [
this,&decoM]() {
 
  133     for (
int i = 0; 
i < m_nDecor - 1; 
i++) {
 
  135             << 
" " << m_SGKey_electrons_decorations[
i].
key()
 
  136             << 
" " << decoM[
i].decorKey());
 
  142     decoEl(m_SGKey_electrons_decorations[m_nDecor-1],ctx);
 
  146     m_caloDetDescrMgrKey, ctx
 
  148   ATH_CHECK(caloDetDescrMgrHandle.isValid());
 
  153   std::vector<bool> success(
nF,
true);
 
  159           << 
" pT = " << cluster->
pt()
 
  160           << 
" eta = " << cluster->
eta());
 
  165     std::unique_ptr<xAOD::CaloCluster> newCluster =
 
  167                     cellCont, m_CookieCutPars);
 
  174             << 
" original cluster " << cluster->
index()
 
  175             << 
" pT = " << cluster->
pt()
 
  176             << 
" eta = " << cluster->
eta()
 
  177             << 
" has EME2 or FCAL0" 
  181             << (newCluster ? 
" no cells in cluster" : 
" no cluster"));
 
  188       success[iel] = 
false;
 
  194             << 
" pT = " << newCluster->
pt()
 
  195             << 
" eta = " << newCluster->
eta());
 
  197       outClusterContainer->
push_back(std::move(newCluster));
 
  198       size_t index = outClusterContainer->
size() - 1;
 
  200     clusterLink(*outClusterContainer, 
index, ctx);
 
  206     if (m_storeOrigMom) {
 
  207       for (
size_t i = 0; 
i < m_vecM.size(); 
i++) {
 
  208     int indexDecor = m_storeCookMom ? 2*
i+1 : 
i;
 
  213               << 
" does not exist for the original cluster");
 
  215     decoM[indexDecor](*electron) = 
float(
m);
 
  217             << 
" with original moment " 
  218             << 
i << 
" " << m_vecMName[
i]
 
  219             << 
" = " << 
m << 
" (decoration index =" << indexDecor
 
  220             << 
" key = " << decoM[indexDecor].decorKey() << 
")");
 
  226   if (!m_clusterCorrectionTools.empty()) {
 
  227     ToolHandleArray<CaloClusterCollectionProcessor>::const_iterator
 
  228       toolIt = m_clusterCorrectionTools.begin(),
 
  229       toolIt_e = m_clusterCorrectionTools.end();
 
  230     for (; toolIt != toolIt_e; ++toolIt) {
 
  231       ATH_CHECK((*toolIt)->execute(ctx, outClusterContainer.
ptr()));
 
  234     if (m_storeCookMom) {
 
  237     cookClusLinkAcc( 
"cookiecutClusterLink" );
 
  241     if (success[iel] && cookClusLinkAcc.isAvailable(*
electron)) {
 
  248     if (success[iel] && cluster == 
nullptr) {
 
  250               "could not be retrieved");
 
  253     for (
size_t i = 0; 
i < m_vecM.size(); 
i++) {
 
  254       int indexDecor = m_storeOrigMom ? 2*
i : 
i;
 
  260                   << 
" does not exist for the new cluster");
 
  263       decoM[indexDecor](*electron) = 
float(
m);
 
  265               << 
" with new moment " 
  266               << 
i << 
" " << m_vecMName[
i]
 
  267               << 
" = " << 
m << 
" (decoration index = " << indexDecor
 
  268               << 
" key = " << decoM[indexDecor].decorKey() << 
")");
 
  277     outClusterContainerCellLink);
 
  280         << 
" cookie cut clusters");
 
  282   return StatusCode::SUCCESS;