55 return std::make_unique<AlCaGammaJet::Counters>();
60 virtual void endStream()
override;
101 minPtPhoton_ = iConfig.
getParameter<
double>(
"MinPtPhoton");
104 tok_Photon_ = consumes<reco::PhotonCollection>(labelPhoton_);
105 tok_PFJet_ = consumes<reco::PFJetCollection>(labelPFJet_);
122 desc.
add<
double>(
"MinPtJet", 10.0);
123 desc.
add<
double>(
"MinPtPhoton", 10.0);
135 edm::LogWarning(
"AlCaGammaJet") <<
"AlCaGammaJetProducer: Error! can't get the product " << labelPhoton_;
143 edm::LogWarning(
"AlCaGammaJet") <<
"AlCaGammaJetProducer: Error! can't get product " << labelPFJet_;
149 if (!(
select(photons, pfjets)))
return false;
166 <<
" good events out of " 174 if (photons.size() == 0)
return false;
176 for (reco::PFJetCollection::const_iterator itr=jets.begin();
177 itr!=jets.end(); ++itr) {
178 if (itr->pt() >= minPtJet_) {
184 for (reco::PhotonCollection::const_iterator itr=photons.begin();
185 itr!=photons.end(); ++itr) {
186 if (itr->pt() >= minPtPhoton_)
return ok;
T getParameter(std::string const &) const
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
virtual void endStream() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static void globalEndJob(const AlCaGammaJet::Counters *counters)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
#define DEFINE_FWK_MODULE(type)
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
std::atomic< unsigned int > nSelected_
AlCaGammaJetSelector(const edm::ParameterSet &, const AlCaGammaJet::Counters *count)
void addDefault(ParameterSetDescription const &psetDescription)
edm::InputTag labelPhoton_
virtual bool filter(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::PFJetCollection > tok_PFJet_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
T const * product() const
bool select(const reco::PhotonCollection &, const reco::PFJetCollection &)
std::vector< Photon > PhotonCollection
collectin of Photon objects
static std::unique_ptr< AlCaGammaJet::Counters > initializeGlobalCache(edm::ParameterSet const &)
std::vector< PFJet > PFJetCollection
collection of PFJet objects
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
std::atomic< unsigned int > nProcessed_
edm::EDGetTokenT< reco::PhotonCollection > tok_Photon_