55 return std::make_unique<AlCaGammaJet::Counters>();
60 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.empty())
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
void endStream() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static void globalEndJob(const AlCaGammaJet::Counters *counters)
#define DEFINE_FWK_MODULE(type)
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
std::atomic< unsigned int > nSelected_
~AlCaGammaJetSelector() override
AlCaGammaJetSelector(const edm::ParameterSet &, const AlCaGammaJet::Counters *count)
void addDefault(ParameterSetDescription const &psetDescription)
edm::InputTag labelPhoton_
bool filter(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::PFJetCollection > tok_PFJet_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void endRun(edm::Run const &, edm::EventSetup const &) override
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 &)
void beginRun(edm::Run const &, edm::EventSetup const &) override
std::vector< PFJet > PFJetCollection
collection of PFJet objects
std::atomic< unsigned int > nProcessed_
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
edm::EDGetTokenT< reco::PhotonCollection > tok_Photon_