CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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<>

Public Member Functions

 CSCRecHitDProducer (const edm::ParameterSet &ps)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~CSCRecHitDProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::ESGetToken< CSCGeometry,
MuonGeometryRecord
cscGeom_token
 
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<>
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

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 33 of file CSCRecHitDProducer.h.

Constructor & Destructor Documentation

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

Definition at line 17 of file CSCRecHitDProducer.cc.

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

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

Definition at line 38 of file CSCRecHitDProducer.cc.

References recHitBuilder_, and recoConditions_.

38  {
39  delete recHitBuilder_;
40  delete recoConditions_;
41 }
CSCRecoConditions * recoConditions_
CSCRecHitDBuilder * recHitBuilder_

Member Function Documentation

void CSCRecHitDProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 75 of file CSCRecHitDProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), submitPVResolutionJobs::desc, and HLT_FULL_cff::InputTag.

75  {
77  desc.add<double>("CSCStripPeakThreshold", 10.0);
78  desc.add<double>("CSCStripClusterChargeCut", 25.0);
79  desc.add<double>("CSCStripxtalksOffset", 0.03);
80  desc.add<bool>("UseAverageTime", false);
81  desc.add<bool>("UseParabolaFit", false);
82  desc.add<bool>("UseFivePoleFit", true);
83  desc.add<int>("CSCWireClusterDeltaT", 1);
84  desc.add<bool>("CSCUseCalibrations", true);
85  desc.add<bool>("CSCUseStaticPedestals", false);
86  desc.add<int>("CSCNoOfTimeBinsForDynamicPedestal", 2);
87  desc.add<edm::InputTag>("wireDigiTag", edm::InputTag("muonCSCDigis", "MuonCSCWireDigi"));
88  desc.add<edm::InputTag>("stripDigiTag", edm::InputTag("muonCSCDigis", "MuonCSCStripDigi"));
89  desc.add<bool>("readBadChannels", true);
90  desc.add<bool>("readBadChambers", true);
91  desc.add<bool>("CSCUseTimingCorrections", true);
92  desc.add<bool>("CSCUseGasGainCorrections", true);
93  desc.addUntracked<bool>("CSCDebug", false);
94  desc.add<int>("CSCstripWireDeltaTime", 8);
95 
96  desc.add<double>("XTasymmetry_ME1a", 0.023), desc.add<double>("XTasymmetry_ME1b", 0.01),
97  desc.add<double>("XTasymmetry_ME12", 0.015), desc.add<double>("XTasymmetry_ME13", 0.02),
98  desc.add<double>("XTasymmetry_ME21", 0.023), desc.add<double>("XTasymmetry_ME22", 0.023),
99  desc.add<double>("XTasymmetry_ME31", 0.023), desc.add<double>("XTasymmetry_ME32", 0.023),
100  desc.add<double>("XTasymmetry_ME41", 0.023), desc.add<double>("ConstSyst_ME1a", 0.01),
101  desc.add<double>("ConstSyst_ME1b", 0.02), desc.add<double>("ConstSyst_ME12", 0.02),
102  desc.add<double>("ConstSyst_ME13", 0.03), desc.add<double>("ConstSyst_ME21", 0.03),
103  desc.add<double>("ConstSyst_ME22", 0.03), desc.add<double>("ConstSyst_ME31", 0.03),
104  desc.add<double>("ConstSyst_ME32", 0.03), desc.add<double>("ConstSyst_ME41", 0.03),
105  desc.add<double>("NoiseLevel_ME1a", 9.0), desc.add<double>("NoiseLevel_ME1b", 6.0),
106  desc.add<double>("NoiseLevel_ME12", 7.0), desc.add<double>("NoiseLevel_ME13", 4.0),
107  desc.add<double>("NoiseLevel_ME21", 5.0), desc.add<double>("NoiseLevel_ME22", 7.0),
108  desc.add<double>("NoiseLevel_ME31", 5.0), desc.add<double>("NoiseLevel_ME32", 7.0),
109  desc.add<double>("NoiseLevel_ME41", 5.0);
110 
111  desc.add<bool>("CSCUseReducedWireTimeWindow", false);
112  desc.add<int>("CSCWireTimeWindowLow", 0);
113  desc.add<int>("CSCWireTimeWindowHigh", 15);
114  descriptions.add("cscRecHitDProducer", desc);
115 }
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 
)
override

Definition at line 43 of file CSCRecHitDProducer.cc.

References CSCRecHitDBuilder::build(), cscGeom_token, edm::EventID::event(), edm::Event::getByToken(), edm::EventSetup::getHandle(), 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.

43  {
44  // Dumps the message TWICE if both categories are set!
45  // LogTrace("CSCRecHitDProducer|CSCRecHit")<< "[CSCRecHitDProducer] starting event " << ev.id().event() << " of run " << ev.id().run();
46  LogTrace("CSCRecHit") << "[CSCRecHitDProducer] starting event " << ev.id().event() << " of run " << ev.id().run();
47  // find the geometry for this event & cache it in the builder
49  const CSCGeometry* pgeom = &*h;
51 
52  // access conditions data for this event
55  }
56 
57  // Get the collections of strip & wire digis from event
60 
61  ev.getByToken(s_token, stripDigis);
62  ev.getByToken(w_token, wireDigis);
63 
64  // Create empty collection of rechits
65  auto oc = std::make_unique<CSCRecHit2DCollection>();
66 
67  // Fill the CSCRecHit2DCollection
68  recHitBuilder_->build(stripDigis.product(), wireDigis.product(), *oc);
69 
70  // Put collection in event
71  LogTrace("CSCRecHit") << "[CSCRecHitDProducer] putting collection of " << oc->size() << " rechits into event.";
72  ev.put(std::move(oc));
73 }
RunNumber_t run() const
Definition: EventID.h:38
EventNumber_t event() const
Definition: EventID.h:40
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeom_token
CSCRecoConditions * recoConditions_
#define LogTrace(id)
void build(const CSCStripDigiCollection *stripds, const CSCWireDigiCollection *wireds, CSCRecHit2DCollection &oc)
CSCRecHitDBuilder * recHitBuilder_
def move
Definition: eostools.py:511
edm::EDGetTokenT< CSCStripDigiCollection > s_token
T const * product() const
Definition: Handle.h:70
edm::EventID id() const
Definition: EventBase.h:59
edm::EDGetTokenT< CSCWireDigiCollection > w_token
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:157
void setGeometry(const CSCGeometry *geom)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
void initializeEvent(const edm::EventSetup &es)
fetch the cond data from the database

Member Data Documentation

edm::ESGetToken<CSCGeometry, MuonGeometryRecord> CSCRecHitDProducer::cscGeom_token
private

Definition at line 55 of file CSCRecHitDProducer.h.

Referenced by CSCRecHitDProducer(), and produce().

unsigned CSCRecHitDProducer::iRun
private

Definition at line 44 of file CSCRecHitDProducer.h.

CSCRecHitDBuilder* CSCRecHitDProducer::recHitBuilder_
private

Definition at line 50 of file CSCRecHitDProducer.h.

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

CSCRecoConditions* CSCRecHitDProducer::recoConditions_
private

Definition at line 51 of file CSCRecHitDProducer.h.

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

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

Definition at line 53 of file CSCRecHitDProducer.h.

Referenced by CSCRecHitDProducer(), and produce().

bool CSCRecHitDProducer::useCalib
private

Definition at line 45 of file CSCRecHitDProducer.h.

Referenced by produce().

bool CSCRecHitDProducer::useGasGainCorrections
private

Definition at line 48 of file CSCRecHitDProducer.h.

Referenced by produce().

bool CSCRecHitDProducer::useStaticPedestals
private

Definition at line 46 of file CSCRecHitDProducer.h.

Referenced by produce().

bool CSCRecHitDProducer::useTimingCorrections
private

Definition at line 47 of file CSCRecHitDProducer.h.

Referenced by produce().

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

Definition at line 54 of file CSCRecHitDProducer.h.

Referenced by CSCRecHitDProducer(), and produce().