CMS 3D CMS Logo

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, const std::vector<float>& measurements, const std::string&) const;
31 
32  private:
33 
34  float getSpeciesProb(const char* specName, const std::vector<float>& measurements, const std::string& gsfClass) const;
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
LikelihoodPdfProduct(const char *name, int ecalsubdet, int ptbin)
float getSpeciesProb(const char *specName, const std::vector< float > &measurements, const std::string &gsfClass) const
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
float getRatio(const char *specName, const std::vector< float > &measurements, const std::string &) const
get the likelihood ratio p(a priori) * L(specName) / L_tot