CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CSCRecHitDProducer Class Reference

#include <CSCRecHitDProducer.h>

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

Public Member Functions

 CSCRecHitDProducer (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~CSCRecHitDProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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 21 of file CSCRecHitDProducer.cc.

References recHitBuilder_, recoConditions_, and CSCRecHitDBuilder::setConditions().

21  :
22  iRun( 0 ),
23  useCalib( ps.getParameter<bool>("CSCUseCalibrations") ),
24  useStaticPedestals( ps.getParameter<bool>("CSCUseStaticPedestals") ),
25  useTimingCorrections(ps.getParameter<bool>("CSCUseTimingCorrections") ),
26  useGasGainCorrections(ps.getParameter<bool>("CSCUseGasGainCorrections") ),
27  stripDigiTag_( ps.getParameter<edm::InputTag>("stripDigiTag") ),
28  wireDigiTag_( ps.getParameter<edm::InputTag>("wireDigiTag") )
29 
30 {
31  recHitBuilder_ = new CSCRecHitDBuilder( ps ); // pass on the parameter sets
32  recoConditions_ = new CSCRecoConditions( ps ); // access to conditions data
33 
34  recHitBuilder_->setConditions( recoConditions_ ); // pass down to who needs access
35 
36  // register what this produces
37  produces<CSCRecHit2DCollection>();
38 
39 }
T getParameter(std::string const &) const
CSCRecoConditions * recoConditions_
CSCRecHitDBuilder * recHitBuilder_
edm::InputTag stripDigiTag_
edm::InputTag wireDigiTag_
void setConditions(const CSCRecoConditions *reco)
CSCRecHitDProducer::~CSCRecHitDProducer ( )

Definition at line 41 of file CSCRecHitDProducer.cc.

References recHitBuilder_, and recoConditions_.

42 {
43  delete recHitBuilder_;
44  delete recoConditions_;
45 }
CSCRecoConditions * recoConditions_
CSCRecHitDBuilder * recHitBuilder_

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, useGasGainCorrections, useStaticPedestals, useTimingCorrections, and wireDigiTag_.

49 {
50  // find the geometry for this event & cache it in the builder
52  setup.get<MuonGeometryRecord>().get( h );
53  const CSCGeometry* pgeom = &*h;
54  recHitBuilder_->setGeometry( pgeom );
55 
56  // access conditions data for this event
59  }
60 
61  // Get the collections of strip & wire digis from event
64  ev.getByLabel( stripDigiTag_, stripDigis);
65  ev.getByLabel( wireDigiTag_, wireDigis);
66 
67  // Create empty collection of rechits
68  std::auto_ptr<CSCRecHit2DCollection> oc( new CSCRecHit2DCollection );
69 
70 
71  // Fill the CSCRecHit2DCollection
72  recHitBuilder_->build( stripDigis.product(), wireDigis.product(),*oc);
73 
74 
75  // Put collection in event
76  LogTrace("CSCRecHit")<< "CSCRecHitDProducer: putting rechit collection in event.";
77  ev.put( oc );
78 
79 }
CSCRecoConditions * recoConditions_
void build(const CSCStripDigiCollection *stripds, const CSCWireDigiCollection *wireds, CSCRecHit2DCollection &oc)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
CSCRecHitDBuilder * recHitBuilder_
edm::InputTag stripDigiTag_
edm::InputTag wireDigiTag_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
#define LogTrace(id)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: Handle.h:74
void setGeometry(const CSCGeometry *geom)
void initializeEvent(const edm::EventSetup &es)
fetch the cond data from the database

Member Data Documentation

unsigned CSCRecHitDProducer::iRun
private

Definition at line 37 of file CSCRecHitDProducer.h.

CSCRecHitDBuilder* CSCRecHitDProducer::recHitBuilder_
private

Definition at line 46 of file CSCRecHitDProducer.h.

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

CSCRecoConditions* CSCRecHitDProducer::recoConditions_
private

Definition at line 47 of file CSCRecHitDProducer.h.

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

edm::InputTag CSCRecHitDProducer::stripDigiTag_
private

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

edm::InputTag CSCRecHitDProducer::wireDigiTag_
private

Definition at line 44 of file CSCRecHitDProducer.h.

Referenced by produce().