RecoPixelVertexing
PixelTrackFitting
plugins
PixelNtupletsFitterProducer.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/ESHandle.h
"
2
#include "
FWCore/Framework/interface/Event.h
"
3
#include "
FWCore/Framework/interface/EventSetup.h
"
4
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
5
#include "
FWCore/Framework/interface/MakerMacros.h
"
6
#include "
FWCore/Framework/interface/global/EDProducer.h
"
7
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
8
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
9
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
10
#include "
MagneticField/Engine/interface/MagneticField.h
"
11
#include "
MagneticField/Records/interface/IdealMagneticFieldRecord.h
"
12
#include "
RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h
"
13
#include "
RecoPixelVertexing/PixelTrackFitting/interface/PixelNtupletsFitter.h
"
14
#include "
RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h
"
15
16
class
PixelNtupletsFitterProducer
:
public
edm::global::EDProducer
<> {
17
public
:
18
explicit
PixelNtupletsFitterProducer
(
const
edm::ParameterSet
& iConfig)
19
:
useRiemannFit_
(iConfig.getParameter<
bool
>(
"useRiemannFit"
)),
idealMagneticFieldToken_
(
esConsumes
()) {
20
produces<PixelFitter>();
21
}
22
~PixelNtupletsFitterProducer
()
override
{}
23
24
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
25
edm::ParameterSetDescription
desc
;
26
desc
.add<
bool
>(
"useRiemannFit"
,
false
)->setComment(
"true for Riemann, false for BrokenLine"
);
27
descriptions.
add
(
"pixelNtupletsFitterDefault"
,
desc
);
28
}
29
30
private
:
31
bool
useRiemannFit_
;
32
const
edm::ESGetToken<MagneticField, IdealMagneticFieldRecord>
idealMagneticFieldToken_
;
33
void
produce
(
edm::StreamID
,
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
const override
;
34
};
35
36
void
PixelNtupletsFitterProducer::produce
(
edm::StreamID
,
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
const
{
37
auto
const
& idealField = iSetup.
getData
(
idealMagneticFieldToken_
);
38
float
bField
= 1 /
PixelRecoUtilities::fieldInInvGev
(iSetup);
39
auto
impl
= std::make_unique<PixelNtupletsFitter>(
bField
, &idealField,
useRiemannFit_
);
40
auto
prod
= std::make_unique<PixelFitter>(
std::move
(
impl
));
41
iEvent
.put(
std::move
(
prod
));
42
}
43
44
DEFINE_FWK_MODULE
(
PixelNtupletsFitterProducer
);
ConfigurationDescriptions.h
edm::StreamID
Definition:
StreamID.h:30
electrons_cff.bool
bool
Definition:
electrons_cff.py:366
PixelRecoUtilities::fieldInInvGev
float fieldInInvGev(const edm::EventSetup &iSetup)
Definition:
PixelRecoUtilities.h:25
PixelNtupletsFitterProducer::PixelNtupletsFitterProducer
PixelNtupletsFitterProducer(const edm::ParameterSet &iConfig)
Definition:
PixelNtupletsFitterProducer.cc:18
ESHandle.h
PixelNtupletsFitterProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
PixelNtupletsFitterProducer.cc:24
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
PixelNtupletsFitterProducer::produce
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
Definition:
PixelNtupletsFitterProducer.cc:36
PixelNtupletsFitterProducer::idealMagneticFieldToken_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > idealMagneticFieldToken_
Definition:
PixelNtupletsFitterProducer.cc:32
PixelNtupletsFitterProducer
Definition:
PixelNtupletsFitterProducer.cc:16
MakerMacros.h
PixelFitter.h
PixelNtupletsFitterProducer::~PixelNtupletsFitterProducer
~PixelNtupletsFitterProducer() override
Definition:
PixelNtupletsFitterProducer.cc:22
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
dumpMFGeometry_cfg.prod
prod
Definition:
dumpMFGeometry_cfg.py:24
IdealMagneticFieldRecord.h
PixelRecoUtilities.h
ParameterSetDescription.h
edm::global::EDProducer
Definition:
EDProducer.h:32
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
PixelNtupletsFitterProducer::useRiemannFit_
bool useRiemannFit_
Definition:
PixelNtupletsFitterProducer.cc:31
MagneticField.h
edm::EventSetup
Definition:
EventSetup.h:58
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord >
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition:
EventSetup.h:127
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
impl
Definition:
trackAlgoPriorityOrder.h:18
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Calorimetry_cff.bField
bField
Definition:
Calorimetry_cff.py:284
Frameworkfwd.h
PixelNtupletsFitter.h
EventSetup.h
edm::EDConsumerBase::esConsumes
auto esConsumes()
Definition:
EDConsumerBase.h:206
ParameterSet.h
EDProducer.h
edm::Event
Definition:
Event.h:73
Generated for CMSSW Reference Manual by
1.8.16