RecoPixelVertexing
PixelTrackFitting
plugins
PixelFitterByHelixProjectionsProducer.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
2
#include "
FWCore/Framework/interface/global/EDProducer.h
"
3
4
#include "
FWCore/Framework/interface/Event.h
"
5
#include "
FWCore/Framework/interface/MakerMacros.h
"
6
#include "
FWCore/Framework/interface/EventSetup.h
"
7
#include "
FWCore/Framework/interface/ESHandle.h
"
8
9
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
10
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
11
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
12
13
#include "
RecoPixelVertexing/PixelTrackFitting/interface/PixelFitter.h
"
14
#include "
RecoPixelVertexing/PixelTrackFitting/interface/PixelFitterByHelixProjections.h
"
15
16
#include "
MagneticField/Engine/interface/MagneticField.h
"
17
#include "
MagneticField/Records/interface/IdealMagneticFieldRecord.h
"
18
19
class
PixelFitterByHelixProjectionsProducer
:
public
edm::global::EDProducer
<> {
20
public
:
21
explicit
PixelFitterByHelixProjectionsProducer
(
const
edm::ParameterSet
& iConfig)
22
:
thescaleErrorsForBPix1
(iConfig.getParameter<
bool
>(
"scaleErrorsForBPix1"
)),
23
thescaleFactor
(iConfig.getParameter<double>(
"scaleFactor"
)) {
24
produces<PixelFitter>();
25
}
26
~PixelFitterByHelixProjectionsProducer
()
override
{}
27
28
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
29
edm::ParameterSetDescription
desc
;
30
desc
.add<
bool
>(
"scaleErrorsForBPix1"
,
false
);
31
desc
.add<
double
>(
"scaleFactor"
, 0.65)->setComment(
"The default value was derived for phase1 pixel"
);
32
descriptions.
add
(
"pixelFitterByHelixProjectionsDefault"
,
desc
);
33
}
34
35
private
:
36
void
produce
(
edm::StreamID
,
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
const override
;
37
const
bool
thescaleErrorsForBPix1
;
38
const
float
thescaleFactor
;
39
};
40
41
void
PixelFitterByHelixProjectionsProducer::produce
(
edm::StreamID
,
42
edm::Event
&
iEvent
,
43
const
edm::EventSetup
& iSetup)
const
{
44
edm::ESHandle<MagneticField>
fieldESH;
45
iSetup.
get
<
IdealMagneticFieldRecord
>().
get
(fieldESH);
46
47
auto
impl
= std::make_unique<PixelFitterByHelixProjections>(
48
&iSetup, fieldESH.
product
(),
thescaleErrorsForBPix1
,
thescaleFactor
);
49
auto
prod
= std::make_unique<PixelFitter>(
std::move
(
impl
));
50
iEvent
.put(
std::move
(
prod
));
51
}
52
53
DEFINE_FWK_MODULE
(
PixelFitterByHelixProjectionsProducer
);
ConfigurationDescriptions.h
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
edm::StreamID
Definition:
StreamID.h:30
PixelFitterByHelixProjectionsProducer
Definition:
PixelFitterByHelixProjectionsProducer.cc:19
electrons_cff.bool
bool
Definition:
electrons_cff.py:366
PixelFitterByHelixProjectionsProducer::produce
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
Definition:
PixelFitterByHelixProjectionsProducer.cc:41
ESHandle.h
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
PixelFitterByHelixProjectionsProducer::thescaleFactor
const float thescaleFactor
Definition:
PixelFitterByHelixProjectionsProducer.cc:38
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
MakerMacros.h
PixelFitter.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:87
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
edm::ESHandle< MagneticField >
ParameterSetDescription.h
edm::global::EDProducer
Definition:
EDProducer.h:32
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
PixelFitterByHelixProjectionsProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
PixelFitterByHelixProjectionsProducer.cc:28
iEvent
int iEvent
Definition:
GenABIO.cc:224
PixelFitterByHelixProjectionsProducer::~PixelFitterByHelixProjectionsProducer
~PixelFitterByHelixProjectionsProducer() override
Definition:
PixelFitterByHelixProjectionsProducer.cc:26
MagneticField.h
edm::EventSetup
Definition:
EventSetup.h:58
get
#define get
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
impl
Definition:
trackAlgoPriorityOrder.h:18
eostools.move
def move(src, dest)
Definition:
eostools.py:511
PixelFitterByHelixProjections.h
PixelFitterByHelixProjectionsProducer::thescaleErrorsForBPix1
const bool thescaleErrorsForBPix1
Definition:
PixelFitterByHelixProjectionsProducer.cc:37
Frameworkfwd.h
EventSetup.h
ParameterSet.h
EDProducer.h
PixelFitterByHelixProjectionsProducer::PixelFitterByHelixProjectionsProducer
PixelFitterByHelixProjectionsProducer(const edm::ParameterSet &iConfig)
Definition:
PixelFitterByHelixProjectionsProducer.cc:21
edm::Event
Definition:
Event.h:73
Generated for CMSSW Reference Manual by
1.8.16