CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/RecoEgamma/EgammaElectronProducers/plugins/GsfElectronProducer.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    EgammaElectronProducers
00004 // Class:      GsfElectronProducer
00005 //
00014 #include "GsfElectronProducer.h"
00015 
00016 #include "FWCore/Framework/interface/Frameworkfwd.h"
00017 #include "FWCore/Framework/interface/MakerMacros.h"
00018 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00020 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
00021 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
00022 
00023 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00024 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00025 #include "DataFormats/EgammaReco/interface/ElectronSeed.h"
00026 #include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
00027 #include "DataFormats/TrackCandidate/interface/TrackCandidateCollection.h"
00028 #include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
00029 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
00030 
00031 
00032 #include <iostream>
00033 
00034 using namespace reco;
00035 
00036 /* void GsfElectronProducer::fillDescriptions( edm::ConfigurationDescriptions & descriptions )
00037  {
00038   edm::ParameterSetDescription desc ;
00039   GsfElectronBaseProducer::fillDescription(desc) ;
00040 
00041   // input collections
00042   desc.add<edm::InputTag>("gsfElectronCoresTag",edm::InputTag("gsfElectronCores")) ;
00043   desc.add<edm::InputTag>("ecalDrivenGsfElectronsTag",edm::InputTag("ecalDrivenGsfElectrons")) ;
00044   desc.add<edm::InputTag>("pfMvaTag",edm::InputTag("pfElectronTranslator:pf")) ;
00045 
00046   // steering
00047   desc.add<bool>("addPflowElectrons",true) ;
00048 
00049   // preselection parameters (tracker driven only electrons)
00050   desc.add<double>("minSCEtBarrelPflow",0.0) ;
00051   desc.add<double>("minSCEtEndcapsPflow",0.0) ;
00052   desc.add<double>("minEOverPBarrelPflow",0.0) ;
00053   desc.add<double>("maxEOverPBarrelPflow",999999999.) ;
00054   desc.add<double>("minEOverPEndcapsPflow",0.0) ;
00055   desc.add<double>("maxEOverPEndcapsPflow",999999999.) ;
00056   desc.add<double>("maxDeltaEtaBarrelPflow",999999999.) ;
00057   desc.add<double>("maxDeltaEtaEndcapsPflow",999999999.) ;
00058   desc.add<double>("maxDeltaPhiBarrelPflow",999999999.) ;
00059   desc.add<double>("maxDeltaPhiEndcapsPflow",999999999.) ;
00060   desc.add<double>("hOverEConeSizePflow",0.15) ;
00061   desc.add<double>("hOverEPtMinPflow",0.) ;
00062   desc.add<double>("maxHOverEBarrelPflow",999999999.) ;
00063   desc.add<double>("maxHOverEEndcapsPflow",999999999.) ;
00064   desc.add<double>("maxHBarrelPflow",0.0) ;
00065   desc.add<double>("maxHEndcapsPflow",0.0) ;
00066   desc.add<double>("maxSigmaIetaIetaBarrelPflow",999999999.) ;
00067   desc.add<double>("maxSigmaIetaIetaEndcapsPflow",999999999.) ;
00068   desc.add<double>("maxFbremBarrelPflow",999999999.) ;
00069   desc.add<double>("maxFbremEndcapsPflow",999999999.) ;
00070   desc.add<bool>("isBarrelPflow",false) ;
00071   desc.add<bool>("isEndcapsPflow",false) ;
00072   desc.add<bool>("isFiducialPflow",false) ;
00073   desc.add<double>("maxTIPPflow",999999999.) ;
00074   desc.add<double>("minMVAPflow",-0.4) ;
00075 
00076   descriptions.add("produceGsfElectrons",desc) ;
00077  }
00078  */
00079 GsfElectronProducer::GsfElectronProducer( const edm::ParameterSet & cfg )
00080  : GsfElectronBaseProducer(cfg)
00081  {}
00082 
00083 GsfElectronProducer::~GsfElectronProducer()
00084  {}
00085 
00086 void GsfElectronProducer::produce( edm::Event & event, const edm::EventSetup & setup )
00087  {
00088   beginEvent(event,setup) ;
00089   algo_->clonePreviousElectrons() ;
00090   // don't add pflow only electrons if one so wish
00091   if (strategyCfg_.addPflowElectrons)
00092    { algo_->completeElectrons() ; }
00093   algo_->addPflowInfo() ;
00094   fillEvent(event) ;
00095   endEvent() ;
00096  }
00097 
00098