RecoEgamma
EgammaHLTProducers
plugins
EgammaHLTPixelMatchElectronProducers.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: EgammaHLTProducers
4
// Class: EgammaHLTPixelMatchElectronProducers
5
//
11
//
12
// Original Author: Monica Vazquez Acosta (CERN)
13
// $Id: EgammaHLTPixelMatchElectronProducers.cc,v 1.3 2009/01/28 17:07:00 ghezzi Exp $
14
//
15
//
16
17
#include "
FWCore/Framework/interface/MakerMacros.h
"
18
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
19
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
20
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
21
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
22
#include "
DataFormats/EgammaCandidates/interface/ElectronFwd.h
"
23
#include "
DataFormats/EgammaCandidates/interface/Electron.h
"
24
#include "
FWCore/Framework/interface/stream/EDProducer.h
"
25
#include "
FWCore/Framework/interface/Event.h
"
26
#include "
DataFormats/Common/interface/Handle.h
"
27
#include "
FWCore/Framework/interface/EventSetup.h
"
28
#include "
FWCore/Utilities/interface/EDPutToken.h
"
29
#include "
DataFormats/EgammaCandidates/interface/ElectronFwd.h
"
30
31
#include <iostream>
32
#include <string>
33
#include <memory>
34
35
#include "
EgammaHLTPixelMatchElectronAlgo.h
"
36
37
class
EgammaHLTPixelMatchElectronProducers
:
public
edm::stream::EDProducer
<> {
38
public
:
39
explicit
EgammaHLTPixelMatchElectronProducers
(
const
edm::ParameterSet
& conf);
40
41
void
produce
(
edm::Event
&
e
,
const
edm::EventSetup
&
c
)
override
;
42
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
43
44
private
:
45
EgammaHLTPixelMatchElectronAlgo
algo_
;
46
const
edm::EDPutTokenT<reco::ElectronCollection>
token_
;
47
};
48
49
using namespace
reco
;
50
51
EgammaHLTPixelMatchElectronProducers::EgammaHLTPixelMatchElectronProducers
(
const
edm::ParameterSet
& iConfig)
52
: algo_(iConfig, consumesCollector()), token_(produces<
ElectronCollection
>()) {
53
consumes<TrackCollection>(iConfig.
getParameter
<
edm::InputTag
>(
"TrackProducer"
));
54
consumes<GsfTrackCollection>(iConfig.
getParameter
<
edm::InputTag
>(
"GsfTrackProducer"
));
55
consumes<BeamSpot>(iConfig.
getParameter
<
edm::InputTag
>(
"BSProducer"
));
56
}
57
58
void
EgammaHLTPixelMatchElectronProducers::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
59
edm::ParameterSetDescription
desc
;
60
desc
.add<
edm::InputTag
>((
"TrackProducer"
),
edm::InputTag
(
"hltEleAnyWP80CleanMergedTracks"
));
61
desc
.add<
edm::InputTag
>((
"GsfTrackProducer"
),
edm::InputTag
(
""
));
62
desc
.add<
bool
>((
"UseGsfTracks"
),
false
);
63
desc
.add<
edm::InputTag
>((
"BSProducer"
),
edm::InputTag
(
"hltOnlineBeamSpot"
));
64
descriptions.
add
((
"hltEgammaHLTPixelMatchElectronProducers"
),
desc
);
65
}
66
67
// ------------ method called to produce the data ------------
68
void
EgammaHLTPixelMatchElectronProducers::produce
(
edm::Event
&
e
,
const
edm::EventSetup
& iSetup) {
69
// Update the algorithm conditions
70
algo_
.
setupES
(iSetup);
71
72
// Create the output collections
73
ElectronCollection
outEle;
74
75
// invoke algorithm
76
algo_
.
run
(
e
, outEle);
77
78
// put result into the Event
79
e
.emplace(
token_
,
std::move
(outEle));
80
}
81
82
#include "
FWCore/Framework/interface/MakerMacros.h
"
83
DEFINE_FWK_MODULE
(
EgammaHLTPixelMatchElectronProducers
);
ConfigurationDescriptions.h
Handle.h
EgammaHLTPixelMatchElectronAlgo.h
MessageLogger.h
edm::EDPutTokenT< reco::ElectronCollection >
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
EDProducer.h
EgammaHLTPixelMatchElectronProducers::produce
void produce(edm::Event &e, const edm::EventSetup &c) override
Definition:
EgammaHLTPixelMatchElectronProducers.cc:68
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:46
EgammaHLTPixelMatchElectronAlgo::setupES
void setupES(const edm::EventSetup &setup)
Definition:
EgammaHLTPixelMatchElectronAlgo.cc:54
EgammaHLTPixelMatchElectronProducers
Definition:
EgammaHLTPixelMatchElectronProducers.cc:37
MakerMacros.h
EgammaHLTPixelMatchElectronAlgo
Definition:
EgammaHLTPixelMatchElectronAlgo.h:36
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
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
ElectronFwd.h
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
EDPutToken.h
EgammaHLTPixelMatchElectronProducers::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
EgammaHLTPixelMatchElectronProducers.cc:58
EgammaHLTPixelMatchElectronProducers::token_
const edm::EDPutTokenT< reco::ElectronCollection > token_
Definition:
EgammaHLTPixelMatchElectronProducers.cc:46
edm::stream::EDProducer
Definition:
EDProducer.h:36
edm::EventSetup
Definition:
EventSetup.h:58
reco::ElectronCollection
std::vector< Electron > ElectronCollection
collectin of Electron objects
Definition:
ElectronFwd.h:9
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
Electron.h
eostools.move
def move(src, dest)
Definition:
eostools.py:511
EgammaHLTPixelMatchElectronAlgo::run
void run(edm::Event &, reco::ElectronCollection &)
Definition:
EgammaHLTPixelMatchElectronAlgo.cc:73
EgammaHLTPixelMatchElectronProducers::algo_
EgammaHLTPixelMatchElectronAlgo algo_
Definition:
EgammaHLTPixelMatchElectronProducers.cc:45
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
ParameterSet.h
c
auto & c
Definition:
CAHitNtupletGeneratorKernelsImpl.h:56
edm::Event
Definition:
Event.h:73
edm::InputTag
Definition:
InputTag.h:15
EgammaHLTPixelMatchElectronProducers::EgammaHLTPixelMatchElectronProducers
EgammaHLTPixelMatchElectronProducers(const edm::ParameterSet &conf)
Definition:
EgammaHLTPixelMatchElectronProducers.cc:51
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
Generated for CMSSW Reference Manual by
1.8.16