TrackingTools
GsfTracking
plugins
GsfTrajectoryFitterESProducer.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/ESProducer.h
"
2
#include "
FWCore/Framework/interface/EventSetup.h
"
3
#include "
FWCore/Framework/interface/ESHandle.h
"
4
#include "
FWCore/Framework/interface/ModuleFactory.h
"
5
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
6
#include "
FWCore/Utilities/interface/ESGetToken.h
"
7
8
#include "
TrackingTools/Records/interface/TrackingComponentsRecord.h
"
9
#include "
TrackingTools/TrackFitters/interface/TrajectoryFitterRecord.h
"
10
#include "
TrackingTools/TrackFitters/interface/TrajectoryFitter.h
"
11
12
#include "
TrackingTools/GeomPropagators/interface/AnalyticalPropagator.h
"
13
#include "
TrackingTools/GsfTracking/interface/GsfMaterialEffectsUpdator.h
"
14
#include "
TrackingTools/GsfTracking/interface/GsfPropagatorWithMaterial.h
"
15
#include "
TrackingTools/GsfTracking/interface/GsfMultiStateUpdator.h
"
16
#include "
TrackingTools/GsfTools/interface/MultiGaussianStateMerger.h
"
17
#include "
TrackingTools/GsfTools/interface/CloseComponentsMerger.h
"
18
#include "
TrackingTools/GsfTracking/interface/MultiTrajectoryStateMerger.h
"
19
#include "
TrackingTools/GsfTracking/interface/GsfChi2MeasurementEstimator.h
"
20
#include "
TrackingTools/GsfTracking/interface/GsfTrajectoryFitter.h
"
21
22
#include <string>
23
#include <memory>
24
25
#include <iostream>
26
29
class
GsfTrajectoryFitterESProducer
:
public
edm::ESProducer
{
30
public
:
31
GsfTrajectoryFitterESProducer
(
const
edm::ParameterSet
&
p
);
32
~GsfTrajectoryFitterESProducer
()
override
;
33
std::unique_ptr<TrajectoryFitter>
produce
(
const
TrajectoryFitterRecord
&);
34
35
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
36
37
private
:
38
edm::ESGetToken<GsfMaterialEffectsUpdator, TrackingComponentsRecord>
matUpdatorToken_
;
39
edm::ESGetToken<Propagator, TrackingComponentsRecord>
propagatorToken_
;
40
edm::ESGetToken<MultiGaussianStateMerger<5>
,
TrackingComponentsRecord
>
mergerToken_
;
41
edm::ESGetToken<DetLayerGeometry, RecoGeometryRecord>
geoToken_
;
42
};
43
44
GsfTrajectoryFitterESProducer::GsfTrajectoryFitterESProducer
(
const
edm::ParameterSet
&
p
) {
45
std::string
myname =
p
.getParameter<
std::string
>(
"ComponentName"
);
46
auto
cc
=
setWhatProduced
(
this
, myname);
47
matUpdatorToken_
=
cc
.consumes(
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"MaterialEffectsUpdator"
)));
48
propagatorToken_
=
cc
.consumes(
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"GeometricalPropagator"
)));
49
mergerToken_
=
cc
.consumes(
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"Merger"
)));
50
geoToken_
=
cc
.consumes(
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"RecoGeometry"
)));
51
}
52
53
GsfTrajectoryFitterESProducer::~GsfTrajectoryFitterESProducer
() {}
54
55
std::unique_ptr<TrajectoryFitter>
GsfTrajectoryFitterESProducer::produce
(
const
TrajectoryFitterRecord
& iRecord) {
56
//
57
// propagator
58
//
59
GsfPropagatorWithMaterial
propagator
(iRecord.
get
(
propagatorToken_
), iRecord.
get
(
matUpdatorToken_
));
60
//
61
// merger
62
//
63
MultiTrajectoryStateMerger
merger(iRecord.
get
(
mergerToken_
));
64
//
65
// estimator
66
//
67
// double chi2Cut = pset_.getParameter<double>("ChiSquarCut");
68
double
chi2Cut
(100.);
69
GsfChi2MeasurementEstimator
estimator
(
chi2Cut
);
70
71
//
72
// create algorithm
73
//
74
return
std::make_unique<GsfTrajectoryFitter>(
75
propagator
,
GsfMultiStateUpdator
(),
estimator
, merger, &iRecord.
get
(
geoToken_
));
76
}
77
78
void
GsfTrajectoryFitterESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
79
edm::ParameterSetDescription
desc
;
80
desc
.add<
std::string
>(
"ComponentName"
);
81
desc
.add<
std::string
>(
"MaterialEffectsUpdator"
);
82
desc
.add<
std::string
>(
"GeometricalPropagator"
);
83
desc
.add<
std::string
>(
"Merger"
);
84
desc
.add<
std::string
>(
"RecoGeometry"
);
85
descriptions.
addDefault
(
desc
);
86
}
87
88
DEFINE_FWK_EVENTSETUP_MODULE
(
GsfTrajectoryFitterESProducer
);
GsfTrajectoryFitterESProducer::produce
std::unique_ptr< TrajectoryFitter > produce(const TrajectoryFitterRecord &)
Definition:
GsfTrajectoryFitterESProducer.cc:55
edm::ESInputTag
Definition:
ESInputTag.h:87
ESHandle.h
GsfTrajectoryFitter.h
MultiGaussianStateMerger.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
GsfMultiStateUpdator
Definition:
GsfMultiStateUpdator.h:16
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition:
ESProducer.h:163
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
GsfTrajectoryFitterESProducer
Definition:
GsfTrajectoryFitterESProducer.cc:29
GsfPropagatorWithMaterial.h
GsfTrajectoryFitterESProducer::matUpdatorToken_
edm::ESGetToken< GsfMaterialEffectsUpdator, TrackingComponentsRecord > matUpdatorToken_
Definition:
GsfTrajectoryFitterESProducer.cc:38
ESGetToken.h
PVValHelper::estimator
estimator
Definition:
PVValidationHelpers.h:45
TrackCandidateProducer_cfi.propagator
propagator
Definition:
TrackCandidateProducer_cfi.py:17
GsfTrajectoryFitterESProducer::mergerToken_
edm::ESGetToken< MultiGaussianStateMerger< 5 >, TrackingComponentsRecord > mergerToken_
Definition:
GsfTrajectoryFitterESProducer.cc:40
TrajectoryFitterRecord
Definition:
TrajectoryFitterRecord.h:12
TrajectoryFitter.h
TrajectoryFitterRecord.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:109
GsfTrajectoryFitterESProducer::GsfTrajectoryFitterESProducer
GsfTrajectoryFitterESProducer(const edm::ParameterSet &p)
Definition:
GsfTrajectoryFitterESProducer.cc:44
GsfChi2MeasurementEstimator
Definition:
GsfChi2MeasurementEstimator.h:15
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:47
MultiTrajectoryStateMerger.h
AnalyticalPropagator.h
cc
CloseComponentsMerger.h
edm::ESGetToken< GsfMaterialEffectsUpdator, 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
GsfMultiStateUpdator.h
EventSetup.h
PixelTripletNoTipGenerator_cfi.chi2Cut
chi2Cut
Definition:
PixelTripletNoTipGenerator_cfi.py:10
GsfTrajectoryFitterESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
GsfTrajectoryFitterESProducer.cc:78
edm::ESProducer
Definition:
ESProducer.h:104
GsfMaterialEffectsUpdator.h
GsfTrajectoryFitterESProducer::~GsfTrajectoryFitterESProducer
~GsfTrajectoryFitterESProducer() override
Definition:
GsfTrajectoryFitterESProducer.cc:53
ParameterSet.h
GsfPropagatorWithMaterial
Definition:
GsfPropagatorWithMaterial.h:23
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:99
GsfTrajectoryFitterESProducer::propagatorToken_
edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
Definition:
GsfTrajectoryFitterESProducer.cc:39
MultiTrajectoryStateMerger
Definition:
MultiTrajectoryStateMerger.h:13
GsfTrajectoryFitterESProducer::geoToken_
edm::ESGetToken< DetLayerGeometry, RecoGeometryRecord > geoToken_
Definition:
GsfTrajectoryFitterESProducer.cc:41
GsfChi2MeasurementEstimator.h
TrackingComponentsRecord
Definition:
TrackingComponentsRecord.h:12
Generated for CMSSW Reference Manual by
1.8.16