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 
17 // user include files
23 
25 
27 
30 
31 #include <iostream>
32 
33 using namespace reco;
34 
36  algo_(iConfig,consumesCollector()),
37  token_( produces<ElectronCollection>() )
38 {
39  consumes<TrackCollection>(iConfig.getParameter<edm::InputTag>("TrackProducer"));
40  consumes<GsfTrackCollection>(iConfig.getParameter<edm::InputTag>("GsfTrackProducer"));
41  consumes<BeamSpot>(iConfig.getParameter<edm::InputTag>("BSProducer"));
42 }
43 
44 
46 
48  desc.add<edm::InputTag>(("TrackProducer"), edm::InputTag("hltEleAnyWP80CleanMergedTracks"));
49  desc.add<edm::InputTag>(("GsfTrackProducer"), edm::InputTag(""));
50  desc.add<bool>(("UseGsfTracks"), false);
51  desc.add<edm::InputTag>(("BSProducer"), edm::InputTag("hltOnlineBeamSpot"));
52  descriptions.add(("hltEgammaHLTPixelMatchElectronProducers"), desc);
53 }
54 
55 // ------------ method called to produce the data ------------
57  // Update the algorithm conditions
58  algo_.setupES(iSetup);
59 
60  // Create the output collections
61  ElectronCollection outEle;
62 
63  // invoke algorithm
64  algo_.run(e,outEle);
65 
66  // put result into the Event
67  e.emplace(token_,std::move(outEle));
68 }
69 
70 
T getParameter(std::string const &) const
EgammaHLTPixelMatchElectronProducers(const edm::ParameterSet &conf)
const edm::EDPutTokenT< reco::ElectronCollection > token_
void run(edm::Event &, reco::ElectronCollection &)
void setupES(const edm::EventSetup &setup)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< Electron > ElectronCollection
collectin of Electron objects
Definition: ElectronFwd.h:9
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
Definition: Event.h:413
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