CMS 3D CMS Logo

List of all members | Public Member Functions | Static 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)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

unsigned iRun
 
CSCRecHitDBuilderrecHitBuilder_
 
CSCRecoConditionsrecoConditions_
 
edm::EDGetTokenT< CSCStripDigiCollections_token
 
bool useCalib
 
bool useGasGainCorrections
 
bool useStaticPedestals
 
bool useTimingCorrections
 
edm::EDGetTokenT< CSCWireDigiCollectionw_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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
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
 
- 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::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 82 of file CSCRecHitDProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), and DEFINE_FWK_MODULE.

82  {
84  desc.add<double>("CSCStripPeakThreshold",10.0);
85  desc.add<double>("CSCStripClusterChargeCut",25.0);
86  desc.add<double>("CSCStripxtalksOffset",0.03);
87  desc.add<bool>("UseAverageTime",false);
88  desc.add<bool>("UseParabolaFit",false);
89  desc.add<bool>("UseFivePoleFit",true);
90  desc.add<int>("CSCWireClusterDeltaT",1);
91  desc.add<bool>("CSCUseCalibrations",true);
92  desc.add<bool>("CSCUseStaticPedestals",false);
93  desc.add<int>("CSCNoOfTimeBinsForDynamicPedestal",2);
94  desc.add<edm::InputTag>("wireDigiTag",edm::InputTag("muonCSCDigis","MuonCSCWireDigi"));
95  desc.add<edm::InputTag>("stripDigiTag",edm::InputTag("muonCSCDigis","MuonCSCStripDigi"));
96  desc.add<bool>("readBadChannels",true);
97  desc.add<bool>("readBadChambers",true);
98  desc.add<bool>("CSCUseTimingCorrections",true);
99  desc.add<bool>("CSCUseGasGainCorrections",true);
100  desc.addUntracked<bool>("CSCDebug",false);
101  desc.add<int>("CSCstripWireDeltaTime",8);
102  desc.addUntracked<int>("CSCStripClusterSize",3);
103 
104  desc.add<double>("XTasymmetry_ME1a",0.023),
105  desc.add<double>("XTasymmetry_ME1b",0.01),
106  desc.add<double>("XTasymmetry_ME12",0.015),
107  desc.add<double>("XTasymmetry_ME13",0.02),
108  desc.add<double>("XTasymmetry_ME21",0.023),
109  desc.add<double>("XTasymmetry_ME22",0.023),
110  desc.add<double>("XTasymmetry_ME31",0.023),
111  desc.add<double>("XTasymmetry_ME32",0.023),
112  desc.add<double>("XTasymmetry_ME41",0.023),
113  desc.add<double>("ConstSyst_ME1a",0.01),
114  desc.add<double>("ConstSyst_ME1b",0.02),
115  desc.add<double>("ConstSyst_ME12",0.02),
116  desc.add<double>("ConstSyst_ME13",0.03),
117  desc.add<double>("ConstSyst_ME21",0.03),
118  desc.add<double>("ConstSyst_ME22",0.03),
119  desc.add<double>("ConstSyst_ME31",0.03),
120  desc.add<double>("ConstSyst_ME32",0.03),
121  desc.add<double>("ConstSyst_ME41",0.03),
122  desc.add<double>("NoiseLevel_ME1a",9.0),
123  desc.add<double>("NoiseLevel_ME1b",6.0),
124  desc.add<double>("NoiseLevel_ME12",7.0),
125  desc.add<double>("NoiseLevel_ME13",4.0),
126  desc.add<double>("NoiseLevel_ME21",5.0),
127  desc.add<double>("NoiseLevel_ME22",7.0),
128  desc.add<double>("NoiseLevel_ME31",5.0),
129  desc.add<double>("NoiseLevel_ME32",7.0),
130  desc.add<double>("NoiseLevel_ME41",5.0);
131 
132  desc.add<bool>("CSCUseReducedWireTimeWindow", false);
133  desc.add<int>("CSCWireTimeWindowLow", 0);
134  desc.add<int>("CSCWireTimeWindowHigh", 15);
135  descriptions.add("configWireTimeWindow", desc);
136 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void CSCRecHitDProducer::produce ( edm::Event ev,
const edm::EventSetup setup 
)
virtual

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, eostools::move(), 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  auto oc = std::make_unique<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(std::move(oc));
79 
80 }
RunNumber_t run() const
Definition: EventID.h:39
EventNumber_t event() const
Definition: EventID.h:41
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
CSCRecoConditions * recoConditions_
void build(const CSCStripDigiCollection *stripds, const CSCWireDigiCollection *wireds, CSCRecHit2DCollection &oc)
CSCRecHitDBuilder * recHitBuilder_
#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
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

unsigned CSCRecHitDProducer::iRun
private

Definition at line 43 of file CSCRecHitDProducer.h.

CSCRecHitDBuilder* CSCRecHitDProducer::recHitBuilder_
private

Definition at line 49 of file CSCRecHitDProducer.h.

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

CSCRecoConditions* CSCRecHitDProducer::recoConditions_
private

Definition at line 50 of file CSCRecHitDProducer.h.

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

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

Definition at line 52 of file CSCRecHitDProducer.h.

Referenced by CSCRecHitDProducer(), and produce().

bool CSCRecHitDProducer::useCalib
private

Definition at line 44 of file CSCRecHitDProducer.h.

Referenced by produce().

bool CSCRecHitDProducer::useGasGainCorrections
private

Definition at line 47 of file CSCRecHitDProducer.h.

Referenced by produce().

bool CSCRecHitDProducer::useStaticPedestals
private

Definition at line 45 of file CSCRecHitDProducer.h.

Referenced by produce().

bool CSCRecHitDProducer::useTimingCorrections
private

Definition at line 46 of file CSCRecHitDProducer.h.

Referenced by produce().

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

Definition at line 53 of file CSCRecHitDProducer.h.

Referenced by CSCRecHitDProducer(), and produce().