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(const std::map<std::string,float>& splitFractions, bool splitPdf = false);
26 
28  float getVal(float x, std::string const& catName="NOSPLIT", bool normalized = true) const;
29 
31  std::string const& getName() const { return _name; }
32 
34  std::string const& getSpecies() const { return _species; }
35 
36 
37 
38  private:
39 
40  float normalization(const PhysicsTools::Calibration::HistogramF *thePdf) const;
41 
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::map< std::string, const PhysicsTools::Calibration::HistogramF * > _splitPdf
Definition: LikelihoodPdf.h:47
virtual ~LikelihoodPdf()
std::string _species
Definition: LikelihoodPdf.h:43
void initFromDB(const ElectronLikelihoodCalibration *calibration)
initialize PDFs from CondDB
std::string const & getName() const
get PDF name
Definition: LikelihoodPdf.h:31
std::string const & getSpecies() const
get PDF species
Definition: LikelihoodPdf.h:34
void split(const std::map< std::string, float > &splitFractions, bool splitPdf=false)
std::string _name
Definition: LikelihoodPdf.h:42
float normalization(const PhysicsTools::Calibration::HistogramF *thePdf) const
float getVal(float x, std::string const &catName="NOSPLIT", bool normalized=true) const
get Value of pdf at point x for class catName
std::map< std::string, std::string > _splitRule
Definition: LikelihoodPdf.h:48
LikelihoodPdf(const LikelihoodPdf &pdf)
Definition: LikelihoodPdf.h:16