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 
7 
8 #include "TH1F.h"
9 #include "TCanvas.h"
10 
11 #include <string>
12 
14 
15  public:
16 
17  EffPurFromHistos ( const std::string & ext, TH1F * h_d, TH1F * h_u,
18  TH1F * h_s, TH1F * h_c, TH1F * h_b, TH1F * h_g, TH1F * h_ni,
19  TH1F * h_dus, TH1F * h_dusg, TH1F * h_pu,
20  const std::string& label, const unsigned int& mc,
21  int nBin = 100 , double startO = 0.005 , double endO = 1.005 ) ;
22 
23  EffPurFromHistos (const FlavourHistograms<double> * dDiscriminatorFC, const std::string& label, const unsigned int& mc,
24  DQMStore::IBooker & ibook, int nBin = 100 , double startO = 0.005 , double endO = 1.005 ) ;
25 
27 
28  // do the computation
29  void compute (DQMStore::IBooker & ibook) ;
30 
31  // return the newly created histos
32  TH1F * getEffFlavVsBEff_d () { return EffFlavVsXEff_d->getTH1F() ; };
33  TH1F * getEffFlavVsBEff_u () { return EffFlavVsXEff_u->getTH1F() ; };
34  TH1F * getEffFlavVsBEff_s () { return EffFlavVsXEff_s ->getTH1F() ; };
35  TH1F * getEffFlavVsBEff_c () { return EffFlavVsXEff_c ->getTH1F() ; };
36  TH1F * getEffFlavVsBEff_b () { return EffFlavVsXEff_b ->getTH1F() ; };
37  TH1F * getEffFlavVsBEff_g () { return EffFlavVsXEff_g ->getTH1F() ; };
38  TH1F * getEffFlavVsBEff_ni () { return EffFlavVsXEff_ni ->getTH1F() ; };
39  TH1F * getEffFlavVsBEff_dus () { return EffFlavVsXEff_dus ->getTH1F() ; };
41  TH1F * getEffFlavVsBEff_pu () { return EffFlavVsXEff_pu ->getTH1F(); };
42 
43 
44  void epsPlot(const std::string & name);
45  void psPlot(const std::string & name);
46 
47  void plot(TPad * theCanvas = 0) ;
48  void plot(const std::string & name, const std::string & ext);
49 
52 
53  bool doCTagPlots(bool Ctag) {doCTagPlots_ = Ctag; return doCTagPlots_;};
54 
55  private:
56 
57  // consistency check (same binning)
58  void check () ;
60 
61  unsigned int mcPlots_;
64  // the string for the histo name extension
66 
67  std::unique_ptr<FlavourHistograms<double> > discrNoCutEffic, discrCutEfficScan;
68 
69  // the input histograms (efficiency versus discriminator cut)
70  // IMPORTANT: IT'S ASSUMED THAT ALL HISTOS HAVE THE SAME BINNING!!
71  // (can in principle be relaxed by checking explicitely for the discriminator value
72  // instead of bin index)
83 
84  // the corresponding output histograms (flavour-eff vs. b-efficiency)
85 
86  // binning for output histograms
87  int nBinOutput ;
88  double startOutput ;
89  double endOutput ;
90 
101 };
102 
103 #endif
std::unique_ptr< FlavourHistograms< double > > discrNoCutEffic
void epsPlot(const std::string &name)
TH1F * getEffFlavVsBEff_g()
MonitorElement * EffFlavVsXEff_s
void compute(DQMStore::IBooker &ibook)
std::string label_
MonitorElement * EffFlavVsXEff_u
TH1F * getEffFlavVsBEff_dusg()
MonitorElement * EffFlavVsXEff_g
TH1F * getEffFlavVsBEff_c()
MonitorElement * EffFlavVsXEff_d
MonitorElement * EffFlavVsXEff_ni
MonitorElement * EffFlavVsXEff_c
std::unique_ptr< FlavourHistograms< double > > discrCutEfficScan
bool doCTagPlots(bool Ctag)
TH1F * getEffFlavVsBEff_u()
FlavourHistograms< double > * discriminatorCutEfficScan() const
MonitorElement * EffFlavVsXEff_pu
void plot(TPad *theCanvas=0)
FlavourHistograms< double > * discriminatorNoCutEffic() const
TH1F * getEffFlavVsBEff_dus()
TH1F * getEffFlavVsBEff_d()
std::string histoExtension
TH1F * getTH1F(void) const
unsigned int mcPlots_
MonitorElement * EffFlavVsXEff_dusg
TH1F * getEffFlavVsBEff_ni()
TH1F * getEffFlavVsBEff_pu()
TH1F * getEffFlavVsBEff_b()
MonitorElement * EffFlavVsXEff_dus
void psPlot(const std::string &name)
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, TH1F *h_pu, const std::string &label, const unsigned int &mc, int nBin=100, double startO=0.005, double endO=1.005)
TH1F * getEffFlavVsBEff_s()
MonitorElement * EffFlavVsXEff_b