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
EffPurFromHistos2D::epsPlot
void epsPlot(const std::string &name)
Definition: EffPurFromHistos2D.cc:205
EffPurFromHistos2D::startOutputX
double startOutputX
Definition: EffPurFromHistos2D.h:94
EffPurFromHistos2D::discrCutEfficScan
std::unique_ptr< FlavourHistograms2D< double, double > > discrCutEfficScan
Definition: EffPurFromHistos2D.h:73
EffPurFromHistos2D::check
void check()
Definition: EffPurFromHistos2D.cc:244
ext
Definition: memstream.h:15
EffPurFromHistos2D::EffPurFromHistos2D
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)
Definition: EffPurFromHistos2D.cc:16
EffPurFromHistos2D::discriminatorCutEfficScan
FlavourHistograms2D< double, double > & discriminatorCutEfficScan() const
Definition: EffPurFromHistos2D.h:55
cTagCorrelationAnalysis_cff.fixedEff
fixedEff
Definition: cTagCorrelationAnalysis_cff.py:14
EffPurFromHistos2D::nBinOutputY
int nBinOutputY
Definition: EffPurFromHistos2D.h:96
CaloTowersParam_cfi.mc
mc
Definition: CaloTowersParam_cfi.py:8
EffPurFromHistos2D::effVersusDiscr_s
TH2F * effVersusDiscr_s
Definition: EffPurFromHistos2D.h:81
EffPurFromHistos2D::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: EffPurFromHistos2D.h:15
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
EffPurFromHistos2D::effVersusDiscr_pu
TH2F * effVersusDiscr_pu
Definition: EffPurFromHistos2D.h:88
EffPurFromHistos2D::discrNoCutEffic
std::unique_ptr< FlavourHistograms2D< double, double > > discrNoCutEffic
Definition: EffPurFromHistos2D.h:73
EffPurFromHistos2D::psPlot
void psPlot(const std::string &name)
Definition: EffPurFromHistos2D.cc:213
EffPurFromHistos2D::effVersusDiscr_dus
TH2F * effVersusDiscr_dus
Definition: EffPurFromHistos2D.h:86
EffPurFromHistos2D::effVersusDiscr_g
TH2F * effVersusDiscr_g
Definition: EffPurFromHistos2D.h:84
FlavourHistorgrams2D.h
EffPurFromHistos2D::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: EffPurFromHistos2D.h:16
EffPurFromHistos2D::effVersusDiscr_u
TH2F * effVersusDiscr_u
Definition: EffPurFromHistos2D.h:80
EffPurFromHistos2D::effVersusDiscr_dusg
TH2F * effVersusDiscr_dusg
Definition: EffPurFromHistos2D.h:87
dqm::legacy::DQMStore
Definition: DQMStore.h:727
EffPurFromHistos2D::effVersusDiscr_b
TH2F * effVersusDiscr_b
Definition: EffPurFromHistos2D.h:83
EffPurFromHistos2D
Definition: EffPurFromHistos2D.h:13
EffPurFromHistos2D::effVersusDiscr_d
TH2F * effVersusDiscr_d
Definition: EffPurFromHistos2D.h:79
EffPurFromHistos2D::fromDiscriminatorDistr
bool fromDiscriminatorDistr
Definition: EffPurFromHistos2D.h:65
EffPurFromHistos2D::startOutputY
double startOutputY
Definition: EffPurFromHistos2D.h:97
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HistoProviderDQM.h
EffPurFromHistos2D::doCTagPlots_
bool doCTagPlots_
Definition: EffPurFromHistos2D.h:68
EffPurFromHistos2D::doCTagPlots
bool doCTagPlots(bool Ctag)
Definition: EffPurFromHistos2D.h:57
EffPurFromHistos2D::compute
void compute(DQMStore::IBooker &ibook, std::vector< double > fixedEff)
Definition: EffPurFromHistos2D.cc:351
EffPurFromHistos2D::mcPlots_
unsigned int mcPlots_
Definition: EffPurFromHistos2D.h:67
FlavourHistograms2D
Definition: FlavourHistorgrams2D.h:28
EffPurFromHistos2D::plot
void plot(TPad *theCanvas=nullptr)
Definition: EffPurFromHistos2D.cc:231
EffPurFromHistos2D::label_
std::string label_
Definition: EffPurFromHistos2D.h:69
EffPurFromHistos2D::effVersusDiscr_c
TH2F * effVersusDiscr_c
Definition: EffPurFromHistos2D.h:82
EffPurFromHistos2D::~EffPurFromHistos2D
~EffPurFromHistos2D()
Definition: EffPurFromHistos2D.cc:203
EffPurFromHistos2D::discriminatorNoCutEffic
FlavourHistograms2D< double, double > & discriminatorNoCutEffic() const
Definition: EffPurFromHistos2D.h:54
anotherprimaryvertexanalyzer_cfi.nBinX
nBinX
Definition: anotherprimaryvertexanalyzer_cfi.py:12
EffPurFromHistos2D::nBinOutputX
int nBinOutputX
Definition: EffPurFromHistos2D.h:93
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EffPurFromHistos2D::endOutputX
double endOutputX
Definition: EffPurFromHistos2D.h:95
dqm::implementation::IBooker
Definition: DQMStore.h:43
EffPurFromHistos2D::histoExtension
std::string histoExtension
Definition: EffPurFromHistos2D.h:71
EffPurFromHistos2D::endOutputY
double endOutputY
Definition: EffPurFromHistos2D.h:98
EffPurFromHistos2D::effVersusDiscr_ni
TH2F * effVersusDiscr_ni
Definition: EffPurFromHistos2D.h:85
EffPurFromHistos2D::X_vs_Y_eff_at_fixedZeff
std::vector< MonitorElement * > X_vs_Y_eff_at_fixedZeff
Definition: EffPurFromHistos2D.h:100
label
const char * label
Definition: PFTauDecayModeTools.cc:11