CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_8_patch3/src/RecoEgamma/ElectronIdentification/plugins/ElectronLikelihoodESSource.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //-----------------------------------------------------------------------
00003 //
00004 // Package:    
00005 //      EgammaAnalysis/ElectronIDESSource
00006 // Description:
00007 //      Class ElectronLikelihoodESSource
00008 //      class defining the Event Setup sources, where to take:
00009 //      PDFs, a priori probabilities, cluster shape Fisher setup
00010 //      
00011 // Original Authors:  Emanuele Di Marco, 
00012 //                    Chiara Ilaria Rovelli, 
00013 //                    Paolo Meridiani
00014 // Universita' di Roma "La Sapienza" and INFN Roma
00015 //
00016 // Created:  Fri Jun  25 11:25:36 CEST 2007
00017 //
00018 //-----------------------------------------------------------------------
00019 
00020 
00021 #ifndef ElectronLikelihoodESSource_h
00022 #define ElectronLikelihoodESSource_h
00023 
00024 #include <memory>
00025 #include <fstream>
00026 #include <vector>
00027 #include "boost/shared_ptr.hpp"
00028 #include "RecoEgamma/ElectronIdentification/interface/ElectronLikelihood.h"
00029 #include "RecoEgamma/ElectronIdentification/interface/LikelihoodSwitches.h"
00030 #include "FWCore/Framework/interface/ESProducer.h"
00031 #include "FWCore/Framework/interface/ESHandle.h"
00032 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h"
00033 #include "FWCore/Framework/interface/SourceFactory.h"
00034 #include "CondFormats/DataRecord/interface/ElectronLikelihoodRcd.h"
00035 #include "CondFormats/EgammaObjects/interface/ElectronLikelihoodCalibration.h"
00036 #include <climits>
00037 #include <string>
00038 
00039 class ElectronLikelihoodESSource : public edm::ESProducer, public  edm::EventSetupRecordIntervalFinder {
00040  public:
00042   ElectronLikelihoodESSource( const edm::ParameterSet& );
00044   ~ElectronLikelihoodESSource();
00046   typedef std::auto_ptr<ElectronLikelihood> ReturnType;
00048   ReturnType produce( const ElectronLikelihoodRcd &);
00050   void setIntervalFor( const edm::eventsetup::EventSetupRecordKey &,
00051                        const edm::IOVSyncValue &,
00052                        edm::ValidityInterval & );
00053   
00054  private:
00056   const ElectronLikelihoodCalibration* readPdfFromDB ( const ElectronLikelihoodRcd & );
00057 
00058  private:
00059 
00061   LikelihoodSwitches m_eleIDSwitches ;
00062   
00064   std::string m_signalWeightSplitting ;
00065   std::string m_backgroundWeightSplitting ;
00066   bool m_splitSignalPdfs ;
00067   bool m_splitBackgroundPdfs ;
00068 
00069 };
00070 #endif