RecoLocalFastTime
FTLRecProducers
plugins
MTDTimeCalibESProducer.cc
Go to the documentation of this file.
1
#include "
RecoLocalFastTime/Records/interface/MTDTimeCalibRecord.h
"
2
3
#include "
Geometry/Records/interface/MTDDigiGeometryRecord.h
"
4
#include "
Geometry/Records/interface/MTDTopologyRcd.h
"
5
6
#include "
Geometry/MTDGeometryBuilder/interface/MTDGeometry.h
"
7
#include "
Geometry/MTDNumberingBuilder/interface/MTDTopology.h
"
8
9
#include "
RecoLocalFastTime/FTLCommonAlgos/interface/MTDTimeCalib.h
"
10
11
#include "
FWCore/Framework/interface/EventSetup.h
"
12
#include "
FWCore/Framework/interface/ESHandle.h
"
13
#include "
FWCore/Framework/interface/ModuleFactory.h
"
14
#include "
FWCore/Framework/interface/ESProducer.h
"
15
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
16
17
#include <string>
18
#include <memory>
19
20
using namespace
edm
;
21
22
class
MTDTimeCalibESProducer
:
public
edm::ESProducer
{
23
public
:
24
MTDTimeCalibESProducer
(
const
edm::ParameterSet
&
p
);
25
~
MTDTimeCalibESProducer
()
override
=
default
;
26
27
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
28
29
std::unique_ptr<MTDTimeCalib> produce(
const
MTDTimeCalibRecord
&);
30
31
private
:
32
edm::ESGetToken<MTDGeometry, MTDDigiGeometryRecord>
ddToken_
;
33
edm::ESGetToken<MTDTopology, MTDTopologyRcd>
topoToken_
;
34
edm::ParameterSet
pset_
;
35
};
36
37
MTDTimeCalibESProducer::MTDTimeCalibESProducer
(
const
edm::ParameterSet
&
p
) {
38
pset_ =
p
;
39
setWhatProduced(
this
,
"MTDTimeCalib"
).setConsumes(ddToken_).setConsumes(topoToken_);
40
}
41
42
// Configuration descriptions
43
void
MTDTimeCalibESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
44
edm::ParameterSetDescription
desc;
45
desc.
add
<
double
>(
"BTLTimeOffset"
, 0.)->
setComment
(
"Time offset (additive) to all the BTL RecHits [ns]"
);
46
desc.
add
<
double
>(
"ETLTimeOffset"
, 0.)->
setComment
(
"Time offset (additive) to all the ETL RecHits [ns]"
);
47
desc.
add
<
double
>(
"BTLLightCollTime"
, 0.2)->
setComment
(
"Light collection time for BTL tile geometry [ns]"
);
48
desc.
add
<
double
>(
"BTLLightCollSlope"
, 0.075)
49
->
setComment
(
"Light collection slope for bar for BTL bar tile geometry [ns/cm]"
);
50
descriptions.
add
(
"MTDTimeCalibESProducer"
, desc);
51
}
52
53
std::unique_ptr<MTDTimeCalib>
MTDTimeCalibESProducer::produce
(
const
MTDTimeCalibRecord
& iRecord) {
54
return
std::make_unique<MTDTimeCalib>(pset_, &iRecord.
get
(ddToken_), &iRecord.
get
(topoToken_));
55
}
56
57
#include "
FWCore/PluginManager/interface/ModuleDef.h
"
58
#include "
FWCore/Framework/interface/MakerMacros.h
"
59
60
DEFINE_FWK_EVENTSETUP_MODULE
(
MTDTimeCalibESProducer
);
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition:
ParameterSetDescription.h:95
MTDTimeCalib.h
ESHandle.h
MTDTimeCalibESProducer::MTDTimeCalibESProducer
MTDTimeCalibESProducer(const edm::ParameterSet &p)
Definition:
MTDTimeCalibESProducer.cc:37
edm
HLT enums.
Definition:
AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
MTDGeometry.h
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
MTDDigiGeometryRecord.h
MTDTimeCalibRecord
Definition:
MTDTimeCalibRecord.h:11
MakerMacros.h
MTDTimeCalibESProducer::produce
std::unique_ptr< MTDTimeCalib > produce(const MTDTimeCalibRecord &)
Definition:
MTDTimeCalibESProducer.cc:53
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:112
MTDTimeCalibESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
MTDTimeCalibESProducer.cc:43
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleDef.h
MTDTimeCalibESProducer::pset_
edm::ParameterSet pset_
Definition:
MTDTimeCalibESProducer.cc:34
MTDTimeCalibESProducer_cfi.MTDTimeCalibESProducer
MTDTimeCalibESProducer
Definition:
MTDTimeCalibESProducer_cfi.py:3
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord >
ModuleFactory.h
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:101
ParameterSet.h
edm::ParameterDescriptionNode::setComment
void setComment(std::string const &value)
Definition:
ParameterDescriptionNode.cc:106
MTDTopology.h
Generated for CMSSW Reference Manual by
1.8.16