63 nameIsoCh_ = iConfig.
getParameter<std::string>(
"nameValueMapIsoCh");
64 nameIsoPh_ = iConfig.
getParameter<std::string>(
"nameValueMapIsoPh");
65 nameIsoNh_ = iConfig.
getParameter<std::string>(
"nameValueMapIsoNh");
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);
113 iEvent.
getByLabel(particleFlowTag_, 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
#define DEFINE_FWK_MODULE(type)
edm::InputTag particleFlowTag_
void insert(const H &h, I begin, I end)
LuminosityBlockNumber_t luminosityBlock() const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
PFIsolationEstimator isolator
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
virtual bool filter(edm::Event &, const edm::EventSetup &)
std::vector< Photon > PhotonCollection
collectin of Photon objects
PhotonIsoProducer(const edm::ParameterSet &)