CMS 3D CMS Logo

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