68 produces<edm::ValueMap<double> >(nameIsoCh_);
69 produces<edm::ValueMap<double> >(nameIsoPh_);
70 produces<edm::ValueMap<double> >(nameIsoNh_);
72 isolator.initializePhotonIsolation(kTRUE);
73 isolator.setConeSize(0.3);
108 iEvent.
getByToken(photonToken_, phoCollection);
113 iEvent.
getByToken(particleFlowToken_, pfCandidatesH);
116 std::vector<double> chIsoValues;
117 std::vector<double> phIsoValues;
118 std::vector<double> nhIsoValues;
119 chIsoValues.reserve(phoCollection->size());
120 phIsoValues.reserve(phoCollection->size());
121 nhIsoValues.reserve(phoCollection->size());
123 unsigned int ivtx = 0;
127 for (reco::PhotonCollection::const_iterator aPho = recoPho->begin(); aPho != recoPho->end(); ++aPho) {
129 isolator.fGetIsolation(&*aPho,
136 std::cout <<
" pt " << aPho->pt() <<
" eta " << aPho->eta() <<
" phi " << aPho->phi()
137 <<
" charge " << aPho->charge()<<
" : " << std::endl;;
139 std::cout <<
" ChargedIso " << isolator.getIsolationCharged() << std::endl;
140 std::cout <<
" PhotonIso " << isolator.getIsolationPhoton() << std::endl;
141 std::cout <<
" NeutralHadron Iso " << isolator.getIsolationNeutral() << std::endl;
144 chIsoValues.push_back(isolator.getIsolationCharged());
145 phIsoValues.push_back(isolator.getIsolationPhoton());
146 nhIsoValues.push_back(isolator.getIsolationNeutral());
150 chFiller.
insert(phoCollection, chIsoValues.begin(), chIsoValues.end() );
153 phFiller.
insert(phoCollection, phIsoValues.begin(), phIsoValues.end() );
156 nhFiller.
insert(phoCollection, nhIsoValues.begin(), nhIsoValues.end() );
160 iEvent.
put(chIsoMap,nameIsoCh_);
161 iEvent.
put(phIsoMap,nameIsoPh_);
162 iEvent.
put(nhIsoMap,nameIsoNh_);
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void insert(const H &h, I begin, I end)
LuminosityBlockNumber_t luminosityBlock() const
edm::EDGetTokenT< reco::PhotonCollection > photonToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
PFIsolationEstimator isolator
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
edm::EDGetTokenT< reco::PFCandidateCollection > particleFlowToken_
virtual bool filter(edm::Event &, const edm::EventSetup &)
std::vector< Photon > PhotonCollection
collectin of Photon objects
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
PhotonIsoProducer(const edm::ParameterSet &)