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 
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EgammaHLTPixelMatchElectronProducers(const edm::ParameterSet &conf)
const edm::EDPutTokenT< reco::ElectronCollection > token_
void run(edm::Event &, reco::ElectronCollection &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void setupES(const edm::EventSetup &setup)
std::vector< Electron > ElectronCollection
collectin of Electron objects
Definition: ElectronFwd.h:9
void add(std::string const &label, ParameterSetDescription const &psetDescription)
fixed size matrix
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void produce(edm::Event &e, const edm::EventSetup &c) override
def move(src, dest)
Definition: eostools.py:511