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
auto
cc
=
setWhatProduced
(
this
, myname);
46
matToken_
=
cc
.consumes(
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"MaterialEffectsUpdator"
)));
47
propagatorToken_
=
cc
.consumes(
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"GeometricalPropagator"
)));
48
mergerToken_
=
cc
.consumes(
edm::ESInputTag
(
""
,
p
.getParameter<
std::string
>(
"Merger"
)));
49
geoToken_
=
cc
.consumes(
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
);
edm::ESInputTag
Definition:
ESInputTag.h:87
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:163
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:45
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:109
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
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
cc
CloseComponentsMerger.h
edm::ESGetToken< GsfMaterialEffectsUpdator, TrackingComponentsRecord >
GsfTrajectorySmootherESProducer::geoToken_
edm::ESGetToken< DetLayerGeometry, RecoGeometryRecord > geoToken_
Definition:
GsfTrajectorySmootherESProducer.cc:38
ModuleFactory.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
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
PixelTripletNoTipGenerator_cfi.chi2Cut
chi2Cut
Definition:
PixelTripletNoTipGenerator_cfi.py:10
edm::ESProducer
Definition:
ESProducer.h:104
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