46 bool validPixelSeeds =
true;
48 if (!pixelSeedHandle.isValid()) {
49 validPixelSeeds =
false;
53 for (
auto const&
cand : *pfCandidateHandle) {
55 auto const& pfPho = *
cand.egammaExtraRef();
60 outputPhotonCoreCollection.emplace_back();
61 auto& newCandidate = outputPhotonCoreCollection.back();
63 newCandidate.setPFlowPhoton(
true);
64 newCandidate.setStandardPhoton(
false);
65 newCandidate.setSuperCluster(refinedSC);
66 newCandidate.setParentSuperCluster(boxSC);
69 for (
auto const&
conv : pfPho.conversionRef()) {
70 newCandidate.addConversion(
conv);
72 for (
auto const&
conv : pfPho.singleLegConversionRef()) {
73 newCandidate.addOneLegConversion(
conv);
80 if (validPixelSeeds) {
81 for (
unsigned int icp = 0; icp < pixelSeedHandle->size(); icp++) {
83 if (boxSC.
isNonnull() && boxSC.
id() == cpRef->caloCluster().
id() && boxSC.
key() == cpRef->caloCluster().key()) {
84 newCandidate.addElectronPixelSeed(cpRef);
ProductID id() const
Accessor for product ID.
bool isNonnull() const
Checks for non-null.
key_type key() const
Accessor for product key.
const edm::EDGetTokenT< reco::PFCandidateCollection > pfEgammaCandidates_
std::vector< PhotonCore > PhotonCoreCollection
collectin of PhotonCore objects
const edm::EDGetTokenT< reco::ElectronSeedCollection > pixelSeedProducer_
const edm::EDPutTokenT< reco::PhotonCoreCollection > putToken_
auto makeValid(const U &iOtherHandleType) noexcept(false)