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
EffPurFromHistos::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: EffPurFromHistos.h:16
ext
Definition: memstream.h:15
EffPurFromHistos::check
void check()
Definition: EffPurFromHistos.cc:361
EffPurFromHistos::getEffFlavVsBEff_dus
TH1F * getEffFlavVsBEff_dus()
Definition: EffPurFromHistos.h:56
EffPurFromHistos::EffFlavVsXEff_pu
MonitorElement * EffFlavVsXEff_pu
Definition: EffPurFromHistos.h:118
EffPurFromHistos::effVersusDiscr_s
TH1F * effVersusDiscr_s
Definition: EffPurFromHistos.h:93
CaloTowersParam_cfi.mc
mc
Definition: CaloTowersParam_cfi.py:8
EffPurFromHistos::EffFlavVsXEff_dusg
MonitorElement * EffFlavVsXEff_dusg
Definition: EffPurFromHistos.h:117
EffPurFromHistos::effVersusDiscr_dusg
TH1F * effVersusDiscr_dusg
Definition: EffPurFromHistos.h:99
EffPurFromHistos::histoExtension
std::string histoExtension
Definition: EffPurFromHistos.h:83
EffPurFromHistos::getEffFlavVsBEff_ni
TH1F * getEffFlavVsBEff_ni()
Definition: EffPurFromHistos.h:55
EffPurFromHistos::getEffFlavVsBEff_d
TH1F * getEffFlavVsBEff_d()
Definition: EffPurFromHistos.h:49
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
EffPurFromHistos::EffPurFromHistos
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)
Definition: EffPurFromHistos.cc:16
EffPurFromHistos::doCTagPlots_
bool doCTagPlots_
Definition: EffPurFromHistos.h:80
EffPurFromHistos::getEffFlavVsBEff_pu
TH1F * getEffFlavVsBEff_pu()
Definition: EffPurFromHistos.h:58
dqm::legacy::MonitorElement::getTH1F
virtual TH1F * getTH1F() const
Definition: MonitorElement.h:478
PFElectronDQMAnalyzer_cfi.nBin
nBin
Definition: PFElectronDQMAnalyzer_cfi.py:25
EffPurFromHistos::getEffFlavVsBEff_b
TH1F * getEffFlavVsBEff_b()
Definition: EffPurFromHistos.h:53
EffPurFromHistos::getEffFlavVsBEff_s
TH1F * getEffFlavVsBEff_s()
Definition: EffPurFromHistos.h:51
EffPurFromHistos::endOutput
double endOutput
Definition: EffPurFromHistos.h:107
EffPurFromHistos::effVersusDiscr_pu
TH1F * effVersusDiscr_pu
Definition: EffPurFromHistos.h:100
EffPurFromHistos::discriminatorCutEfficScan
FlavourHistograms< double > & discriminatorCutEfficScan() const
Definition: EffPurFromHistos.h:67
dqm::legacy::DQMStore
Definition: DQMStore.h:727
FlavourHistorgrams.h
FlavourHistograms
Definition: FlavourHistorgrams.h:26
EffPurFromHistos::mcPlots_
unsigned int mcPlots_
Definition: EffPurFromHistos.h:79
EffPurFromHistos
Definition: EffPurFromHistos.h:13
EffPurFromHistos::effVersusDiscr_g
TH1F * effVersusDiscr_g
Definition: EffPurFromHistos.h:96
EffPurFromHistos::label_
std::string label_
Definition: EffPurFromHistos.h:81
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EffPurFromHistos::EffFlavVsXEff_b
MonitorElement * EffFlavVsXEff_b
Definition: EffPurFromHistos.h:113
HistoProviderDQM.h
EffPurFromHistos::EffFlavVsXEff_dus
MonitorElement * EffFlavVsXEff_dus
Definition: EffPurFromHistos.h:116
EffPurFromHistos::fromDiscriminatorDistr
bool fromDiscriminatorDistr
Definition: EffPurFromHistos.h:77
EffPurFromHistos::plot
void plot(TPad *theCanvas=nullptr)
Definition: EffPurFromHistos.cc:225
EffPurFromHistos::getEffFlavVsBEff_c
TH1F * getEffFlavVsBEff_c()
Definition: EffPurFromHistos.h:52
EffPurFromHistos::EffFlavVsXEff_s
MonitorElement * EffFlavVsXEff_s
Definition: EffPurFromHistos.h:111
EffPurFromHistos::psPlot
void psPlot(const std::string &name)
Definition: EffPurFromHistos.cc:207
EffPurFromHistos::discrNoCutEffic
std::unique_ptr< FlavourHistograms< double > > discrNoCutEffic
Definition: EffPurFromHistos.h:85
EffPurFromHistos::effVersusDiscr_dus
TH1F * effVersusDiscr_dus
Definition: EffPurFromHistos.h:98
EffPurFromHistos::getEffFlavVsBEff_dusg
TH1F * getEffFlavVsBEff_dusg()
Definition: EffPurFromHistos.h:57
EffPurFromHistos::EffFlavVsXEff_u
MonitorElement * EffFlavVsXEff_u
Definition: EffPurFromHistos.h:110
EffPurFromHistos::getEffFlavVsBEff_g
TH1F * getEffFlavVsBEff_g()
Definition: EffPurFromHistos.h:54
EffPurFromHistos::effVersusDiscr_d
TH1F * effVersusDiscr_d
Definition: EffPurFromHistos.h:91
EffPurFromHistos::effVersusDiscr_b
TH1F * effVersusDiscr_b
Definition: EffPurFromHistos.h:95
EffPurFromHistos::discriminatorNoCutEffic
FlavourHistograms< double > & discriminatorNoCutEffic() const
Definition: EffPurFromHistos.h:66
EffPurFromHistos::startOutput
double startOutput
Definition: EffPurFromHistos.h:106
EffPurFromHistos::epsPlot
void epsPlot(const std::string &name)
Definition: EffPurFromHistos.cc:199
EffPurFromHistos::effVersusDiscr_c
TH1F * effVersusDiscr_c
Definition: EffPurFromHistos.h:94
EffPurFromHistos::compute
void compute(DQMStore::IBooker &ibook)
Definition: EffPurFromHistos.cc:447
EffPurFromHistos::discrCutEfficScan
std::unique_ptr< FlavourHistograms< double > > discrCutEfficScan
Definition: EffPurFromHistos.h:85
EffPurFromHistos::~EffPurFromHistos
~EffPurFromHistos()
Definition: EffPurFromHistos.cc:197
EffPurFromHistos::EffFlavVsXEff_d
MonitorElement * EffFlavVsXEff_d
Definition: EffPurFromHistos.h:109
EffPurFromHistos::getEffFlavVsBEff_u
TH1F * getEffFlavVsBEff_u()
Definition: EffPurFromHistos.h:50
EffPurFromHistos::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: EffPurFromHistos.h:15
EffPurFromHistos::nBinOutput
int nBinOutput
Definition: EffPurFromHistos.h:105
EffPurFromHistos::EffFlavVsXEff_g
MonitorElement * EffFlavVsXEff_g
Definition: EffPurFromHistos.h:114
EffPurFromHistos::effVersusDiscr_u
TH1F * effVersusDiscr_u
Definition: EffPurFromHistos.h:92
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
dqm::implementation::IBooker
Definition: DQMStore.h:43
EffPurFromHistos::EffFlavVsXEff_c
MonitorElement * EffFlavVsXEff_c
Definition: EffPurFromHistos.h:112
EffPurFromHistos::doCTagPlots
bool doCTagPlots(bool Ctag)
Definition: EffPurFromHistos.h:69
EffPurFromHistos::effVersusDiscr_ni
TH1F * effVersusDiscr_ni
Definition: EffPurFromHistos.h:97
EffPurFromHistos::EffFlavVsXEff_ni
MonitorElement * EffFlavVsXEff_ni
Definition: EffPurFromHistos.h:115
label
const char * label
Definition: PFTauDecayModeTools.cc:11