33 consumes<edm::ValueMap<reco::GsfElectronRef>>(
edm::InputTag(
"gedGsfElectronsTmp", valueMapPFCandEle_));
78 pfEGCandToPhotonMap = *(pfEGCandToPhotonMapHandle.
product());
83 pfEGCandToElectronMap = *(pfEGCandToElectronMapHandle.
product());
85 std::vector<std::vector<reco::PFCandidateRef>> pfCandIsoPairVecPho;
89 for (
unsigned int lSC = 0; lSC < photonTmpHandle->size(); lSC++) {
93 unsigned nObj = pfEGCandidateHandle->size();
96 std::vector<reco::PFCandidateRef> pfCandIsoPairPho;
97 for (
unsigned int lCand = 0; lCand < nObj; lCand++) {
116 pfCandIsoPairVecPho.push_back(pfCandIsoPairPho);
120 std::vector<std::vector<reco::PFCandidateRef>> pfCandIsoPairVecEle;
122 for (
unsigned int lSC = 0; lSC < electronTmpHandle->size(); lSC++) {
126 unsigned nObj = pfEGCandidateHandle->size();
129 std::vector<reco::PFCandidateRef> pfCandIsoPairEle;
130 for (
unsigned int lCand = 0; lCand < nObj; lCand++) {
152 pfCandIsoPairVecEle.push_back(pfCandIsoPairEle);
155 auto phoToPFCandIsoMap_p = std::make_unique<edm::ValueMap<std::vector<reco::PFCandidateRef>>>();
159 fillerPhotons.insert(photonHandle, pfCandIsoPairVecPho.begin(), pfCandIsoPairVecPho.end());
160 fillerPhotons.fill();
163 auto eleToPFCandIsoMap_p = std::make_unique<edm::ValueMap<std::vector<reco::PFCandidateRef>>>();
167 fillerElectrons.insert(electronHandle, pfCandIsoPairVecEle.begin(), pfCandIsoPairVecEle.end());
168 fillerElectrons.fill();
edm::EDGetTokenT< reco::GsfElectronCollection > electronTmpProducerT_
T getParameter(std::string const &) const
std::string valueMapPhoPFCandIso_
edm::InputTag electronTmpProducer_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::string valueMapElePFCandIso_
bool isNonnull() const
Checks for non-null.
PFBlockBasedIsolation * thePFBlockBasedIsolation_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< reco::PFCandidateRef > calculate(math::XYZTLorentzVectorD p4, const reco::PFCandidateRef pfEGCand, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle)
edm::InputTag electronProducer_
edm::EDGetTokenT< reco::PhotonCollection > photonTmpProducerT_
edm::InputTag photonProducer_
std::string valueMapPFCandEle_
edm::EDGetTokenT< reco::GsfElectronCollection > electronProducerT_
void setup(const edm::ParameterSet &conf)
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
edm::EDGetTokenT< reco::PhotonCollection > photonProducerT_
edm::EDGetTokenT< edm::ValueMap< reco::GsfElectronRef > > valMapPFCandToEle_
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
~ParticleBasedIsoProducer() override
void endRun(edm::Run const &, edm::EventSetup const &) override
void beginRun(edm::Run const &r, edm::EventSetup const &es) override
edm::InputTag photonTmpProducer_
T const * product() const
std::string valueMapPFCandPhoton_
ParticleBasedIsoProducer(const edm::ParameterSet &conf)
edm::EDGetTokenT< reco::PFCandidateCollection > pfEgammaCandidates_
void produce(edm::Event &e, const edm::EventSetup &c) override
pfBlockBasedIsolationSetUp
edm::EDGetTokenT< edm::ValueMap< reco::PhotonRef > > valMapPFCandToPhoton_