206 if (!recoEcalCandHandle.
isValid())
208 else if (!pixelSeedsHandle.
isValid()) {
209 auto s2Map = std::make_unique<reco::RecoEcalCandidateIsolationMap>(recoEcalCandHandle);
210 for (
unsigned int candNr = 0; candNr < recoEcalCandHandle->size(); candNr++) {
212 s2Map->insert(candRef, 0);
221 auto dPhi1BestS2Map = std::make_unique<reco::RecoEcalCandidateIsolationMap>(recoEcalCandHandle);
222 auto dPhi2BestS2Map = std::make_unique<reco::RecoEcalCandidateIsolationMap>(recoEcalCandHandle);
223 auto dzBestS2Map = std::make_unique<reco::RecoEcalCandidateIsolationMap>(recoEcalCandHandle);
224 auto s2Map = std::make_unique<reco::RecoEcalCandidateIsolationMap>(recoEcalCandHandle);
226 auto nrClusMap = std::make_unique<reco::RecoEcalCandidateIsolationMap>(recoEcalCandHandle);
227 auto seedClusEFracMap = std::make_unique<reco::RecoEcalCandidateIsolationMap>(recoEcalCandHandle);
228 auto phiWidthMap = std::make_unique<reco::RecoEcalCandidateIsolationMap>(recoEcalCandHandle);
229 auto etaWidthMap = std::make_unique<reco::RecoEcalCandidateIsolationMap>(recoEcalCandHandle);
231 std::vector<PixelData> pixelData;
232 for (
size_t hitNr = 0; hitNr <
nrHits_; hitNr++) {
237 for (
unsigned int candNr = 0; candNr < recoEcalCandHandle->size(); candNr++) {
245 for (
auto&
seed : *pixelSeedsHandle) {
248 if (&(*candSCRef) == &(*pixelSCRef)) {
249 std::array<float, 4> s2Data =
calS2(
seed, -1);
250 std::array<float, 4> s2DataPos =
calS2(
seed, +1);
251 if (s2Data[0] < bestS2[0])
253 if (s2DataPos[0] < bestS2[0])
257 for (
auto& pixelDatum : pixelData) {
258 pixelDatum.fill(
seed);
264 s2Map->insert(candRef, bestS2[0]);
266 dPhi1BestS2Map->insert(candRef, bestS2[1]);
267 dPhi2BestS2Map->insert(candRef, bestS2[2]);
268 dzBestS2Map->insert(candRef, bestS2[3]);
271 nrClusMap->insert(candRef, candSCRef->clustersSize());
272 float seedClusEFrac = candSCRef->rawEnergy() > 0 ? candSCRef->seed()->energy() / candSCRef->rawEnergy() : 0.;
275 seedClusEFracMap->insert(candRef, seedClusEFrac);
276 float phiWidth = candSCRef->phiWidth();
277 float etaWidth = candSCRef->etaWidth();
278 phiWidthMap->insert(candRef, phiWidth);
279 etaWidthMap->insert(candRef, etaWidth);
281 for (
auto& pixelDatum : pixelData) {
282 pixelDatum.fill(candRef);
294 for (
auto& pixelDatum : pixelData) {
295 pixelDatum.putInto(
iEvent);