TrackingTools
KalmanUpdators
plugins
Chi2MeasurementEstimatorESProducer.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/EventSetup.h
"
2
#include "
FWCore/Framework/interface/ESHandle.h
"
3
#include "
FWCore/Framework/interface/ModuleFactory.h
"
4
#include "
FWCore/Framework/interface/ESProducer.h
"
5
6
#include "
TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimatorParams.h
"
7
8
#include "
FWCore/Framework/interface/ESProducer.h
"
9
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
10
#include "
TrackingTools/Records/interface/TrackingComponentsRecord.h
"
11
#include "
TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimator.h
"
12
#include <memory>
13
14
namespace
{
15
16
class
Chi2MeasurementEstimatorESProducer :
public
edm::ESProducer
{
17
public
:
18
Chi2MeasurementEstimatorESProducer(
const
edm::ParameterSet
&
p
);
19
20
std::unique_ptr<Chi2MeasurementEstimatorBase> produce(
const
TrackingComponentsRecord
&);
21
22
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
23
24
private
:
25
const
double
maxChi2_;
26
const
double
nSigma_;
27
const
double
maxDis_;
28
const
double
maxSag_;
29
const
double
minTol_;
30
const
double
minpt_;
31
};
32
33
Chi2MeasurementEstimatorESProducer::Chi2MeasurementEstimatorESProducer(
const
edm::ParameterSet
&
p
)
34
: maxChi2_(
p
.getParameter<double>(
"MaxChi2"
)),
35
nSigma_(
p
.getParameter<double>(
"nSigma"
)),
36
maxDis_(
p
.getParameter<double>(
"MaxDisplacement"
)),
37
maxSag_(
p
.getParameter<double>(
"MaxSagitta"
)),
38
minTol_(
p
.getParameter<double>(
"MinimalTolerance"
)),
39
minpt_(
p
.getParameter<double>(
"MinPtForHitRecoveryInGluedDet"
)) {
40
std::string
myname =
p
.getParameter<
std::string
>(
"ComponentName"
);
41
setWhatProduced(
this
, myname);
42
}
43
44
std::unique_ptr<Chi2MeasurementEstimatorBase> Chi2MeasurementEstimatorESProducer::produce(
45
const
TrackingComponentsRecord
& iRecord) {
46
return
std::make_unique<Chi2MeasurementEstimator>(maxChi2_, nSigma_, maxDis_, maxSag_, minTol_, minpt_);
47
}
48
49
void
Chi2MeasurementEstimatorESProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
50
auto
desc =
chi2MeasurementEstimatorParams::getFilledConfigurationDescription
();
51
desc.add<
std::string
>(
"ComponentName"
,
"Chi2"
);
52
descriptions.
add
(
"Chi2MeasurementEstimatorDefault"
, desc);
53
}
54
55
}
// namespace
56
57
DEFINE_FWK_EVENTSETUP_MODULE
(Chi2MeasurementEstimatorESProducer);
Chi2MeasurementEstimator.h
ESHandle.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
ESProducer.h
Chi2MeasurementEstimatorParams.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
chi2MeasurementEstimatorParams::getFilledConfigurationDescription
edm::ParameterSetDescription getFilledConfigurationDescription()
Definition:
Chi2MeasurementEstimatorParams.h:6
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:36
ModuleFactory.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition:
ModuleFactory.h:60
TrackingComponentsRecord.h
EventSetup.h
edm::ESProducer
Definition:
ESProducer.h:101
ParameterSet.h
TrackingComponentsRecord
Definition:
TrackingComponentsRecord.h:12
Generated for CMSSW Reference Manual by
1.8.16