CMS 3D CMS Logo

GsfElectronProducer.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    EgammaElectronProducers
00004 // Class:      GsfElectronProducer
00005 // 
00013 //
00014 // Original Author:  Ursula Berthon, Claude Charlot
00015 //         Created:  Mon Mar 27 13:22:06 CEST 2006
00016 // $Id: GsfElectronProducer.cc,v 1.6 2008/04/15 21:31:13 charlot Exp $
00017 //
00018 //
00019 
00020 // user include files
00021 #include "FWCore/Framework/interface/Frameworkfwd.h"
00022 #include "FWCore/Framework/interface/MakerMacros.h"
00023 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00024 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00025 #include "RecoEgamma/EgammaElectronAlgos/interface/GsfElectronAlgo.h"
00026 #include "DataFormats/EgammaReco/interface/ElectronPixelSeed.h"
00027 #include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
00028 #include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h"
00029 #include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
00030 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00031 
00032 #include "GsfElectronProducer.h"
00033 
00034 #include <iostream>
00035 
00036 using namespace reco;
00037  
00038 GsfElectronProducer::GsfElectronProducer(const edm::ParameterSet& iConfig) 
00039 {
00040   //register your products
00041   produces<GsfElectronCollection>();
00042 
00043   //create algo
00044   algo_ = new
00045     GsfElectronAlgo(iConfig,
00046                     iConfig.getParameter<double>("maxEOverPBarrel"),
00047                     iConfig.getParameter<double>("maxEOverPEndcaps"),
00048                     iConfig.getParameter<double>("minEOverPBarrel"),
00049                     iConfig.getParameter<double>("minEOverPEndcaps"),
00050                     iConfig.getParameter<double>("maxDeltaEta"),
00051                     iConfig.getParameter<double>("maxDeltaPhi"),
00052                     iConfig.getParameter<bool>("highPtPreselection"),
00053                     iConfig.getParameter<double>("highPtMin"),
00054                     iConfig.getParameter<bool>("applyEtaCorrection"),
00055                     iConfig.getParameter<bool>("applyAmbResolution")
00056                     );
00057 
00058 }
00059 
00060 GsfElectronProducer::~GsfElectronProducer()
00061 {
00062   delete algo_;
00063 }
00064 
00065 void GsfElectronProducer::beginJob(edm::EventSetup const&iSetup) 
00066 {     
00067 }
00068 
00069 // ------------ method called to produce the data  ------------
00070 void GsfElectronProducer::produce(edm::Event& e, const edm::EventSetup& iSetup) 
00071 {
00072   algo_->setupES(iSetup);  
00073 
00074   // Create the output collections   
00075   std::auto_ptr<GsfElectronCollection> pOutEle(new GsfElectronCollection);
00076   
00077   // invoke algorithm
00078   algo_->run(e,*pOutEle);
00079 
00080   // put result into the Event
00081   e.put(pOutEle);
00082   
00083 }
00084 
00085 

Generated on Tue Jun 9 17:43:21 2009 for CMSSW by  doxygen 1.5.4