CMS 3D CMS Logo

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 
30 
31 #include <iostream>
32 #include <string>
33 #include <memory>
34 
36 
38 public:
40 
41  void produce(edm::Event& e, const edm::EventSetup& c) override;
42  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
43 
44 private:
47 };
48 
49 using namespace reco;
50 
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 
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 ------------
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 
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