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 public:
17 
19  TH2F* h_d,
20  TH2F* h_u,
21  TH2F* h_s,
22  TH2F* h_c,
23  TH2F* h_b,
24  TH2F* h_g,
25  TH2F* h_ni,
26  TH2F* h_dus,
27  TH2F* h_dusg,
28  TH2F* h_pu,
29  const std::string& label,
30  unsigned int mc,
31  int nBinX = 100,
32  double startOX = 0.05,
33  double endOX = 1.05);
34 
36  const std::string& label,
37  unsigned int mc,
38  DQMStore::IBooker& ibook,
39  int nBinX = 100,
40  double startOX = 0.05,
41  double endOX = 1.05);
42 
44 
45  // do the computation
46  void compute(DQMStore::IBooker& ibook, std::vector<double> fixedEff);
47 
48  void epsPlot(const std::string& name);
49  void psPlot(const std::string& name);
50 
51  void plot(TPad* theCanvas = nullptr);
52  void plot(const std::string& name, const std::string& ext);
53 
56 
57  bool doCTagPlots(bool Ctag) {
58  doCTagPlots_ = Ctag;
59  return doCTagPlots_;
60  }
61 
62 private:
63  // consistency check(same binning)
64  void check();
66 
67  unsigned int mcPlots_;
70  // the string for the histo name extension
72 
73  std::unique_ptr<FlavourHistograms2D<double, double> > discrNoCutEffic, discrCutEfficScan;
74 
75  // the input histograms(efficiency versus discriminator cut)
76  // IMPORTANT: IT'S ASSUMED THAT ALL HISTOS HAVE THE SAME BINNING!!
77  //(can in principle be relaxed by checking explicitely for the discriminator value
78  // instead of bin index)
89 
90  // the corresponding output histograms(flavour-eff vs. b-efficiency)
91 
92  // binning for output histograms
94  double startOutputX;
95  double endOutputX;
97  double startOutputY;
98  double endOutputY;
99 
100  std::vector<MonitorElement*> X_vs_Y_eff_at_fixedZeff;
101 };
102 
103 #endif
dqm::legacy::DQMStore DQMStore
void plot(TPad *theCanvas=nullptr)
FlavourHistograms2D< double, double > & discriminatorNoCutEffic() const
std::string histoExtension
char const * label
std::unique_ptr< FlavourHistograms2D< double, double > > discrCutEfficScan
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
dqm::legacy::MonitorElement MonitorElement
FlavourHistograms2D< double, double > & discriminatorCutEfficScan() const
void epsPlot(const std::string &name)
bool doCTagPlots(bool Ctag)
std::unique_ptr< FlavourHistograms2D< double, double > > discrNoCutEffic
void psPlot(const std::string &name)
Definition: memstream.h:15
void compute(DQMStore::IBooker &ibook, std::vector< double > fixedEff)