18 TH1F * h_s, TH1F * h_c, TH1F * h_b, TH1F * h_g, TH1F * h_ni,
19 TH1F * h_dus, TH1F * h_dusg, TH1F * h_pu,
21 int nBin,
double startO,
double endO) :
22 fromDiscriminatorDistr(
false),
23 mcPlots_(mc), doCTagPlots_(
false), label_(label),
24 histoExtension(ext), effVersusDiscr_d(h_d), effVersusDiscr_u(h_u),
25 effVersusDiscr_s(h_s), effVersusDiscr_c(h_c), effVersusDiscr_b(h_b),
26 effVersusDiscr_g(h_g), effVersusDiscr_ni(h_ni), effVersusDiscr_dus(h_dus),
27 effVersusDiscr_dusg(h_dusg), effVersusDiscr_pu(h_pu),
28 nBinOutput(nBin), startOutput(startO), endOutput(endO)
36 double startO,
double endO) :
124 const int& dimHistos = discrCfHistos.size();
130 const int& nBins = dDiscriminatorFC->
nBins();
133 for (
int iFlav = 0; iFlav < dimHistos; iFlav++ ) {
134 if (discrCfHistos[iFlav] == 0)
continue;
135 discrNoCutHistos[iFlav]->SetXTitle (
"Discriminant" );
136 discrNoCutHistos[iFlav]->GetXaxis()->SetTitleOffset ( 0.75 );
140 const double& nJetsFlav = discrCfHistos[iFlav]->GetEntries ();
141 double sum = discrCfHistos[iFlav]->GetBinContent( nBins+1 );
143 for (
int iDiscr = nBins; iDiscr > 0 ; --iDiscr ) {
145 discrNoCutHistos[iFlav]->SetBinContent ( iDiscr, nJetsFlav );
146 discrNoCutHistos[iFlav]->SetBinError ( iDiscr,
sqrt(nJetsFlav) );
147 sum += discrCfHistos[iFlav]->GetBinContent( iDiscr );
148 discrCutHistos[iFlav]->SetBinContent ( iDiscr, sum );
149 discrCutHistos[iFlav]->SetBinError ( iDiscr,
sqrt(sum) );
180 hX =
"FlavEffVsBEff";
184 hX =
"FlavEffVsCEff";
188 (
"Flavour misidentification vs. " + Title +
"-tagging efficiency " +
histoExtension).c_str());
197 bool btppColour =
true;
205 gPad->UseCurrentStyle();
206 gPad->SetFillColor ( 0 );
208 gPad->SetGridx ( 1 );
209 gPad->SetGridy ( 1 );
222 float mSize = gPad->GetWh() * gPad->GetHNDC() / 500.;
355 ( (nBins_d == nBins_u &&
356 nBins_d == nBins_s &&
357 nBins_d == nBins_c &&
358 nBins_d == nBins_b &&
359 nBins_d == nBins_g &&
360 nBins_d == nBins_ni &&
361 nBins_d == nBins_dus &&
362 nBins_d == nBins_dusg)||
363 (nBins_c == nBins_b &&
364 nBins_c == nBins_dusg &&
365 nBins_c == nBins_ni &&
366 nBins_c == nBins_pu) );
370 <<
"Input histograms do not all have the same number of bins!\n";
394 ( (sBin_d == sBin_u &&
400 sBin_d == sBin_dus &&
401 sBin_d == sBin_dusg)||
403 sBin_c == sBin_dusg &&
405 sBin_c == sBin_pu) );
409 <<
"EffPurFromHistos::check() : Input histograms do not all have the same start bin!\n";
433 ( (eBin_d == eBin_u &&
439 eBin_d == eBin_dus &&
440 eBin_d == eBin_dusg)||
442 eBin_c == eBin_dusg &&
444 eBin_c == eBin_pu) );
448 <<
"EffPurFromHistos::check() : Input histograms do not all have the same end bin!\n";
476 hX =
"FlavEffVsBEff_";
480 hX =
"FlavEffVsCEff_";
567 const int&
nBinX = EffFlavVsXEff->
getTH1F()->GetNbinsX();
569 for (
int iBinX = 1; iBinX <=
nBinX; iBinX++ ) {
571 const float& effXBinWidth = EffFlavVsXEff->
getTH1F()->GetBinWidth ( iBinX );
572 const float& effXMid = EffFlavVsXEff->
getTH1F()->GetBinCenter ( iBinX );
573 const float& effXLeft = effXMid - 0.5*effXBinWidth;
574 const float& effXRight = effXMid + 0.5*effXBinWidth;
585 const bool& binFound = ( binClosest > 0 ) ;
double lowerBound() const
std::unique_ptr< FlavourHistograms< double > > discrNoCutEffic
void epsPlot(const std::string &name)
MonitorElement * EffFlavVsXEff_s
void compute(DQMStore::IBooker &ibook)
MonitorElement * EffFlavVsXEff_u
MonitorElement * EffFlavVsXEff_g
int findBinClosestYValue(const TH1F *, const float &yVal, const float &yLow, const float &yHigh)
MonitorElement * EffFlavVsXEff_d
std::string baseNameDescription() const
MonitorElement * EffFlavVsXEff_ni
std::vector< TH1F * > getHistoVector() const
MonitorElement * EffFlavVsXEff_c
std::unique_ptr< FlavourHistograms< double > > discrCutEfficScan
virtual MonitorElement * book1D(const std::string &name, const std::string &title, const int &nchX, const double &lowX, const double &highX)
MonitorElement * EffFlavVsXEff_pu
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
void plot(TPad *theCanvas=0)
std::string baseNameTitle() const
TH1F * effVersusDiscr_dusg
std::string histoExtension
TH1F * getTH1F(void) const
MonitorElement * EffFlavVsXEff_dusg
void setEfficiencyFlag(void)
MonitorElement * EffFlavVsXEff_dus
double upperBound() const
bool fromDiscriminatorDistr
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)
MonitorElement * EffFlavVsXEff_b
TH1F * effVersusDiscr_dus