CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

EventShapeVarsProducer Class Reference

#include <EventShapeVarsProducer.h>

Inheritance diagram for EventShapeVarsProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

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_

Detailed Description

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).

Author:
Christian Veelken, UC Davis
Version:
Revision:
1.3
Id:
EventShapeVarsProducer.h,v 1.3 2010/02/11 00:12:54 wmtan Exp

Definition at line 43 of file EventShapeVarsProducer.h.


Constructor & Destructor Documentation

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.

{}

Member Function Documentation

void EventShapeVarsProducer::beginJob ( void  ) [inline, private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 55 of file EventShapeVarsProducer.h.

{}
void EventShapeVarsProducer::endJob ( void  ) [inline, private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 57 of file EventShapeVarsProducer.h.

{}
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");
}

Member Data Documentation

double EventShapeVarsProducer::r_ [private]

Definition at line 53 of file EventShapeVarsProducer.h.

Referenced by EventShapeVarsProducer(), and produce().

Definition at line 52 of file EventShapeVarsProducer.h.

Referenced by EventShapeVarsProducer(), and produce().