#include <EventShapeVarsProducer.h>
Public Member Functions | |
EventShapeVarsProducer (const edm::ParameterSet &) | |
~EventShapeVarsProducer () | |
Private Member Functions | |
void | beginJob () |
void | endJob () |
void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
double | r_ |
edm::InputTag | src_ |
Produce set of event shape variables. The values of different event shape variables are stored as doubles in the event. They can be retrieved via:
edm::Handle<double> specificEventShapeVar; evt.getByLabel("moduleName::instanceName", specificEventShapeVar);
where moduleName corresponds to "eventShapeVarsProducer" per default and instance name specifies an individual event shape variable which you wish to retrieve from the event:
See http://cepa.fnal.gov/psm/simulation/mcgen/lund/pythia_manual/pythia6.3/pythia6301/node213.html ( http://cepa.fnal.gov/psm/simulation/mcgen/lund/pythia_manual/pythia6.3/pythia6301/node214.html ) for an explanation of sphericity, aplanarity and the quantities C and D (thrust and oblateness).
Definition at line 43 of file EventShapeVarsProducer.h.
EventShapeVarsProducer::EventShapeVarsProducer | ( | const edm::ParameterSet & | cfg | ) | [explicit] |
Definition at line 11 of file EventShapeVarsProducer.cc.
References edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), r_, and src_.
{ src_ = cfg.getParameter<edm::InputTag>("src"); r_ = cfg.exists("r") ? cfg.getParameter<double>("r") : 2.; produces<double>("thrust"); //produces<double>("oblateness"); produces<double>("isotropy"); produces<double>("circularity"); produces<double>("sphericity"); produces<double>("aplanarity"); produces<double>("C"); produces<double>("D"); }
EventShapeVarsProducer::~EventShapeVarsProducer | ( | ) | [inline] |
Definition at line 48 of file EventShapeVarsProducer.h.
{}
void EventShapeVarsProducer::beginJob | ( | void | ) | [inline, private, virtual] |
void EventShapeVarsProducer::endJob | ( | void | ) | [inline, private, virtual] |
void EventShapeVarsProducer::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | |||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 33 of file EventShapeVarsProducer.cc.
References edm::Event::getByLabel(), put(), r_, and src_.
{ //std::cout << "<EventShapeVarsProducer::produce>:" << std::endl; edm::Handle<edm::View<reco::Candidate> > objects; evt.getByLabel(src_, objects); Thrust thrustAlgo(objects->begin(), objects->end()); put(evt, thrustAlgo.thrust(), "thrust"); //put(evt, thrustAlgo.oblateness(), "oblateness"); EventShapeVariables eventShapeVarsAlgo(*objects); put(evt, eventShapeVarsAlgo.isotropy(), "isotropy"); put(evt, eventShapeVarsAlgo.circularity(), "circularity"); put(evt, eventShapeVarsAlgo.sphericity(r_), "sphericity"); put(evt, eventShapeVarsAlgo.aplanarity(r_), "aplanarity"); put(evt, eventShapeVarsAlgo.C(r_), "C"); put(evt, eventShapeVarsAlgo.D(r_), "D"); }
double EventShapeVarsProducer::r_ [private] |
Definition at line 53 of file EventShapeVarsProducer.h.
Referenced by EventShapeVarsProducer(), and produce().
edm::InputTag EventShapeVarsProducer::src_ [private] |
Definition at line 52 of file EventShapeVarsProducer.h.
Referenced by EventShapeVarsProducer(), and produce().