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
22 
24 
26 
29 
30 #include <iostream>
31 
32 using namespace reco;
33 
35 
36  consumes<TrackCollection>(conf_.getParameter<edm::InputTag>("TrackProducer"));
37  consumes<GsfTrackCollection>(conf_.getParameter<edm::InputTag>("GsfTrackProducer"));
38  consumes<BeamSpot>(conf_.getParameter<edm::InputTag>("BSProducer"));
39 
40  //create algo
42 
43  //register your products
44  produces<ElectronCollection>();
45 }
46 
47 
49  delete algo_;
50 }
51 
53 
55  desc.add<edm::InputTag>(("TrackProducer"), edm::InputTag("hltEleAnyWP80CleanMergedTracks"));
56  desc.add<edm::InputTag>(("GsfTrackProducer"), edm::InputTag(""));
57  desc.add<bool>(("UseGsfTracks"), false);
58  desc.add<edm::InputTag>(("BSProducer"), edm::InputTag("hltOnlineBeamSpot"));
59  descriptions.add(("hltEgammaHLTPixelMatchElectronProducers"), desc);
60 }
61 
62 // ------------ method called to produce the data ------------
64  // Update the algorithm conditions
65  algo_->setupES(iSetup);
66 
67  // Create the output collections
68  auto pOutEle = std::make_unique<ElectronCollection>();
69 
70  // invoke algorithm
71  algo_->run(e,*pOutEle);
72 
73  // put result into the Event
74  e.put(std::move(pOutEle));
75 }
76 
77 
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
void produce(edm::StreamID sid, edm::Event &e, const edm::EventSetup &c) const override
EgammaHLTPixelMatchElectronProducers(const edm::ParameterSet &conf)
void run(edm::Event &, reco::ElectronCollection &)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void setupES(const edm::EventSetup &setup)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
fixed size matrix
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
def move(src, dest)
Definition: eostools.py:510