CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LikelihoodPdf.h
Go to the documentation of this file.
1 #ifndef LikelihoodPdf_H
2 #define LikelihoodPdf_H
3 
6 #include <TH1F.h>
7 #include <TDirectory.h>
8 #include <string>
9 #include <vector>
10 #include <map>
11 
13 
14  public:
16  LikelihoodPdf(const LikelihoodPdf& pdf) {};
17  LikelihoodPdf(const char* name, const char* species, int ecalsubdet, int ptbin);
18  virtual ~LikelihoodPdf();
19 
21  void initFromDB(const ElectronLikelihoodCalibration *calibration);
22 
25  void split(std::map<std::string,float> splitFractions, bool splitPdf = false);
26 
28  float getVal(float x, std::string catName="NOSPLIT", bool normalized = true);
29 
31  std::string getName() { return _name; }
32 
34  std::string getSpecies() { return _species; }
35 
36 
37 
38  private:
39 
41 
42  std::string _name;
43  std::string _species;
45  int _ptbin;
46 
47  std::map<std::string,const PhysicsTools::Calibration::HistogramF*> _splitPdf;
48  std::map<std::string,std::string> _splitRule;
49 
50 };
51 
52 #endif
std::string getName()
get PDF name
Definition: LikelihoodPdf.h:31
std::map< std::string, const PhysicsTools::Calibration::HistogramF * > _splitPdf
Definition: LikelihoodPdf.h:47
virtual ~LikelihoodPdf()
std::string _species
Definition: LikelihoodPdf.h:43
std::string getSpecies()
get PDF species
Definition: LikelihoodPdf.h:34
float normalization(const PhysicsTools::Calibration::HistogramF *thePdf)
void initFromDB(const ElectronLikelihoodCalibration *calibration)
initialize PDFs from CondDB
void split(std::map< std::string, float > splitFractions, bool splitPdf=false)
std::string _name
Definition: LikelihoodPdf.h:42
float getVal(float x, std::string catName="NOSPLIT", bool normalized=true)
get Value of pdf at point x for class catName
Definition: DDAxes.h:10
std::map< std::string, std::string > _splitRule
Definition: LikelihoodPdf.h:48
LikelihoodPdf(const LikelihoodPdf &pdf)
Definition: LikelihoodPdf.h:16