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 
13 //class DQMStore;
14 
16 
17 
18  public:
19 
20  EffPurFromHistos ( const std::string & ext, TH1F * h_d, TH1F * h_u,
21  TH1F * h_s, TH1F * h_c, TH1F * h_b, TH1F * h_g, TH1F * h_ni,
22  TH1F * h_dus, TH1F * h_dusg, TH1F * h_pu,
23  const std::string& label, const unsigned int& mc,
24  int nBin = 100 , double startO = 0.005 , double endO = 1.005 ) ;
25  // defaults reasonable for lifetime based tags
26 
27  EffPurFromHistos (const FlavourHistograms<double> * dDiscriminatorFC, const std::string& label, const unsigned int& mc, DQMStore::IBooker & ibook,
28  int nBin = 100 , double startO = 0.005 , double endO = 1.005 ) ;
29  // defaults reasonable for lifetime based tags
30 
32 
33  // do the computation
34  void compute (DQMStore::IBooker & ibook) ;
35 
36  // return the newly created histos
37  TH1F * getEffFlavVsBEff_d () { return EffFlavVsBEff_d->getTH1F() ; };
38  TH1F * getEffFlavVsBEff_u () { return EffFlavVsBEff_u->getTH1F() ; };
39  TH1F * getEffFlavVsBEff_s () { return EffFlavVsBEff_s ->getTH1F() ; };
40  TH1F * getEffFlavVsBEff_c () { return EffFlavVsBEff_c ->getTH1F() ; };
41  TH1F * getEffFlavVsBEff_b () { return EffFlavVsBEff_b ->getTH1F() ; };
42  TH1F * getEffFlavVsBEff_g () { return EffFlavVsBEff_g ->getTH1F() ; };
43  TH1F * getEffFlavVsBEff_ni () { return EffFlavVsBEff_ni ->getTH1F() ; };
44  TH1F * getEffFlavVsBEff_dus () { return EffFlavVsBEff_dus ->getTH1F() ; };
46  TH1F * getEffFlavVsBEff_pu () { return EffFlavVsBEff_pu ->getTH1F(); };
47 
48 
49 
50  void epsPlot(const std::string & name);
51 
52  void psPlot(const std::string & name);
53 
54  void plot(TPad * theCanvas = 0) ;
55 
56  void plot(const std::string & name, const std::string & ext);
57 
58 // void print () const ;
59 
62 
63  private:
64 
65 
66  // consistency check (same binning)
67  void check () ;
69 
70 
71  // the string for the histo name extension
73 
75 
76  // the input histograms (efficiency versus discriminator cut)
77  // IMPORTANT: IT'S ASSUMED THAT ALL HISTOS HAVE THE SAME BINNING!!
78  // (can in principle be relaxed by checking explicitely for the discriminator value
79  // instead of bin index)
90 
91 
92  // the corresponding output histograms (flavour-eff vs. b-efficiency)
93 
94  // binning for output histograms
95  int nBinOutput ;
96  double startOutput ;
97  double endOutput ;
98 
99  unsigned int mcPlots_;
100 
101 
112 
113  // DQMStore * dqmStore_;
115 
116 } ;
117 
118 #endif
MonitorElement * EffFlavVsBEff_g
void epsPlot(const std::string &name)
TH1F * getEffFlavVsBEff_g()
void compute(DQMStore::IBooker &ibook)
MonitorElement * EffFlavVsBEff_dusg
TH1F * getEffFlavVsBEff_dusg()
MonitorElement * EffFlavVsBEff_u
FlavourHistograms< double > * discrNoCutEffic
TH1F * getEffFlavVsBEff_c()
MonitorElement * EffFlavVsBEff_pu
TH1F * getEffFlavVsBEff_u()
FlavourHistograms< double > * discriminatorCutEfficScan() const
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
unsigned int mcPlots_
MonitorElement * EffFlavVsBEff_b
TH1F * getEffFlavVsBEff_ni()
TH1F * getEffFlavVsBEff_pu()
MonitorElement * EffFlavVsBEff_ni
TH1F * getEffFlavVsBEff_b()
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 * EffFlavVsBEff_dus