CMS 3D CMS Logo

MTDTimeCalibESProducer.cc
Go to the documentation of this file.
2 
5 
8 
10 
16 
17 #include <string>
18 #include <memory>
19 
20 using namespace edm;
21 
23 public:
25  ~MTDTimeCalibESProducer() override = default;
26 
27  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
28 
29  std::unique_ptr<MTDTimeCalib> produce(const MTDTimeCalibRecord&);
30 
31 private:
35 };
36 
38  pset_ = p;
39  auto cc = setWhatProduced(this, "MTDTimeCalib");
40  ddToken_ = cc.consumes();
41  topoToken_ = cc.consumes();
42 }
43 
44 // Configuration descriptions
47  desc.add<double>("BTLTimeOffset", 0.)->setComment("Time offset (additive) to all the BTL RecHits [ns]");
48  desc.add<double>("ETLTimeOffset", 0.)->setComment("Time offset (additive) to all the ETL RecHits [ns]");
49  desc.add<double>("BTLLightCollTime", 0.2)->setComment("Light collection time for BTL tile geometry [ns]");
50  desc.add<double>("BTLLightCollSlope", 0.075)
51  ->setComment("Light collection slope for bar for BTL bar tile geometry [ns/cm]");
52  descriptions.add("MTDTimeCalibESProducer", desc);
53 }
54 
55 std::unique_ptr<MTDTimeCalib> MTDTimeCalibESProducer::produce(const MTDTimeCalibRecord& iRecord) {
56  return std::make_unique<MTDTimeCalib>(pset_, &iRecord.get(ddToken_), &iRecord.get(topoToken_));
57 }
58 
61 
MTDTimeCalib.h
ESHandle.h
MTDTimeCalibESProducer::MTDTimeCalibESProducer
MTDTimeCalibESProducer(const edm::ParameterSet &p)
Definition: MTDTimeCalibESProducer.cc:37
edm
HLT enums.
Definition: AlignableModifier.h:19
MTDGeometry.h
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
MTDDigiGeometryRecord.h
MTDTimeCalibRecord
Definition: MTDTimeCalibRecord.h:11
cc
MakerMacros.h
MTDTimeCalibESProducer::produce
std::unique_ptr< MTDTimeCalib > produce(const MTDTimeCalibRecord &)
Definition: MTDTimeCalibESProducer.cc:55
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MTDTimeCalibESProducer
Definition: MTDTimeCalibESProducer.cc:22
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:109
MTDTimeCalibESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: MTDTimeCalibESProducer.cc:45
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ModuleDef.h
MTDTimeCalibESProducer::pset_
edm::ParameterSet pset_
Definition: MTDTimeCalibESProducer.cc:34
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord >
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
MTDTopologyRcd.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
MTDTimeCalibESProducer::topoToken_
edm::ESGetToken< MTDTopology, MTDTopologyRcd > topoToken_
Definition: MTDTimeCalibESProducer.cc:33
MTDTimeCalibESProducer::ddToken_
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > ddToken_
Definition: MTDTimeCalibESProducer.cc:32
EventSetup.h
MTDTimeCalibRecord.h
edm::ESProducer
Definition: ESProducer.h:104
ParameterSet.h
MTDTopology.h