CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
26 
28 
30 //#include "DataFormats/EgammaReco/interface/ElectronPixelSeedFwd.h"
31 //#include "DataFormats/EgammaReco/interface/ElectronPixelSeed.h"
32 #include "DataFormats/TrackReco/interface/TrackFwd.h"
33 #include "DataFormats/TrackReco/interface/TrackExtraFwd.h"
34 #include "DataFormats/TrackReco/interface/Track.h"
35 #include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h"
36 #include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
37 */
40 
41 #include <iostream>
42 
43 using namespace reco;
44 
46 
47  consumes<TrackCollection>(conf_.getParameter<edm::InputTag>("TrackProducer"));
48  consumes<GsfTrackCollection>(conf_.getParameter<edm::InputTag>("GsfTrackProducer"));
49  consumes<BeamSpot>(conf_.getParameter<edm::InputTag>("BSProducer"));
50 
51  //create algo
53 
54  //register your products
55  produces<ElectronCollection>();
56 }
57 
58 
60  delete algo_;
61 }
62 
64 
66  desc.add<edm::InputTag>(("TrackProducer"), edm::InputTag("hltEleAnyWP80CleanMergedTracks"));
67  desc.add<edm::InputTag>(("GsfTrackProducer"), edm::InputTag(""));
68  desc.add<bool>(("UseGsfTracks"), false);
69  desc.add<edm::InputTag>(("BSProducer"), edm::InputTag("hltOnlineBeamSpot"));
70  descriptions.add(("hltEgammaHLTPixelMatchElectronProducers"), desc);
71 }
72 
74 {}
75 
76 // ------------ method called to produce the data ------------
78  // Update the algorithm conditions
79  algo_->setupES(iSetup);
80 
81  // Create the output collections
82  std::auto_ptr<ElectronCollection> pOutEle(new ElectronCollection);
83 
84  // invoke algorithm
85  algo_->run(e,*pOutEle);
86 
87  // put result into the Event
88  e.put(pOutEle);
89 }
90 
91 
T getParameter(std::string const &) const
EgammaHLTPixelMatchElectronProducers(const edm::ParameterSet &conf)
void run(edm::Event &, reco::ElectronCollection &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
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)
std::vector< Electron > ElectronCollection
collectin of Electron objects
Definition: ElectronFwd.h:9
virtual void produce(edm::Event &e, const edm::EventSetup &c)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)