CMS 3D CMS Logo

EffPurFromHistos2D.h
Go to the documentation of this file.
1 #ifndef EffPurFromHistos2D_H
2 #define EffPurFromHistos2D_H
3 
7 
8 #include "TH2F.h"
9 #include "TCanvas.h"
10 
11 #include <string>
12 
14 
15  public:
16 
17  EffPurFromHistos2D(const std::string & ext, TH2F * h_d, TH2F * h_u,
18  TH2F * h_s, TH2F * h_c, TH2F * h_b, TH2F * h_g, TH2F * h_ni,
19  TH2F * h_dus, TH2F * h_dusg, TH2F * h_pu,
20  const std::string& label, unsigned int mc,
21  int nBinX = 100, double startOX = 0.05, double endOX = 1.05);
22 
24  const std::string& label, unsigned int mc,
25  DQMStore::IBooker & ibook,
26  int nBinX = 100, double startOX = 0.05, double endOX = 1.05);
27 
29 
30  // do the computation
31  void compute(DQMStore::IBooker & ibook, std::vector<double> fixedEff);
32 
33  void epsPlot(const std::string & name);
34  void psPlot(const std::string & name);
35 
36  void plot(TPad * theCanvas = nullptr);
37  void plot(const std::string & name, const std::string & ext);
38 
41 
42  bool doCTagPlots(bool Ctag) { doCTagPlots_ = Ctag; return doCTagPlots_; }
43 
44  private:
45 
46  // consistency check(same binning)
47  void check();
49 
50  unsigned int mcPlots_;
53  // the string for the histo name extension
55 
56  std::unique_ptr< FlavourHistograms2D<double, double> > discrNoCutEffic, discrCutEfficScan;
57 
58  // the input histograms(efficiency versus discriminator cut)
59  // IMPORTANT: IT'S ASSUMED THAT ALL HISTOS HAVE THE SAME BINNING!!
60  //(can in principle be relaxed by checking explicitely for the discriminator value
61  // instead of bin index)
72 
73  // the corresponding output histograms(flavour-eff vs. b-efficiency)
74 
75  // binning for output histograms
77  double startOutputX;
78  double endOutputX;
80  double startOutputY;
81  double endOutputY;
82 
83  std::vector<MonitorElement*> X_vs_Y_eff_at_fixedZeff;
84 };
85 
86 #endif
FlavourHistograms2D< double, double > & discriminatorCutEfficScan() const
std::unique_ptr< FlavourHistograms2D< double, double > > discrNoCutEffic
std::unique_ptr< FlavourHistograms2D< double, double > > discrCutEfficScan
std::string histoExtension
EffPurFromHistos2D(const std::string &ext, TH2F *h_d, TH2F *h_u, TH2F *h_s, TH2F *h_c, TH2F *h_b, TH2F *h_g, TH2F *h_ni, TH2F *h_dus, TH2F *h_dusg, TH2F *h_pu, const std::string &label, unsigned int mc, int nBinX=100, double startOX=0.05, double endOX=1.05)
std::vector< MonitorElement * > X_vs_Y_eff_at_fixedZeff
void epsPlot(const std::string &name)
bool doCTagPlots(bool Ctag)
void psPlot(const std::string &name)
void plot(TPad *theCanvas=0)
Definition: memstream.h:15
FlavourHistograms2D< double, double > & discriminatorNoCutEffic() const
void compute(DQMStore::IBooker &ibook, std::vector< double > fixedEff)