CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EffPurFromHistos.h
Go to the documentation of this file.
1 #ifndef EffPurFromHistos_H
2 #define EffPurFromHistos_H
3 
6 
7 #include "TH1F.h"
8 #include "TCanvas.h"
9 
10 #include <string>
11 
12 //class DQMStore;
13 
15 
16 
17  public:
18 
19  EffPurFromHistos ( const std::string & ext, TH1F * h_d, TH1F * h_u,
20  TH1F * h_s, TH1F * h_c, TH1F * h_b, TH1F * h_g, TH1F * h_ni,
21  TH1F * h_dus, TH1F * h_dusg, const std::string& label, const bool& mc,
22  int nBin = 100 , double startO = 0.005 , double endO = 1.005 ) ;
23  // defaults reasonable for lifetime based tags
24 
25  EffPurFromHistos (const FlavourHistograms<double> * dDiscriminatorFC, const std::string& label, const bool& mc,
26  int nBin = 100 , double startO = 0.005 , double endO = 1.005 ) ;
27  // defaults reasonable for lifetime based tags
28 
30 
31  // do the computation
32  void compute () ;
33 
34  // return the newly created histos
35  TH1F * getEffFlavVsBEff_d () {
36  return EffFlavVsBEff_d->getTH1F() ; };
37  TH1F * getEffFlavVsBEff_u () { return EffFlavVsBEff_u->getTH1F() ; };
38  TH1F * getEffFlavVsBEff_s () { return EffFlavVsBEff_s ->getTH1F() ; };
39  TH1F * getEffFlavVsBEff_c () { return EffFlavVsBEff_c ->getTH1F() ; };
40  TH1F * getEffFlavVsBEff_b () { return EffFlavVsBEff_b ->getTH1F() ; };
41  TH1F * getEffFlavVsBEff_g () { return EffFlavVsBEff_g ->getTH1F() ; };
42  TH1F * getEffFlavVsBEff_ni () { return EffFlavVsBEff_ni ->getTH1F() ; };
43  TH1F * getEffFlavVsBEff_dus () { return EffFlavVsBEff_dus ->getTH1F() ; };
45 
46 
47 
48  void epsPlot(const std::string & name);
49 
50  void psPlot(const std::string & name);
51 
52  void plot(TPad * theCanvas = 0) ;
53 
54  void plot(const std::string & name, const std::string & ext);
55 
56 // void print () const ;
57 
60 
61  private:
62 
63 
64  // consistency check (same binning)
65  void check () ;
67 
68 
69  // the string for the histo name extension
70  std::string histoExtension ;
71 
73 
74  // the input histograms (efficiency versus discriminator cut)
75  // IMPORTANT: IT'S ASSUMED THAT ALL HISTOS HAVE THE SAME BINNING!!
76  // (can in principle be relaxed by checking explicitely for the discriminator value
77  // instead of bin index)
87 
88 
89  // the corresponding output histograms (flavour-eff vs. b-efficiency)
90 
91  // binning for output histograms
92  int nBinOutput ;
93  double startOutput ;
94  double endOutput ;
95 
96  bool mcPlots_;
97 
98 
108 
109  // DQMStore * dqmStore_;
110  std::string label_;
111 
112 } ;
113 
114 #endif
MonitorElement * EffFlavVsBEff_g
void epsPlot(const std::string &name)
TH1F * getEffFlavVsBEff_g()
const std::string & label
Definition: MVAComputer.cc:186
MonitorElement * EffFlavVsBEff_dusg
TH1F * getEffFlavVsBEff_dusg()
MonitorElement * EffFlavVsBEff_u
FlavourHistograms< double > * discrNoCutEffic
TH1F * getEffFlavVsBEff_c()
TH1F * getEffFlavVsBEff_u()
FlavourHistograms< double > * discriminatorCutEfficScan() const
EffPurFromHistos(const std::string &ext, TH1F *h_d, TH1F *h_u, TH1F *h_s, TH1F *h_c, TH1F *h_b, TH1F *h_g, TH1F *h_ni, TH1F *h_dus, TH1F *h_dusg, const std::string &label, const bool &mc, int nBin=100, double startO=0.005, double endO=1.005)
void plot(TPad *theCanvas=0)
FlavourHistograms< double > * discriminatorNoCutEffic() const
MonitorElement * EffFlavVsBEff_c
MonitorElement * EffFlavVsBEff_s
TH1F * getEffFlavVsBEff_dus()
TH1F * getEffFlavVsBEff_d()
FlavourHistograms< double > * discrCutEfficScan
std::string histoExtension
TH1F * getTH1F(void) const
MonitorElement * EffFlavVsBEff_d
MonitorElement * EffFlavVsBEff_b
TH1F * getEffFlavVsBEff_ni()
MonitorElement * EffFlavVsBEff_ni
TH1F * getEffFlavVsBEff_b()
void psPlot(const std::string &name)
TH1F * getEffFlavVsBEff_s()
MonitorElement * EffFlavVsBEff_dus