CMS 3D CMS Logo

Public Member Functions | Private Attributes

CSCRecHitDProducer Class Reference

#include <CSCRecHitDProducer.h>

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

List of all members.

Public Member Functions

 CSCRecHitDProducer (const edm::ParameterSet &ps)
virtual void produce (edm::Event &, const edm::EventSetup &)
 ~CSCRecHitDProducer ()

Private Attributes

unsigned iRun
CSCRecHitDBuilderrecHitBuilder_
CSCRecoConditionsrecoConditions_
edm::InputTag stripDigiTag_
bool useCalib
bool useStaticPedestals
bool useTimingCorrections
edm::InputTag wireDigiTag_

Detailed Description

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.

Author:
Stoyan Stoynev

Definition at line 26 of file CSCRecHitDProducer.h.


Constructor & Destructor Documentation

CSCRecHitDProducer::CSCRecHitDProducer ( const edm::ParameterSet ps) [explicit]

Definition at line 22 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") ),
  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_;
}

Member Function Documentation

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::EventSetup::get(), edm::Event::getByLabel(), h, CSCRecoConditions::initializeEvent(), LogTrace, edm::Handle< T >::product(), edm::Event::put(), recHitBuilder_, recoConditions_, CSCRecHitDBuilder::setGeometry(), stripDigiTag_, useCalib, useStaticPedestals, useTimingCorrections, and wireDigiTag_.

{
  // 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 ) {  
    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 rechit collection in event.";
  ev.put( oc );

}

Member Data Documentation

unsigned CSCRecHitDProducer::iRun [private]

Definition at line 37 of file CSCRecHitDProducer.h.

Definition at line 45 of file CSCRecHitDProducer.h.

Referenced by CSCRecHitDProducer(), produce(), and ~CSCRecHitDProducer().

Definition at line 46 of file CSCRecHitDProducer.h.

Referenced by CSCRecHitDProducer(), produce(), and ~CSCRecHitDProducer().

Definition at line 42 of file CSCRecHitDProducer.h.

Referenced by produce().

Definition at line 38 of file CSCRecHitDProducer.h.

Referenced by produce().

Definition at line 39 of file CSCRecHitDProducer.h.

Referenced by produce().

Definition at line 40 of file CSCRecHitDProducer.h.

Referenced by produce().

Definition at line 43 of file CSCRecHitDProducer.h.

Referenced by produce().