CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LikelihoodPdfProduct.h
Go to the documentation of this file.
1 #ifndef LikelihoodPdfProduct_h
2 #define LikelihoodPdfProduct_h
3 
7 #include <TDirectory.h>
8 #include <string>
9 #include <vector>
10 #include <map>
11 
13  public:
14  LikelihoodPdfProduct(const char* name, int ecalsubdet, int ptbin);
16 
18  void initFromDB(const ElectronLikelihoodCalibration *calibration);
19 
21  void addSpecies(const char* name, float priorWeight=1.);
22 
24  void addPdf(const char* specname, const char* name, bool splitPdf=false);
25 
27  void setSplitFrac(const char* specname, const char* catName, float frac=1.0);
28 
30  float getRatio(const char* specName, std::vector<float> measurements, std::string);
31 
32  private:
33 
34  float getSpeciesProb(const char* specName, std::vector<float> measurements, std::string gsfClass);
35  std::string _name;
37  std::vector<LikelihoodSpecies*> _specList;
38  std::vector<float> _priorList;
40  int _ptbin;
41 
42 };
43 #endif
44 
void initFromDB(const ElectronLikelihoodCalibration *calibration)
initialize the PDFs from CondDB
void setSplitFrac(const char *specname, const char *catName, float frac=1.0)
set the fraction of one category for a given species
std::vector< float > _priorList
void addSpecies(const char *name, float priorWeight=1.)
add a species (hypothesis) to the likelihood, with a priori probability
float getRatio(const char *specName, std::vector< float > measurements, std::string)
get the likelihood ratio p(a priori) * L(specName) / L_tot
LikelihoodPdfProduct(const char *name, int ecalsubdet, int ptbin)
float getSpeciesProb(const char *specName, std::vector< float > measurements, std::string gsfClass)
std::vector< LikelihoodSpecies * > _specList
void addPdf(const char *specname, const char *name, bool splitPdf=false)
add a pdf for a species, splitted or not
const ElectronLikelihoodCalibration * _calibration