CMS 3D CMS Logo

CSCRecHitDProducer.cc
Go to the documentation of this file.
4 
13 
15 
17  : iRun(0),
18  useCalib(ps.getParameter<bool>("CSCUseCalibrations")),
19  useStaticPedestals(ps.getParameter<bool>("CSCUseStaticPedestals")),
20  useTimingCorrections(ps.getParameter<bool>("CSCUseTimingCorrections")),
21  useGasGainCorrections(ps.getParameter<bool>("CSCUseGasGainCorrections"))
22 
23 {
24  s_token = consumes<CSCStripDigiCollection>(ps.getParameter<edm::InputTag>("stripDigiTag"));
25  w_token = consumes<CSCWireDigiCollection>(ps.getParameter<edm::InputTag>("wireDigiTag"));
26  cscGeom_token = esConsumes<CSCGeometry, MuonGeometryRecord>();
27 
28  recHitBuilder_ = new CSCRecHitDBuilder(ps); // pass on the parameter sets
29  recoConditions_ = new CSCRecoConditions(ps, consumesCollector()); // access to conditions data
30 
31  recHitBuilder_->setConditions(recoConditions_); // pass down to who needs access
32 
33  // register what this produces
34  produces<CSCRecHit2DCollection>();
35 }
36 
38  delete recHitBuilder_;
39  delete recoConditions_;
40 }
41 
43  // Dumps the message TWICE if both categories are set!
44  // LogTrace("CSCRecHitDProducer|CSCRecHit")<< "[CSCRecHitDProducer] starting event " << ev.id().event() << " of run " << ev.id().run();
45  LogTrace("CSCRecHit") << "[CSCRecHitDProducer] starting event " << ev.id().event() << " of run " << ev.id().run();
46  // find the geometry for this event & cache it in the builder
48  const CSCGeometry* pgeom = &*h;
50 
51  // access conditions data for this event
54  }
55 
56  // Get the collections of strip & wire digis from event
59 
60  ev.getByToken(s_token, stripDigis);
61  ev.getByToken(w_token, wireDigis);
62 
63  // Create empty collection of rechits
64  auto oc = std::make_unique<CSCRecHit2DCollection>();
65 
66  // Fill the CSCRecHit2DCollection
67  recHitBuilder_->build(stripDigis.product(), wireDigis.product(), *oc);
68 
69  // Put collection in event
70  LogTrace("CSCRecHit") << "[CSCRecHitDProducer] putting collection of " << oc->size() << " rechits into event.";
71  ev.put(std::move(oc));
72 }
73 
76  desc.add<double>("CSCStripPeakThreshold", 10.0);
77  desc.add<double>("CSCStripClusterChargeCut", 25.0);
78  desc.add<double>("CSCStripxtalksOffset", 0.03);
79  desc.add<bool>("UseAverageTime", false);
80  desc.add<bool>("UseParabolaFit", false);
81  desc.add<bool>("UseFivePoleFit", true);
82  desc.add<int>("CSCWireClusterDeltaT", 1);
83  desc.add<bool>("CSCUseCalibrations", true);
84  desc.add<bool>("CSCUseStaticPedestals", false);
85  desc.add<int>("CSCNoOfTimeBinsForDynamicPedestal", 2);
86  desc.add<edm::InputTag>("wireDigiTag", edm::InputTag("muonCSCDigis", "MuonCSCWireDigi"));
87  desc.add<edm::InputTag>("stripDigiTag", edm::InputTag("muonCSCDigis", "MuonCSCStripDigi"));
88  desc.add<bool>("readBadChannels", true);
89  desc.add<bool>("readBadChambers", true);
90  desc.add<bool>("CSCUseTimingCorrections", true);
91  desc.add<bool>("CSCUseGasGainCorrections", true);
92  desc.addUntracked<bool>("CSCDebug", false);
93  desc.add<int>("CSCstripWireDeltaTime", 8);
94 
95  desc.add<double>("XTasymmetry_ME1a", 0.023), desc.add<double>("XTasymmetry_ME1b", 0.01),
96  desc.add<double>("XTasymmetry_ME12", 0.015), desc.add<double>("XTasymmetry_ME13", 0.02),
97  desc.add<double>("XTasymmetry_ME21", 0.023), desc.add<double>("XTasymmetry_ME22", 0.023),
98  desc.add<double>("XTasymmetry_ME31", 0.023), desc.add<double>("XTasymmetry_ME32", 0.023),
99  desc.add<double>("XTasymmetry_ME41", 0.023), desc.add<double>("ConstSyst_ME1a", 0.01),
100  desc.add<double>("ConstSyst_ME1b", 0.02), desc.add<double>("ConstSyst_ME12", 0.02),
101  desc.add<double>("ConstSyst_ME13", 0.03), desc.add<double>("ConstSyst_ME21", 0.03),
102  desc.add<double>("ConstSyst_ME22", 0.03), desc.add<double>("ConstSyst_ME31", 0.03),
103  desc.add<double>("ConstSyst_ME32", 0.03), desc.add<double>("ConstSyst_ME41", 0.03),
104  desc.add<double>("NoiseLevel_ME1a", 9.0), desc.add<double>("NoiseLevel_ME1b", 6.0),
105  desc.add<double>("NoiseLevel_ME12", 7.0), desc.add<double>("NoiseLevel_ME13", 4.0),
106  desc.add<double>("NoiseLevel_ME21", 5.0), desc.add<double>("NoiseLevel_ME22", 7.0),
107  desc.add<double>("NoiseLevel_ME31", 5.0), desc.add<double>("NoiseLevel_ME32", 7.0),
108  desc.add<double>("NoiseLevel_ME41", 5.0);
109 
110  desc.add<bool>("CSCUseReducedWireTimeWindow", false);
111  desc.add<int>("CSCWireTimeWindowLow", 0);
112  desc.add<int>("CSCWireTimeWindowHigh", 15);
113  descriptions.add("cscRecHitDProducer", desc);
114 }
115 
116 //define this as a plug-in
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeom_token
void setConditions(CSCRecoConditions *reco)
T const * product() const
Definition: Handle.h:70
CSCRecoConditions * recoConditions_
#define LogTrace(id)
void build(const CSCStripDigiCollection *stripds, const CSCWireDigiCollection *wireds, CSCRecHit2DCollection &oc)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
CSCRecHitDBuilder * recHitBuilder_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::EDGetTokenT< CSCStripDigiCollection > s_token
void produce(edm::Event &, const edm::EventSetup &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~CSCRecHitDProducer() override
edm::EDGetTokenT< CSCWireDigiCollection > w_token
CSCRecHitDProducer(const edm::ParameterSet &ps)
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
def move(src, dest)
Definition: eostools.py:511