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 {
24  public:
26  ~MTDTimeCalibESProducer() override = default;
27 
28  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
29 
30  std::unique_ptr<MTDTimeCalib> produce(const MTDTimeCalibRecord &);
31 
32  private:
34 };
35 
36 
38 {
39  pset_ = p;
40  setWhatProduced(this,"MTDTimeCalib");
41 }
42 
43 // Configuration descriptions
44 void
47  desc.add<double>("BTLTimeOffset", 0.)->
48  setComment("Time offset (additive) to all the BTL RecHits [ns]");
49  desc.add<double>("ETLTimeOffset", 0.)->
50  setComment("Time offset (additive) to all the ETL RecHits [ns]");
51  desc.add<double>("BTLLightCollTime", 0.2)->
52  setComment("Light collection time for BTL tile geometry [ns]");
53  desc.add<double>("BTLLightCollSlope", 0.075)->
54  setComment("Light collection slope for bar for BTL bar tile geometry [ns/cm]");
55  descriptions.add("MTDTimeCalibESProducer", desc);
56 }
57 
58 std::unique_ptr<MTDTimeCalib>
60 {
62  iRecord.getRecord<MTDDigiGeometryRecord>().get( pDD );
63 
65  iRecord.getRecord<MTDTopologyRcd>().get( pTopo );
66 
67  return std::make_unique<MTDTimeCalib>(
68  pset_,
69  pDD.product(),
70  pTopo.product()
71  );
72 }
73 
76 
std::unique_ptr< MTDTimeCalib > produce(const MTDTimeCalibRecord &)
MTDTimeCalibESProducer(const edm::ParameterSet &p)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HLT enums.
T const * product() const
Definition: ESHandle.h:86