#include <CSCRecHitDProducer.h>
Public Member Functions | |
CSCRecHitDProducer (const edm::ParameterSet &ps) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~CSCRecHitDProducer () | |
Private Attributes | |
unsigned | iRun |
CSCRecHitDBuilder * | recHitBuilder_ |
CSCRecoConditions * | recoConditions_ |
edm::InputTag | stripDigiTag_ |
bool | useCalib |
bool | useGasGainCorrections |
bool | useStaticPedestals |
bool | useTimingCorrections |
edm::InputTag | wireDigiTag_ |
Produces a collection of CSCRecHit2D's (2-dim space-point RecHits) in endcap muon CSCs. It starts from collections of CSC wire and strip digis. The treatment here is differently than from CSCRecHit2Producer existing in RecoLocalMuon/CSCRecHit as pseudo-segments are built from wire hits only and strip only hits.
Definition at line 26 of file CSCRecHitDProducer.h.
CSCRecHitDProducer::CSCRecHitDProducer | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Definition at line 21 of file CSCRecHitDProducer.cc.
References recHitBuilder_, recoConditions_, and CSCRecHitDBuilder::setConditions().
: iRun( 0 ), useCalib( ps.getParameter<bool>("CSCUseCalibrations") ), useStaticPedestals( ps.getParameter<bool>("CSCUseStaticPedestals") ), useTimingCorrections(ps.getParameter<bool>("CSCUseTimingCorrections") ), useGasGainCorrections(ps.getParameter<bool>("CSCUseGasGainCorrections") ), stripDigiTag_( ps.getParameter<edm::InputTag>("stripDigiTag") ), wireDigiTag_( ps.getParameter<edm::InputTag>("wireDigiTag") ) { recHitBuilder_ = new CSCRecHitDBuilder( ps ); // pass on the parameter sets recoConditions_ = new CSCRecoConditions( ps ); // access to conditions data recHitBuilder_->setConditions( recoConditions_ ); // pass down to who needs access // register what this produces produces<CSCRecHit2DCollection>(); }
CSCRecHitDProducer::~CSCRecHitDProducer | ( | ) |
Definition at line 41 of file CSCRecHitDProducer.cc.
References recHitBuilder_, and recoConditions_.
{ delete recHitBuilder_; delete recoConditions_; }
void CSCRecHitDProducer::produce | ( | edm::Event & | ev, |
const edm::EventSetup & | setup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 48 of file CSCRecHitDProducer.cc.
References CSCRecHitDBuilder::build(), edm::EventID::event(), edm::EventSetup::get(), edm::Event::getByLabel(), h, edm::EventBase::id(), CSCRecoConditions::initializeEvent(), LogTrace, edm::Handle< T >::product(), edm::Event::put(), recHitBuilder_, recoConditions_, edm::EventID::run(), CSCRecHitDBuilder::setGeometry(), stripDigiTag_, useCalib, useGasGainCorrections, useStaticPedestals, useTimingCorrections, and wireDigiTag_.
{ // Dumps the message TWICE if both categories are set! // LogTrace("CSCRecHitDProducer|CSCRecHit")<< "[CSCRecHitDProducer] starting event " << ev.id().event() << " of run " << ev.id().run(); LogTrace("CSCRecHit")<< "[CSCRecHitDProducer] starting event " << ev.id().event() << " of run " << ev.id().run(); // find the geometry for this event & cache it in the builder edm::ESHandle<CSCGeometry> h; setup.get<MuonGeometryRecord>().get( h ); const CSCGeometry* pgeom = &*h; recHitBuilder_->setGeometry( pgeom ); // access conditions data for this event if ( useCalib || useStaticPedestals || useTimingCorrections || useGasGainCorrections) { recoConditions_->initializeEvent( setup ); } // Get the collections of strip & wire digis from event edm::Handle<CSCStripDigiCollection> stripDigis; edm::Handle<CSCWireDigiCollection> wireDigis; ev.getByLabel( stripDigiTag_, stripDigis); ev.getByLabel( wireDigiTag_, wireDigis); // Create empty collection of rechits std::auto_ptr<CSCRecHit2DCollection> oc( new CSCRecHit2DCollection ); // Fill the CSCRecHit2DCollection recHitBuilder_->build( stripDigis.product(), wireDigis.product(), *oc); // Put collection in event LogTrace("CSCRecHit")<< "[CSCRecHitDProducer] putting collection of " << oc->size() << " rechits into event."; ev.put( oc ); }
unsigned CSCRecHitDProducer::iRun [private] |
Definition at line 37 of file CSCRecHitDProducer.h.
Definition at line 46 of file CSCRecHitDProducer.h.
Referenced by CSCRecHitDProducer(), produce(), and ~CSCRecHitDProducer().
Definition at line 47 of file CSCRecHitDProducer.h.
Referenced by CSCRecHitDProducer(), produce(), and ~CSCRecHitDProducer().
Definition at line 43 of file CSCRecHitDProducer.h.
Referenced by produce().
bool CSCRecHitDProducer::useCalib [private] |
Definition at line 38 of file CSCRecHitDProducer.h.
Referenced by produce().
bool CSCRecHitDProducer::useGasGainCorrections [private] |
Definition at line 41 of file CSCRecHitDProducer.h.
Referenced by produce().
bool CSCRecHitDProducer::useStaticPedestals [private] |
Definition at line 39 of file CSCRecHitDProducer.h.
Referenced by produce().
bool CSCRecHitDProducer::useTimingCorrections [private] |
Definition at line 40 of file CSCRecHitDProducer.h.
Referenced by produce().
Definition at line 44 of file CSCRecHitDProducer.h.
Referenced by produce().