CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

FixedGridRhoProducerFastjet Class Reference

#include <FixedGridRhoProducerFastjet.h>

Inheritance diagram for FixedGridRhoProducerFastjet:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 FixedGridRhoProducerFastjet (const edm::ParameterSet &iConfig)
virtual ~FixedGridRhoProducerFastjet ()

Private Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)

Private Attributes

fastjet::GridMedianBackgroundEstimator bge_
edm::InputTag pfCandidatesTag_

Detailed Description

Definition at line 11 of file FixedGridRhoProducerFastjet.h.


Constructor & Destructor Documentation

FixedGridRhoProducerFastjet::FixedGridRhoProducerFastjet ( const edm::ParameterSet iConfig) [explicit]

Definition at line 8 of file FixedGridRhoProducerFastjet.cc.

References edm::ParameterSet::getParameter(), and pfCandidatesTag_.

                                                                                       :
  bge_( iConfig.getParameter<double>("maxRapidity"),
        iConfig.getParameter<double>("gridSpacing") )
{
  pfCandidatesTag_ = iConfig.getParameter<edm::InputTag>("pfCandidatesTag");
  produces<double>();
}
FixedGridRhoProducerFastjet::~FixedGridRhoProducerFastjet ( ) [virtual]

Definition at line 16 of file FixedGridRhoProducerFastjet.cc.

{} 

Member Function Documentation

void FixedGridRhoProducerFastjet::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDProducer.

Definition at line 18 of file FixedGridRhoProducerFastjet.cc.

References bge_, edm::Event::getByLabel(), i, SiPixelRawToDigiRegional_cfi::inputs, pfCandidatesTag_, and edm::Event::put().

                                                                                       {

   edm::Handle<reco::PFCandidateCollection> pfColl;
   iEvent.getByLabel(pfCandidatesTag_,pfColl);
   std::vector<fastjet::PseudoJet> inputs;
   for ( reco::PFCandidateCollection::const_iterator ibegin = pfColl->begin(),
           iend = pfColl->end(), i = ibegin; i != iend; ++i ){
     inputs.push_back( fastjet::PseudoJet(i->px(), i->py(), i->pz(), i->energy()) );
   }
   bge_.set_particles(inputs);
   std::auto_ptr<double> outputRho(new double(bge_.rho()));
   iEvent.put(outputRho);
}

Member Data Documentation

fastjet::GridMedianBackgroundEstimator FixedGridRhoProducerFastjet::bge_ [private]

Definition at line 21 of file FixedGridRhoProducerFastjet.h.

Referenced by produce().

Definition at line 20 of file FixedGridRhoProducerFastjet.h.

Referenced by FixedGridRhoProducerFastjet(), and produce().