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::EDConsumerBase 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 &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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::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_.

49 {
50  // Dumps the message TWICE if both categories are set!
51  // LogTrace("CSCRecHitDProducer|CSCRecHit")<< "[CSCRecHitDProducer] starting event " << ev.id().event() << " of run " << ev.id().run();
52  LogTrace("CSCRecHit")<< "[CSCRecHitDProducer] starting event " << ev.id().event() << " of run " << ev.id().run();
53  // find the geometry for this event & cache it in the builder
55  setup.get<MuonGeometryRecord>().get( h );
56  const CSCGeometry* pgeom = &*h;
57  recHitBuilder_->setGeometry( pgeom );
58 
59  // access conditions data for this event
62  }
63 
64  // Get the collections of strip & wire digis from event
67  ev.getByLabel( stripDigiTag_, stripDigis);
68  ev.getByLabel( wireDigiTag_, wireDigis);
69 
70  // Create empty collection of rechits
71  std::auto_ptr<CSCRecHit2DCollection> oc( new CSCRecHit2DCollection );
72 
73  // Fill the CSCRecHit2DCollection
74  recHitBuilder_->build( stripDigis.product(), wireDigis.product(), *oc);
75 
76  // Put collection in event
77  LogTrace("CSCRecHit")<< "[CSCRecHitDProducer] putting collection of " << oc->size() << " rechits into event.";
78  ev.put( oc );
79 
80 }
RunNumber_t run() const
Definition: EventID.h:42
EventNumber_t event() const
Definition: EventID.h:44
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:94
CSCRecHitDBuilder * recHitBuilder_
edm::InputTag stripDigiTag_
edm::InputTag wireDigiTag_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
#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
edm::EventID id() const
Definition: EventBase.h:56
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().