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 std::auto_ptr<edm::ValueMap<std::vector<reco::PFCandidateRef>> >
191 phoToPFCandIsoMap_p(
new edm::ValueMap<std::vector<reco::PFCandidateRef>>());
193 fillerPhotons(*phoToPFCandIsoMap_p);
196 fillerPhotons.insert(photonHandle,pfCandIsoPairVecPho.begin(),pfCandIsoPairVecPho.end());
197 fillerPhotons.fill();
201 std::auto_ptr<edm::ValueMap<std::vector<reco::PFCandidateRef>> >
202 eleToPFCandIsoMap_p(
new edm::ValueMap<std::vector<reco::PFCandidateRef>>());
204 fillerElectrons(*eleToPFCandIsoMap_p);
207 fillerElectrons.insert(electronHandle,pfCandIsoPairVecEle.begin(),pfCandIsoPairVecEle.end());
208 fillerElectrons.fill();
edm::EDGetTokenT< reco::GsfElectronCollection > electronTmpProducerT_
T getParameter(std::string const &) const
std::string valueMapPhoPFCandIso_
edm::InputTag electronTmpProducer_
std::string valueMapElePFCandIso_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void produce(edm::Event &e, const edm::EventSetup &c)
void setup(const edm::ParameterSet &conf)
edm::InputTag electronProducer_
edm::EDGetTokenT< reco::PhotonCollection > photonTmpProducerT_
~ParticleBasedIsoProducer()
edm::InputTag photonProducer_
bool isNonnull() const
Checks for non-null.
std::string valueMapPFCandEle_
edm::EDGetTokenT< reco::GsfElectronCollection > electronProducerT_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< reco::PFCandidateRef > calculate(math::XYZTLorentzVectorD p4, const reco::PFCandidateRef pfEGCand, const edm::Handle< reco::PFCandidateCollection > pfCandidateHandle)
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
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
virtual void beginRun(edm::Run const &r, edm::EventSetup const &es) override
edm::InputTag photonTmpProducer_
std::string valueMapPFCandPhoton_
T const * product() const
PfBlockBasedIsolation * thePFBlockBasedIsolation_
ParticleBasedIsoProducer(const edm::ParameterSet &conf)
edm::EDGetTokenT< reco::PFCandidateCollection > pfEgammaCandidates_
edm::EDGetTokenT< edm::ValueMap< reco::PhotonRef > > valMapPFCandToPhoton_