44 consumes<edm::ValueMap<reco::GsfElectronRef> >(
edm::InputTag(
"gedGsfElectronsTmp",valueMapPFCandEle_));
102 pfEGCandToPhotonMap = *(pfEGCandToPhotonMapHandle.
product());
107 pfEGCandToElectronMap = *(pfEGCandToElectronMapHandle.
product());
109 std::vector<std::vector<reco::PFCandidateRef>> pfCandIsoPairVecPho;
113 for(
unsigned int lSC=0; lSC < photonTmpHandle->size(); lSC++) {
118 unsigned nObj = pfEGCandidateHandle->size();
121 std::vector<reco::PFCandidateRef> pfCandIsoPairPho;
122 for(
unsigned int lCand=0; lCand < nObj; lCand++) {
128 if (myPho != phoRef)
continue;
143 pfCandIsoPairVecPho.push_back(pfCandIsoPairPho);
149 std::vector<std::vector<reco::PFCandidateRef>> pfCandIsoPairVecEle;
151 for(
unsigned int lSC=0; lSC < electronTmpHandle->size(); lSC++) {
155 unsigned nObj = pfEGCandidateHandle->size();
158 std::vector<reco::PFCandidateRef> pfCandIsoPairEle;
159 for(
unsigned int lCand=0; lCand < nObj; lCand++) {
165 if (myEle != eleRef)
continue;
183 pfCandIsoPairVecEle.push_back(pfCandIsoPairEle);
190 auto phoToPFCandIsoMap_p = std::make_unique<edm::ValueMap<std::vector<reco::PFCandidateRef>>>();
192 fillerPhotons(*phoToPFCandIsoMap_p);
195 fillerPhotons.insert(photonHandle,pfCandIsoPairVecPho.begin(),pfCandIsoPairVecPho.end());
196 fillerPhotons.fill();
200 auto eleToPFCandIsoMap_p = std::make_unique<edm::ValueMap<std::vector<reco::PFCandidateRef>>>();
202 fillerElectrons(*eleToPFCandIsoMap_p);
205 fillerElectrons.insert(electronHandle,pfCandIsoPairVecEle.begin(),pfCandIsoPairVecEle.end());
206 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_