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 // Pietro Govoni, 00013 // Chiara Ilaria Rovelli, 00014 // Paolo Meridiani 00015 // Universita' di Roma "La Sapienza" and INFN Roma 00016 // Universita' di Milano "Bicocca" and INFN Milano 00017 // 00018 // Created: Fri Jun 25 11:25:36 CEST 2007 00019 // 00020 //----------------------------------------------------------------------- 00021 00022 00023 #ifndef ElectronLikelihoodESSource_h 00024 #define ElectronLikelihoodESSource_h 00025 00026 #include <memory> 00027 #include <fstream> 00028 #include <vector> 00029 #include "boost/shared_ptr.hpp" 00030 #include "RecoEgamma/ElectronIdentification/interface/ElectronLikelihood.h" 00031 #include "RecoEgamma/ElectronIdentification/interface/LikelihoodSwitches.h" 00032 #include "FWCore/Framework/interface/ESProducer.h" 00033 #include "FWCore/Framework/interface/ESHandle.h" 00034 #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h" 00035 #include "FWCore/Framework/interface/SourceFactory.h" 00036 #include "CondFormats/DataRecord/interface/ElectronLikelihoodRcd.h" 00037 #include "CondFormats/EgammaObjects/interface/ElectronLikelihoodCalibration.h" 00038 #include <climits> 00039 #include <string> 00040 00041 class ElectronLikelihoodESSource : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder { 00042 public: 00044 ElectronLikelihoodESSource( const edm::ParameterSet& ); 00046 ~ElectronLikelihoodESSource(); 00048 typedef std::auto_ptr<ElectronLikelihood> ReturnType; 00050 ReturnType produce( const ElectronLikelihoodRcd &); 00052 void setIntervalFor( const edm::eventsetup::EventSetupRecordKey &, 00053 const edm::IOVSyncValue &, 00054 edm::ValidityInterval & ); 00055 00056 private: 00058 const ElectronLikelihoodCalibration* readPdfFromDB ( const ElectronLikelihoodRcd & ); 00059 00060 private: 00061 00063 std::vector<double> m_fisherEBLt15; 00064 std::vector<double> m_fisherEBGt15; 00065 std::vector<double> m_fisherEELt15; 00066 std::vector<double> m_fisherEEGt15; 00067 00069 std::vector<double> m_eleEBFracsLt15 ; 00070 std::vector<double> m_eleEBFracsGt15 ; 00072 std::vector<double> m_piEBFracsLt15 ; 00073 std::vector<double> m_piEBFracsGt15 ; 00074 00076 std::vector<double> m_eleEEFracsLt15 ; 00077 std::vector<double> m_eleEEFracsGt15 ; 00079 std::vector<double> m_piEEFracsLt15 ; 00080 std::vector<double> m_piEEFracsGt15 ; 00081 00083 LikelihoodSwitches m_eleIDSwitches ; 00084 00086 double m_eleWeight ; 00088 double m_piWeight ; 00089 00091 std::string m_signalWeightSplitting ; 00092 std::string m_backgroundWeightSplitting ; 00093 bool m_splitSignalPdfs ; 00094 bool m_splitBackgroundPdfs ; 00095 00096 }; 00097 #endif