CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/RecoEgamma/ElectronIdentification/interface/ElectronLikelihood.h

Go to the documentation of this file.
00001 #ifndef ElectronLikelihood_H
00002 #define ElectronLikelihood_H
00003 
00004 #include "FWCore/Framework/interface/Event.h"
00005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00006 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00007 #include "RecoEgamma/ElectronIdentification/interface/ElectronIDAlgo.h"
00008 #include "RecoEgamma/ElectronIdentification/interface/LikelihoodSwitches.h"
00009 #include "RecoEgamma/ElectronIdentification/interface/LikelihoodPdfProduct.h"
00010 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h"
00011 #include "CondFormats/DataRecord/interface/ElectronLikelihoodRcd.h"
00012 #include "CondFormats/EgammaObjects/interface/ElectronLikelihoodCalibration.h"
00013 #include <TDirectory.h>
00014 #include <vector>
00015 
00016 
00017 class ElectronLikelihood {
00018 
00019  public:
00020   
00022   ElectronLikelihood () {} ;
00023 
00025   ElectronLikelihood (const ElectronLikelihoodCalibration *calibration,
00026                       LikelihoodSwitches eleIDSwitches,
00027                       std::string signalWeightSplitting,
00028                       std::string backgroundWeightSplitting,
00029                       bool splitSignalPdfs,
00030                       bool splitBackgroundPdfs) ;
00031 
00033   virtual ~ElectronLikelihood () ;
00034 
00036   void setup (const edm::ParameterSet& conf) {} ;
00037 
00039   float result (const reco::GsfElectron &electron, 
00040                 EcalClusterLazyTools) const ;
00042   float resultLog (const reco::GsfElectron &electron, 
00043                    EcalClusterLazyTools) const ;
00044 
00045  private:
00046 
00049   void Setup (const ElectronLikelihoodCalibration *calibration,
00050               std::string signalWeightSplitting,
00051               std::string backgroundWeightSplitting,
00052               bool splitSignalPdfs,
00053               bool splitBackgroundPdfs) ;
00054 
00055 
00057   void getInputVar (const reco::GsfElectron &electron, 
00058                     std::vector<float> &measuremnts, 
00059                     EcalClusterLazyTools) const ;
00060 
00062   LikelihoodPdfProduct *_EB0lt15lh, *_EB1lt15lh, *_EElt15lh;
00064   LikelihoodPdfProduct *_EB0gt15lh, *_EB1gt15lh, *_EEgt15lh;
00065 
00067   LikelihoodSwitches m_eleIDSwitches ;
00068 
00070   std::string m_signalWeightSplitting;
00071   std::string m_backgroundWeightSplitting;
00072   bool m_splitSignalPdfs;
00073   bool m_splitBackgroundPdfs;
00074 
00075 };
00076 
00077 #include "FWCore/Framework/interface/data_default_record_trait.h"
00078 EVENTSETUP_DATA_DEFAULT_RECORD (ElectronLikelihood, ElectronLikelihoodRcd)
00079 
00080 #endif // ElectronLikelihood_H