52{
55 if (limit == 0) { return StatusCode::FAILURE; }
56
57
59
60
63
64
65 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
66 decorations_E;
67 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
68 decorations_rnoW;
69 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, char>>
70 decorations_nCells;
71 for (
unsigned int i = 0;
i <
limit; ++
i) {
72 decorations_E.emplace_back(
74 decorations_rnoW.emplace_back(
76 decorations_nCells.emplace_back(
78 }
79
81 for (const auto* photon : *importedPhotons) {
82 DerivationFramework::GainDecorator::calculation
res =
87 std::pair<int, int>
key(kv.first, layer);
88 decorations_E[
i](*photon) =
res.E[
key];
89 decorations_rnoW[
i](*photon) =
91 decorations_nCells[
i](*photon) =
res.nCells[
key];
93 }
94 }
95 }
96 }
97
98
99
101
102
104 ctx);
106
107
108 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
109 decorations_E;
110 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
111 decorations_rnoW;
112 std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, char>>
113 decorations_nCells;
114 for (
unsigned int i = 0;
i <
limit; ++
i) {
115 decorations_E.emplace_back(
117 decorations_rnoW.emplace_back(
119 decorations_nCells.emplace_back(
121 }
122
124 for (const auto* electron : *importedElectrons) {
125 DerivationFramework::GainDecorator::calculation
res =
130 std::pair<int, int>
key(kv.first, layer);
131 decorations_E[
i](*electron) =
res.E[
key];
132 decorations_rnoW[
i](*electron) =
134 decorations_nCells[
i](*electron) =
res.nCells[
key];
136 }
137 }
138 }
139 }
140
141 return StatusCode::SUCCESS;
142}
std::pair< std::vector< unsigned int >, bool > res
xAOD::ElectronContainer * electronContainer
xAOD::PhotonContainer * photonContainer
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_photons_decorations
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_electrons
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_photons
Gaudi::Property< std::map< int, std::string > > m_gainNames
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_electrons_decorations
Gaudi::Property< std::vector< unsigned int > > m_layers
calculation decorateObject(const xAOD::Egamma *&egamma) const
EgammaContainer_v1 EgammaContainer
Definition of the current "egamma container version".