TrackingTools
TrackFitters
plugins
KFTrajectoryFitterESProducer.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/ESHandle.h
"
2
#include "
FWCore/Framework/interface/ModuleFactory.h
"
3
#include "
FWCore/Framework/interface/ESProducer.h
"
4
5
#include "
TrackingTools/PatternTools/interface/TrajectoryStateUpdator.h
"
6
#include "
TrackingTools/GeomPropagators/interface/Propagator.h
"
7
#include "
TrackingTools/PatternTools/interface/TrajectoryStateUpdator.h
"
8
#include "
TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimatorBase.h
"
9
10
#include "
FWCore/Framework/interface/ESProducer.h
"
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
13
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
14
15
#include "
TrackingTools/TrackFitters/interface/TrajectoryFitterRecord.h
"
16
#include "
TrackingTools/Records/interface/TrackingComponentsRecord.h
"
17
#include "
TrackingTools/TrackFitters/interface/KFTrajectoryFitter.h
"
18
#include <memory>
19
20
namespace
{
21
22
class
KFTrajectoryFitterESProducer :
public
edm::ESProducer
{
23
public
:
24
KFTrajectoryFitterESProducer(
const
edm::ParameterSet
&
p
);
25
std::unique_ptr<TrajectoryFitter> produce(
const
TrajectoryFitterRecord
&);
26
27
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
28
edm::ParameterSetDescription
desc
;
29
desc
.add<
std::string
>(
"ComponentName"
,
"KFFitter"
);
30
desc
.add<
std::string
>(
"Propagator"
,
"PropagatorWithMaterial"
);
31
desc
.add<
std::string
>(
"Updator"
,
"KFUpdator"
);
32
desc
.add<
std::string
>(
"Estimator"
,
"Chi2"
);
33
desc
.add<
std::string
>(
"RecoGeometry"
,
"GlobalDetLayerGeometry"
);
34
desc
.add<
int
>(
"minHits"
, 3);
35
descriptions.
add
(
"KFTrajectoryFitter"
,
desc
);
36
}
37
38
private
:
39
edm::ESGetToken<Propagator, TrackingComponentsRecord>
propToken_;
40
edm::ESGetToken<TrajectoryStateUpdator, TrackingComponentsRecord>
updToken_;
41
edm::ESGetToken<Chi2MeasurementEstimatorBase, TrackingComponentsRecord>
estToken_;
42
edm::ESGetToken<DetLayerGeometry, RecoGeometryRecord>
geoToken_;
43
const
int
minHits_;
44
};
45
46
KFTrajectoryFitterESProducer::KFTrajectoryFitterESProducer(
const
edm::ParameterSet
&
p
)
47
: minHits_{
p
.getParameter<
int
>(
"minHits"
)} {
48
std::string
myname =
p
.getParameter<
std::string
>(
"ComponentName"
);
49
auto
cc
= setWhatProduced(
this
, myname);
50
propToken_ =
cc
.consumes(
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"Propagator"
)));
51
updToken_ =
cc
.consumes(
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"Updator"
)));
52
estToken_ =
cc
.consumes(
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"Estimator"
)));
53
geoToken_ =
cc
.consumes(
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"RecoGeometry"
)));
54
}
55
56
std::unique_ptr<TrajectoryFitter> KFTrajectoryFitterESProducer::produce(
const
TrajectoryFitterRecord
& iRecord) {
57
return
std::make_unique<KFTrajectoryFitter>(
58
&iRecord.
get
(propToken_), &iRecord.
get
(updToken_), &iRecord.
get
(estToken_), minHits_, &iRecord.
get
(geoToken_));
59
}
60
61
}
// namespace
62
63
#include "
FWCore/Framework/interface/ModuleFactory.h
"
64
65
DEFINE_FWK_EVENTSETUP_MODULE
(KFTrajectoryFitterESProducer);
ConfigurationDescriptions.h
Chi2MeasurementEstimatorBase.h
Propagator.h
edm::ESInputTag
Definition:
ESInputTag.h:87
ESHandle.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
TrajectoryStateUpdator.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TrajectoryFitterRecord
Definition:
TrajectoryFitterRecord.h:12
TrajectoryFitterRecord.h
ParameterSetDescription.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:103
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
cc
edm::ESGetToken< Propagator, TrackingComponentsRecord >
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
TrackingComponentsRecord.h
KFTrajectoryFitter.h
edm::ESProducer
Definition:
ESProducer.h:104
ParameterSet.h
Generated for CMSSW Reference Manual by
1.8.16