#include <FixedGridRhoProducer.h>
Public Member Functions | |
FixedGridRhoProducer (const edm::ParameterSet &iConfig) | |
virtual | ~FixedGridRhoProducer () |
Private Member Functions | |
virtual void | beginJob () |
virtual void | beginLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &) |
virtual void | beginRun (edm::Run &, edm::EventSetup const &) |
virtual void | endJob () |
virtual void | endLuminosityBlock (edm::LuminosityBlock &, edm::EventSetup const &) |
virtual void | endRun (edm::Run &, edm::EventSetup const &) |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
FixedGridEnergyDensity * | algo |
FixedGridEnergyDensity::EtaRegion | myEtaRegion |
edm::InputTag | pfCandidatesTag_ |
Definition at line 9 of file FixedGridRhoProducer.h.
FixedGridRhoProducer::FixedGridRhoProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 7 of file FixedGridRhoProducer.cc.
References muon::All, FixedGridEnergyDensity::Central, FixedGridEnergyDensity::Forward, and edm::ParameterSet::getParameter().
{ pfCandidatesTag_ = iConfig.getParameter<edm::InputTag>("pfCandidatesTag"); string etaRegion = iConfig.getParameter<string>("EtaRegion"); if (etaRegion=="Central") myEtaRegion = FixedGridEnergyDensity::Central; else if (etaRegion=="Forward") myEtaRegion = FixedGridEnergyDensity::Forward; else if (etaRegion=="All") myEtaRegion = FixedGridEnergyDensity::All; else { edm::LogWarning("FixedGridRhoProducer") << "Wrong EtaRegion parameter: " << etaRegion << ". Using EtaRegion = Central"; myEtaRegion = FixedGridEnergyDensity::Central; } produces<double>(); }
FixedGridRhoProducer::~FixedGridRhoProducer | ( | ) | [virtual] |
Definition at line 20 of file FixedGridRhoProducer.cc.
{}
virtual void FixedGridRhoProducer::beginJob | ( | void | ) | [inline, private, virtual] |
virtual void FixedGridRhoProducer::beginLuminosityBlock | ( | edm::LuminosityBlock & | , |
edm::EventSetup const & | |||
) | [inline, private, virtual] |
virtual void FixedGridRhoProducer::beginRun | ( | edm::Run & | , |
edm::EventSetup const & | |||
) | [inline, private, virtual] |
virtual void FixedGridRhoProducer::endJob | ( | void | ) | [inline, private, virtual] |
virtual void FixedGridRhoProducer::endLuminosityBlock | ( | edm::LuminosityBlock & | , |
edm::EventSetup const & | |||
) | [inline, private, virtual] |
virtual void FixedGridRhoProducer::endRun | ( | edm::Run & | , |
edm::EventSetup const & | |||
) | [inline, private, virtual] |
void FixedGridRhoProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 22 of file FixedGridRhoProducer.cc.
References edm::Event::getByLabel(), convertSQLitetoXML_cfg::output, edm::Handle< T >::product(), edm::Event::put(), and query::result.
{ edm::Handle<reco::PFCandidateCollection> pfColl; iEvent.getByLabel(pfCandidatesTag_,pfColl); algo = new FixedGridEnergyDensity(pfColl.product()); double result = algo->fixedGridRho(myEtaRegion); std::auto_ptr<double> output(new double(result)); iEvent.put(output); delete algo; }
FixedGridEnergyDensity* FixedGridRhoProducer::algo [private] |
Definition at line 26 of file FixedGridRhoProducer.h.
Definition at line 25 of file FixedGridRhoProducer.h.
Definition at line 22 of file FixedGridRhoProducer.h.