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 
40  std::string _name;
41  std::string _species;
43  int _ptbin;
44 
45  std::map<std::string,const PhysicsTools::Calibration::HistogramF*> _splitPdf;
46  std::map<std::string,std::string> _splitRule;
47 
48 };
49 
50 #endif
std::string getName()
get PDF name
Definition: LikelihoodPdf.h:31
std::map< std::string, const PhysicsTools::Calibration::HistogramF * > _splitPdf
Definition: LikelihoodPdf.h:45
virtual ~LikelihoodPdf()
std::string _species
Definition: LikelihoodPdf.h:41
std::string getSpecies()
get PDF species
Definition: LikelihoodPdf.h:34
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:40
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:46
LikelihoodPdf(const LikelihoodPdf &pdf)
Definition: LikelihoodPdf.h:16