RecoPixelVertexing
PixelLowPtUtilities
plugins
TrackFitterProducer.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/PixelLowPtUtilities/interface/TrackFitter.h
"
15
16
#include "
Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h
"
17
#include "
Geometry/Records/interface/TrackerDigiGeometryRecord.h
"
18
#include "
MagneticField/Engine/interface/MagneticField.h
"
19
#include "
MagneticField/Records/interface/IdealMagneticFieldRecord.h
"
20
#include "
TrackingTools/Records/interface/TransientRecHitRecord.h
"
21
#include "
TrackingTools/Records/interface/TrackingComponentsRecord.h
"
22
23
class
TrackFitterProducer
:
public
edm::global::EDProducer
<> {
24
public
:
25
explicit
TrackFitterProducer
(
const
edm::ParameterSet
& iConfig);
26
~TrackFitterProducer
()
override
{}
27
28
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
29
30
private
:
31
void
produce
(
edm::StreamID
,
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
const override
;
32
33
std::string
theTTRHBuilderName
;
34
edm::EDGetTokenT<reco::BeamSpot>
theBeamSpotToken
;
35
};
36
37
TrackFitterProducer::TrackFitterProducer
(
const
edm::ParameterSet
& iConfig)
38
: theTTRHBuilderName(iConfig.getParameter<
std
::
string
>(
"TTRHBuilder"
)) {
39
produces<PixelFitter>();
40
}
41
42
void
TrackFitterProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
43
edm::ParameterSetDescription
desc;
44
45
desc.
add
<
std::string
>(
"TTRHBuilder"
,
""
);
46
47
descriptions.
add
(
"trackFitter"
, desc);
48
}
49
50
void
TrackFitterProducer::produce
(
edm::StreamID
,
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup)
const
{
51
edm::ESHandle<TrackerGeometry>
trackerESH;
52
iSetup.
get
<
TrackerDigiGeometryRecord
>().
get
(trackerESH);
53
54
edm::ESHandle<MagneticField>
fieldESH;
55
iSetup.
get
<
IdealMagneticFieldRecord
>().
get
(fieldESH);
56
57
edm::ESHandle<TransientTrackingRecHitBuilder>
ttrhbESH;
58
iSetup.
get
<
TransientRecHitRecord
>().
get
(
theTTRHBuilderName
, ttrhbESH);
59
60
auto
impl
= std::make_unique<TrackFitter>(trackerESH.
product
(), fieldESH.
product
(), ttrhbESH.
product
());
61
auto
prod
= std::make_unique<PixelFitter>(
std::move
(
impl
));
62
iEvent
.put(
std::move
(
prod
));
63
}
64
65
DEFINE_FWK_MODULE
(
TrackFitterProducer
);
ConfigurationDescriptions.h
edm::ESHandle::product
T const * product() const
Definition:
ESHandle.h:86
edm::StreamID
Definition:
StreamID.h:30
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition:
ParameterSetDescription.h:95
TrackerGeometry.h
ESHandle.h
edm::EDGetTokenT< reco::BeamSpot >
TransientRecHitRecord.h
TrackFitter.h
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
TransientRecHitRecord
Definition:
TransientRecHitRecord.h:14
TrackFitterProducer::TrackFitterProducer
TrackFitterProducer(const edm::ParameterSet &iConfig)
Definition:
TrackFitterProducer.cc:37
IdealMagneticFieldRecord
Definition:
IdealMagneticFieldRecord.h:11
MakerMacros.h
PixelFitter.h
edm::EventSetup::get
T get() const
Definition:
EventSetup.h:73
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
TrackerDigiGeometryRecord
Definition:
TrackerDigiGeometryRecord.h:15
dumpMFGeometry_cfg.prod
prod
Definition:
dumpMFGeometry_cfg.py:24
IdealMagneticFieldRecord.h
edm::ESHandle< TrackerGeometry >
ParameterSetDescription.h
edm::global::EDProducer
Definition:
EDProducer.h:32
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
TrackFitterProducer::theBeamSpotToken
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotToken
Definition:
TrackFitterProducer.cc:34
TrackFitterProducer
Definition:
TrackFitterProducer.cc:23
TrackerDigiGeometryRecord.h
edm::ParameterSet
Definition:
ParameterSet.h:36
Event.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
TrackFitterProducer::theTTRHBuilderName
std::string theTTRHBuilderName
Definition:
TrackFitterProducer.cc:33
MagneticField.h
edm::EventSetup
Definition:
EventSetup.h:57
get
#define get
TrackFitterProducer::produce
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
Definition:
TrackFitterProducer.cc:50
TrackFitterProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
TrackFitterProducer.cc:42
impl
Definition:
trackAlgoPriorityOrder.h:18
eostools.move
def move(src, dest)
Definition:
eostools.py:511
std
Definition:
JetResolutionObject.h:76
Frameworkfwd.h
TrackingComponentsRecord.h
EventSetup.h
ParameterSet.h
EDProducer.h
edm::Event
Definition:
Event.h:73
TrackFitterProducer::~TrackFitterProducer
~TrackFitterProducer() override
Definition:
TrackFitterProducer.cc:26
Generated for CMSSW Reference Manual by
1.8.16