CMS 3D CMS Logo

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                       const std::vector<double> & fisherEBLt15,
00027                       const std::vector<double> & fisherEBGt15,
00028                       const std::vector<double> & fisherEELt15,
00029                       const std::vector<double> & fisherEEGt15,
00030                       const std::vector<double> & eleFracsEBlt15,
00031                       const std::vector<double> & piFracsEBlt15,
00032                       const std::vector<double> & eleFracsEElt15,
00033                       const std::vector<double> & piFracsEElt15,
00034                       const std::vector<double> & eleFracsEBgt15,
00035                       const std::vector<double> & piFracsEBgt15,
00036                       const std::vector<double> & eleFracsEEgt15,
00037                       const std::vector<double> & piFracsEEgt15,
00038                       double eleWeight,
00039                       double piWeight,
00040                       LikelihoodSwitches eleIDSwitches,
00041                       std::string signalWeightSplitting,
00042                       std::string backgroundWeightSplitting,
00043                       bool splitSignalPdfs,
00044                       bool splitBackgroundPdfs) ;
00045 
00047   virtual ~ElectronLikelihood () ;
00048 
00050   void setup (const edm::ParameterSet& conf) {} ;
00051 
00053   float result (const reco::GsfElectron &electron, 
00054                 EcalClusterLazyTools) const ;
00055 
00056  private:
00057 
00060   void Setup (const ElectronLikelihoodCalibration *calibration,
00061               const std::vector<double> & fisherEBLt15,
00062               const std::vector<double> & fisherEBGt15,
00063               const std::vector<double> & fisherEELt15,
00064               const std::vector<double> & fisherEEGt15,
00065               const std::vector<double> & eleFracsEBlt15,
00066               const std::vector<double> & piFracsEBlt15,
00067               const std::vector<double> & eleFracsEElt15,
00068               const std::vector<double> & piFracsEElt15,
00069               const std::vector<double> & eleFracsEBgt15,
00070               const std::vector<double> & piFracsEBgt15,
00071               const std::vector<double> & eleFracsEEgt15,
00072               const std::vector<double> & piFracsEEgt15,  
00073               double eleWeight,
00074               double piWeight,
00075               std::string signalWeightSplitting,
00076               std::string backgroundWeightSplitting,
00077               bool splitSignalPdfs,
00078               bool splitBackgroundPdfs) ;
00079 
00080 
00082   void getInputVar (const reco::GsfElectron &electron, 
00083                     std::vector<float> &measuremnts, 
00084                     EcalClusterLazyTools) const ;
00085 
00087   double CalculateFisher(const reco::GsfElectron &electron,
00088                          EcalClusterLazyTools) const ;
00089   
00091   LikelihoodPdfProduct *_EBlt15lh, *_EElt15lh;
00093   LikelihoodPdfProduct *_EBgt15lh, *_EEgt15lh;
00094 
00096   std::vector<double> m_fisherEBLt15, m_fisherEBGt15, m_fisherEELt15, m_fisherEEGt15;
00097 
00099   LikelihoodSwitches m_eleIDSwitches ;
00100 
00102   std::string m_signalWeightSplitting;
00103   std::string m_backgroundWeightSplitting;
00104   bool m_splitSignalPdfs;
00105   bool m_splitBackgroundPdfs;
00106 
00107 };
00108 
00109 #include "FWCore/Framework/interface/data_default_record_trait.h"
00110 EVENTSETUP_DATA_DEFAULT_RECORD (ElectronLikelihood, ElectronLikelihoodRcd)
00111 
00112 #endif // ElectronLikelihood_H

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