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::stream::EDProducer<> edm::stream::EDProducerBase 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::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 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
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

unsigned iRun
 
CSCRecHitDBuilderrecHitBuilder_
 
CSCRecoConditionsrecoConditions_
 
edm::EDGetTokenT
< CSCStripDigiCollection
s_token
 
bool useCalib
 
bool useGasGainCorrections
 
bool useStaticPedestals
 
bool useTimingCorrections
 
edm::EDGetTokenT
< CSCWireDigiCollection
w_token
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 30 of file CSCRecHitDProducer.h.

Constructor & Destructor Documentation

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

Definition at line 19 of file CSCRecHitDProducer.cc.

References edm::ParameterSet::getParameter(), recHitBuilder_, recoConditions_, s_token, CSCRecHitDBuilder::setConditions(), and w_token.

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

Definition at line 40 of file CSCRecHitDProducer.cc.

References recHitBuilder_, and recoConditions_.

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

Member Function Documentation

void CSCRecHitDProducer::produce ( edm::Event ev,
const edm::EventSetup setup 
)
virtual

Implements edm::stream::EDProducerBase.

Definition at line 47 of file CSCRecHitDProducer.cc.

References CSCRecHitDBuilder::build(), edm::EventID::event(), edm::EventSetup::get(), edm::Event::getByToken(), h, edm::EventBase::id(), CSCRecoConditions::initializeEvent(), LogTrace, edm::Handle< T >::product(), edm::Event::put(), recHitBuilder_, recoConditions_, edm::EventID::run(), s_token, CSCRecHitDBuilder::setGeometry(), useCalib, useGasGainCorrections, useStaticPedestals, useTimingCorrections, and w_token.

48 {
49  // Dumps the message TWICE if both categories are set!
50  // LogTrace("CSCRecHitDProducer|CSCRecHit")<< "[CSCRecHitDProducer] starting event " << ev.id().event() << " of run " << ev.id().run();
51  LogTrace("CSCRecHit")<< "[CSCRecHitDProducer] starting event " << ev.id().event() << " of run " << ev.id().run();
52  // find the geometry for this event & cache it in the builder
54  setup.get<MuonGeometryRecord>().get( h );
55  const CSCGeometry* pgeom = &*h;
56  recHitBuilder_->setGeometry( pgeom );
57 
58  // access conditions data for this event
61  }
62 
63  // Get the collections of strip & wire digis from event
66 
67  ev.getByToken( s_token, stripDigis);
68  ev.getByToken( w_token, 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:39
EventNumber_t event() const
Definition: EventID.h:41
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
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:115
CSCRecHitDBuilder * recHitBuilder_
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
#define LogTrace(id)
edm::EDGetTokenT< CSCStripDigiCollection > s_token
T const * product() const
Definition: Handle.h:81
const T & get() const
Definition: EventSetup.h:55
edm::EventID id() const
Definition: EventBase.h:60
edm::EDGetTokenT< CSCWireDigiCollection > w_token
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 41 of file CSCRecHitDProducer.h.

CSCRecHitDBuilder* CSCRecHitDProducer::recHitBuilder_
private

Definition at line 47 of file CSCRecHitDProducer.h.

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

CSCRecoConditions* CSCRecHitDProducer::recoConditions_
private

Definition at line 48 of file CSCRecHitDProducer.h.

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

edm::EDGetTokenT<CSCStripDigiCollection> CSCRecHitDProducer::s_token
private

Definition at line 50 of file CSCRecHitDProducer.h.

Referenced by CSCRecHitDProducer(), and produce().

bool CSCRecHitDProducer::useCalib
private

Definition at line 42 of file CSCRecHitDProducer.h.

Referenced by produce().

bool CSCRecHitDProducer::useGasGainCorrections
private

Definition at line 45 of file CSCRecHitDProducer.h.

Referenced by produce().

bool CSCRecHitDProducer::useStaticPedestals
private

Definition at line 43 of file CSCRecHitDProducer.h.

Referenced by produce().

bool CSCRecHitDProducer::useTimingCorrections
private

Definition at line 44 of file CSCRecHitDProducer.h.

Referenced by produce().

edm::EDGetTokenT<CSCWireDigiCollection> CSCRecHitDProducer::w_token
private

Definition at line 51 of file CSCRecHitDProducer.h.

Referenced by CSCRecHitDProducer(), and produce().