00001 #ifndef LikelihoodPdfProduct_h 00002 #define LikelihoodPdfProduct_h 00003 00004 #include "RecoEgamma/ElectronIdentification/interface/LikelihoodSpecies.h" 00005 #include "RecoEgamma/ElectronIdentification/interface/LikelihoodPdf.h" 00006 #include "CondFormats/EgammaObjects/interface/ElectronLikelihoodCalibration.h" 00007 #include <TDirectory.h> 00008 #include <string> 00009 #include <vector> 00010 #include <map> 00011 00012 class LikelihoodPdfProduct { 00013 public: 00014 LikelihoodPdfProduct(const char* name, int ecalsubdet, int ptbin); 00015 ~LikelihoodPdfProduct(); 00016 00018 void initFromDB(const ElectronLikelihoodCalibration *calibration); 00019 00021 void addSpecies(const char* name, float priorWeight=1.); 00022 00024 void addPdf(const char* specname, const char* name, bool splitPdf=false); 00025 00027 void setSplitFrac(const char* specname, const char* catName, float frac); 00028 00030 float getRatio(const char* specName, std::vector<float> measurements, std::string); 00031 00032 private: 00033 00034 float getSpeciesProb(const char* specName, std::vector<float> measurements, std::string gsfClass); 00035 std::string _name; 00036 const ElectronLikelihoodCalibration *_calibration; 00037 std::vector<LikelihoodSpecies*> _specList; 00038 std::vector<float> _priorList; 00039 int _ecalsubdet; 00040 int _ptbin; 00041 00042 }; 00043 #endif 00044