TrackingTools
GsfTracking
plugins
GsfTrajectorySmootherESProducer.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
7
#include "
TrackingTools/Records/interface/TrackingComponentsRecord.h
"
8
#include "
TrackingTools/TrackFitters/interface/TrajectoryFitterRecord.h
"
9
#include "
TrackingTools/PatternTools/interface/TrajectorySmoother.h
"
10
11
#include "
TrackingTools/GeomPropagators/interface/AnalyticalPropagator.h
"
12
#include "
TrackingTools/GsfTracking/interface/GsfMaterialEffectsUpdator.h
"
13
#include "
TrackingTools/GsfTracking/interface/GsfPropagatorWithMaterial.h
"
14
#include "
TrackingTools/GsfTracking/interface/GsfMultiStateUpdator.h
"
15
#include "
TrackingTools/GsfTools/interface/MultiGaussianStateMerger.h
"
16
#include "
TrackingTools/GsfTools/interface/CloseComponentsMerger.h
"
17
#include "
TrackingTools/GsfTracking/interface/MultiTrajectoryStateMerger.h
"
18
#include "
TrackingTools/GsfTracking/interface/GsfChi2MeasurementEstimator.h
"
19
#include "
TrackingTools/GsfTracking/interface/GsfTrajectorySmoother.h
"
20
21
#include <string>
22
#include <memory>
23
26
class
GsfTrajectorySmootherESProducer
:
public
edm::ESProducer
{
27
public
:
28
GsfTrajectorySmootherESProducer
(
const
edm::ParameterSet
&
p
);
29
30
std::unique_ptr<TrajectorySmoother>
produce
(
const
TrajectoryFitterRecord
&);
31
32
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
33
34
private
:
35
edm::ESGetToken<GsfMaterialEffectsUpdator, TrackingComponentsRecord>
matToken_
;
36
edm::ESGetToken<Propagator, TrackingComponentsRecord>
propagatorToken_
;
37
edm::ESGetToken<MultiGaussianStateMerger<5>
,
TrackingComponentsRecord
>
mergerToken_
;
38
edm::ESGetToken<DetLayerGeometry, RecoGeometryRecord>
geoToken_
;
39
const
double
scale_
;
40
};
41
42
GsfTrajectorySmootherESProducer::GsfTrajectorySmootherESProducer
(
const
edm::ParameterSet
&
p
)
43
: scale_(
p
.getParameter<double>(
"ErrorRescaling"
)) {
44
std::string
myname =
p
.getParameter<
std::string
>(
"ComponentName"
);
45
setWhatProduced
(
this
, myname)
46
.setConsumes(
matToken_
,
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"MaterialEffectsUpdator"
)))
47
.setConsumes(
propagatorToken_
,
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"GeometricalPropagator"
)))
48
.setConsumes(
mergerToken_
,
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"Merger"
)))
49
.setConsumes(
geoToken_
,
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"RecoGeometry"
)));
50
}
51
52
std::unique_ptr<TrajectorySmoother>
GsfTrajectorySmootherESProducer::produce
(
const
TrajectoryFitterRecord
& iRecord) {
53
//
54
// propagator
55
//
56
GsfPropagatorWithMaterial
propagator
(iRecord.
get
(
propagatorToken_
), iRecord.
get
(
matToken_
));
57
//
58
// merger
59
//
60
MultiTrajectoryStateMerger
merger(iRecord.
get
(
mergerToken_
));
61
//
62
// estimator
63
//
64
// double chi2Cut = pset_.getParameter<double>("ChiSquarCut");
65
double
chi2Cut
(100.);
66
GsfChi2MeasurementEstimator
estimator
(
chi2Cut
);
67
//
68
// geometry
69
// create algorithm
70
//
71
// bool matBefUpd = pset_.getParameter<bool>("MaterialBeforeUpdate");
72
return
std::make_unique<GsfTrajectorySmoother>(
73
propagator
,
74
GsfMultiStateUpdator
(),
75
estimator
,
76
merger,
77
// matBefUpd,
78
scale_
,
79
true
,
//BM should this be taken from parameterSet?
80
&iRecord.
get
(
geoToken_
));
81
}
82
83
void
GsfTrajectorySmootherESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
84
edm::ParameterSetDescription
desc;
85
desc.
add
<
std::string
>(
"ComponentName"
);
86
desc.
add
<
std::string
>(
"MaterialEffectsUpdator"
);
87
desc.
add
<
std::string
>(
"GeometricalPropagator"
);
88
desc.
add
<
std::string
>(
"Merger"
);
89
desc.
add
<
std::string
>(
"RecoGeometry"
);
90
desc.
add
<
double
>(
"ErrorRescaling"
);
91
92
descriptions.
addDefault
(desc);
93
}
94
DEFINE_FWK_EVENTSETUP_MODULE
(
GsfTrajectorySmootherESProducer
);
ZMuMuCategoriesSequences_cff.chi2Cut
chi2Cut
Definition:
ZMuMuCategoriesSequences_cff.py:141
edm::ESInputTag
Definition:
ESInputTag.h:87
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition:
ParameterSetDescription.h:95
ESHandle.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:138
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
ESProducer.h
GsfTrajectorySmootherESProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
GsfTrajectorySmootherESProducer.cc:83
GsfPropagatorWithMaterial.h
GsfTrajectorySmootherESProducer::propagatorToken_
edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
Definition:
GsfTrajectorySmootherESProducer.cc:36
PVValHelper::estimator
estimator
Definition:
PVValidationHelpers.h:44
TrackCandidateProducer_cfi.propagator
propagator
Definition:
TrackCandidateProducer_cfi.py:17
GsfTrajectorySmootherESProducer::produce
std::unique_ptr< TrajectorySmoother > produce(const TrajectoryFitterRecord &)
Definition:
GsfTrajectorySmootherESProducer.cc:52
TrajectoryFitterRecord
Definition:
TrajectoryFitterRecord.h:12
TrajectoryFitterRecord.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition:
DependentRecordImplementation.h:112
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:36
GsfTrajectorySmootherESProducer::scale_
const double scale_
Definition:
GsfTrajectorySmootherESProducer.cc:39
GsfTrajectorySmoother.h
MultiTrajectoryStateMerger.h
GsfTrajectorySmootherESProducer::mergerToken_
edm::ESGetToken< MultiGaussianStateMerger< 5 >, TrackingComponentsRecord > mergerToken_
Definition:
GsfTrajectorySmootherESProducer.cc:37
GsfTrajectorySmootherESProducer::matToken_
edm::ESGetToken< GsfMaterialEffectsUpdator, TrackingComponentsRecord > matToken_
Definition:
GsfTrajectorySmootherESProducer.cc:35
AnalyticalPropagator.h
TrajectorySmoother.h
CloseComponentsMerger.h
edm::ESGetToken< GsfMaterialEffectsUpdator, TrackingComponentsRecord >
GsfTrajectorySmootherESProducer::geoToken_
edm::ESGetToken< DetLayerGeometry, RecoGeometryRecord > geoToken_
Definition:
GsfTrajectorySmootherESProducer.cc:38
ModuleFactory.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
GsfTrajectorySmootherESProducer::GsfTrajectorySmootherESProducer
GsfTrajectorySmootherESProducer(const edm::ParameterSet &p)
Definition:
GsfTrajectorySmootherESProducer.cc:42
TrackingComponentsRecord.h
GsfMultiStateUpdator.h
EventSetup.h
edm::ESProducer
Definition:
ESProducer.h:101
GsfMaterialEffectsUpdator.h
ParameterSet.h
GsfPropagatorWithMaterial
Definition:
GsfPropagatorWithMaterial.h:23
GsfTrajectorySmootherESProducer
Definition:
GsfTrajectorySmootherESProducer.cc:26
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:99
MultiTrajectoryStateMerger
Definition:
MultiTrajectoryStateMerger.h:13
GsfChi2MeasurementEstimator.h
TrackingComponentsRecord
Definition:
TrackingComponentsRecord.h:12
Generated for CMSSW Reference Manual by
1.8.16