CMS 3D CMS Logo

CSCRecHitDProducer.cc
Go to the documentation of this file.
4 
14 
16 
18 
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 
40  delete recHitBuilder_;
41  delete recoConditions_;
42 }
43 
45  // Dumps the message TWICE if both categories are set!
46  // LogTrace("CSCRecHitDProducer|CSCRecHit")<< "[CSCRecHitDProducer] starting event " << ev.id().event() << " of run " << ev.id().run();
47  LogTrace("CSCRecHit") << "[CSCRecHitDProducer] starting event " << ev.id().event() << " of run " << ev.id().run();
48  // find the geometry for this event & cache it in the builder
50  setup.get<MuonGeometryRecord>().get(h);
51  const CSCGeometry* pgeom = &*h;
53 
54  // access conditions data for this event
57  }
58 
59  // Get the collections of strip & wire digis from event
62 
63  ev.getByToken(s_token, stripDigis);
64  ev.getByToken(w_token, wireDigis);
65 
66  // Create empty collection of rechits
67  auto oc = std::make_unique<CSCRecHit2DCollection>();
68 
69  // Fill the CSCRecHit2DCollection
70  recHitBuilder_->build(stripDigis.product(), wireDigis.product(), *oc);
71 
72  // Put collection in event
73  LogTrace("CSCRecHit") << "[CSCRecHitDProducer] putting collection of " << oc->size() << " rechits into event.";
74  ev.put(std::move(oc));
75 }
76 
79  desc.add<double>("CSCStripPeakThreshold", 10.0);
80  desc.add<double>("CSCStripClusterChargeCut", 25.0);
81  desc.add<double>("CSCStripxtalksOffset", 0.03);
82  desc.add<bool>("UseAverageTime", false);
83  desc.add<bool>("UseParabolaFit", false);
84  desc.add<bool>("UseFivePoleFit", true);
85  desc.add<int>("CSCWireClusterDeltaT", 1);
86  desc.add<bool>("CSCUseCalibrations", true);
87  desc.add<bool>("CSCUseStaticPedestals", false);
88  desc.add<int>("CSCNoOfTimeBinsForDynamicPedestal", 2);
89  desc.add<edm::InputTag>("wireDigiTag", edm::InputTag("muonCSCDigis", "MuonCSCWireDigi"));
90  desc.add<edm::InputTag>("stripDigiTag", edm::InputTag("muonCSCDigis", "MuonCSCStripDigi"));
91  desc.add<bool>("readBadChannels", true);
92  desc.add<bool>("readBadChambers", true);
93  desc.add<bool>("CSCUseTimingCorrections", true);
94  desc.add<bool>("CSCUseGasGainCorrections", true);
95  desc.addUntracked<bool>("CSCDebug", false);
96  desc.add<int>("CSCstripWireDeltaTime", 8);
97  desc.addUntracked<int>("CSCStripClusterSize", 3);
98 
99  desc.add<double>("XTasymmetry_ME1a", 0.023), desc.add<double>("XTasymmetry_ME1b", 0.01),
100  desc.add<double>("XTasymmetry_ME12", 0.015), desc.add<double>("XTasymmetry_ME13", 0.02),
101  desc.add<double>("XTasymmetry_ME21", 0.023), desc.add<double>("XTasymmetry_ME22", 0.023),
102  desc.add<double>("XTasymmetry_ME31", 0.023), desc.add<double>("XTasymmetry_ME32", 0.023),
103  desc.add<double>("XTasymmetry_ME41", 0.023), desc.add<double>("ConstSyst_ME1a", 0.01),
104  desc.add<double>("ConstSyst_ME1b", 0.02), desc.add<double>("ConstSyst_ME12", 0.02),
105  desc.add<double>("ConstSyst_ME13", 0.03), desc.add<double>("ConstSyst_ME21", 0.03),
106  desc.add<double>("ConstSyst_ME22", 0.03), desc.add<double>("ConstSyst_ME31", 0.03),
107  desc.add<double>("ConstSyst_ME32", 0.03), desc.add<double>("ConstSyst_ME41", 0.03),
108  desc.add<double>("NoiseLevel_ME1a", 9.0), desc.add<double>("NoiseLevel_ME1b", 6.0),
109  desc.add<double>("NoiseLevel_ME12", 7.0), desc.add<double>("NoiseLevel_ME13", 4.0),
110  desc.add<double>("NoiseLevel_ME21", 5.0), desc.add<double>("NoiseLevel_ME22", 7.0),
111  desc.add<double>("NoiseLevel_ME31", 5.0), desc.add<double>("NoiseLevel_ME32", 7.0),
112  desc.add<double>("NoiseLevel_ME41", 5.0);
113 
114  desc.add<bool>("CSCUseReducedWireTimeWindow", false);
115  desc.add<int>("CSCWireTimeWindowLow", 0);
116  desc.add<int>("CSCWireTimeWindowHigh", 15);
117  descriptions.add("configWireTimeWindow", desc);
118 }
119 
120 //define this as a plug-in
CSCRecHit2DCollection.h
Handle.h
electrons_cff.bool
bool
Definition: electrons_cff.py:372
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
CSCRecHitDBuilder::setGeometry
void setGeometry(const CSCGeometry *geom)
Definition: CSCRecHitDBuilder.h:61
MessageLogger.h
CSCRecHitDProducer::~CSCRecHitDProducer
~CSCRecHitDProducer() override
Definition: CSCRecHitDProducer.cc:39
CSCRecoConditions::initializeEvent
void initializeEvent(const edm::EventSetup &es)
fetch the cond data from the database
Definition: CSCRecoConditions.cc:10
edm::Handle::product
T const * product() const
Definition: Handle.h:70
EDProducer.h
ESHandle.h
CSCRecoConditions.h
CSCRecHitDBuilder::setConditions
void setConditions(CSCRecoConditions *reco)
Definition: CSCRecHitDBuilder.cc:151
CSCRecHitDProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: CSCRecHitDProducer.cc:44
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
CSCRecHitDProducer::useStaticPedestals
bool useStaticPedestals
Definition: CSCRecHitDProducer.h:43
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Handle< CSCStripDigiCollection >
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
CSCRecHitDProducer::recHitBuilder_
CSCRecHitDBuilder * recHitBuilder_
Definition: CSCRecHitDProducer.h:47
CSCGeometry
Definition: CSCGeometry.h:24
CSCRecHitDProducer::s_token
edm::EDGetTokenT< CSCStripDigiCollection > s_token
Definition: CSCRecHitDProducer.h:50
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
CSCRecHitDProducer::w_token
edm::EDGetTokenT< CSCWireDigiCollection > w_token
Definition: CSCRecHitDProducer.h:51
CSCRecHitDProducer::useTimingCorrections
bool useTimingCorrections
Definition: CSCRecHitDProducer.h:44
CSCRecHitDProducer::useCalib
bool useCalib
Definition: CSCRecHitDProducer.h:42
CSCRecHitDProducer::useGasGainCorrections
bool useGasGainCorrections
Definition: CSCRecHitDProducer.h:45
edm::ESHandle< CSCGeometry >
CSCRecHitDProducer
Definition: CSCRecHitDProducer.h:30
CSCRecHitDBuilder::build
void build(const CSCStripDigiCollection *stripds, const CSCWireDigiCollection *wireds, CSCRecHit2DCollection &oc)
Definition: CSCRecHitDBuilder.cc:47
CSCRecHitDProducer::CSCRecHitDProducer
CSCRecHitDProducer(const edm::ParameterSet &ps)
Definition: CSCRecHitDProducer.cc:19
h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
simCaloStage2Layer1Digis_cfi.useCalib
useCalib
Definition: simCaloStage2Layer1Digis_cfi.py:13
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
CSCRecHitDProducer.h
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
CSCRecHitDProducer::recoConditions_
CSCRecoConditions * recoConditions_
Definition: CSCRecHitDProducer.h:48
CSCRecHitDBuilder
Definition: CSCRecHitDBuilder.h:38
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
CSCRecHitDBuilder.h
CSCRecoConditions
Definition: CSCRecoConditions.h:24
Frameworkfwd.h
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
Exception.h
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
ParameterSet.h
MuonGeometryRecord.h
CSCRecHitDProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: CSCRecHitDProducer.cc:77
edm::Event
Definition: Event.h:73
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
edm::InputTag
Definition: InputTag.h:15