32 : fromDiscriminatorDistr(
false),
37 effVersusDiscr_d(h_d),
38 effVersusDiscr_u(h_u),
39 effVersusDiscr_s(h_s),
40 effVersusDiscr_c(h_c),
41 effVersusDiscr_b(h_b),
42 effVersusDiscr_g(h_g),
43 effVersusDiscr_ni(h_ni),
44 effVersusDiscr_dus(h_dus),
45 effVersusDiscr_dusg(h_dusg),
46 effVersusDiscr_pu(h_pu),
61 : fromDiscriminatorDistr(
true),
72 dDiscriminatorFC.
nBins(),
87 dDiscriminatorFC.
nBins(),
162 const int& dimHistos = discrCfHistos.size();
171 for (
int iFlav = 0; iFlav < dimHistos; iFlav++) {
172 if (discrCfHistos[iFlav] ==
nullptr)
174 discrNoCutHistos[iFlav]->SetXTitle(
"Discriminant");
175 discrNoCutHistos[iFlav]->GetXaxis()->SetTitleOffset(0.75);
179 const double& nJetsFlav = discrCfHistos[iFlav]->GetEntries();
180 double sum = discrCfHistos[iFlav]->GetBinContent(
nBins + 1);
182 for (
int iDiscr =
nBins; iDiscr > 0; --iDiscr) {
184 discrNoCutHistos[iFlav]->SetBinContent(iDiscr, nJetsFlav);
185 discrNoCutHistos[iFlav]->SetBinError(iDiscr,
sqrt(nJetsFlav));
186 sum += discrCfHistos[iFlav]->GetBinContent(iDiscr);
187 discrCutHistos[iFlav]->SetBinContent(iDiscr, sum);
188 discrCutHistos[iFlav]->SetBinError(iDiscr,
sqrt(sum));
213 hX =
"FlavEffVsBEff";
216 hX =
"FlavEffVsCEff";
220 (
"Flavour misidentification vs. " + Title +
"-tagging efficiency " +
histoExtension).c_str());
228 bool btppColour =
true;
236 gPad->UseCurrentStyle();
237 gPad->SetFillColor(0);
253 float mSize = gPad->GetWh() * gPad->GetHNDC() / 500.;
382 const bool& lNBins = ((nBins_d == nBins_u && nBins_d == nBins_s && nBins_d == nBins_c && nBins_d == nBins_b &&
383 nBins_d == nBins_g && nBins_d == nBins_ni && nBins_d == nBins_dus && nBins_d == nBins_dusg) ||
384 (nBins_c == nBins_b && nBins_c == nBins_dusg && nBins_c == nBins_ni && nBins_c == nBins_pu));
387 throw cms::Exception(
"Configuration") <<
"Input histograms do not all have the same number of bins!\n";
409 const bool& lSBin = ((sBin_d == sBin_u && sBin_d == sBin_s && sBin_d == sBin_c && sBin_d == sBin_b &&
410 sBin_d == sBin_g && sBin_d == sBin_ni && sBin_d == sBin_dus && sBin_d == sBin_dusg) ||
411 (sBin_c == sBin_b && sBin_c == sBin_dusg && sBin_c == sBin_ni && sBin_c == sBin_pu));
415 <<
"EffPurFromHistos::check() : Input histograms do not all have the same start bin!\n";
437 const bool& lEBin = ((eBin_d == eBin_u && eBin_d == eBin_s && eBin_d == eBin_c && eBin_d == eBin_b &&
438 eBin_d == eBin_g && eBin_d == eBin_ni && eBin_d == eBin_dus && eBin_d == eBin_dusg) ||
439 (eBin_c == eBin_b && eBin_c == eBin_dusg && eBin_c == eBin_ni && eBin_c == eBin_pu));
443 <<
"EffPurFromHistos::check() : Input histograms do not all have the same end bin!\n";
467 hX =
"FlavEffVsBEff_";
470 hX =
"FlavEffVsCEff_";
555 const int&
nBinX = EffFlavVsXEff->
getTH1F()->GetNbinsX();
557 for (
int iBinX = 1; iBinX <=
nBinX; iBinX++) {
559 const float& effXBinWidth = EffFlavVsXEff->
getTH1F()->GetBinWidth(iBinX);
560 const float& effXMid = EffFlavVsXEff->
getTH1F()->GetBinCenter(iBinX);
561 const float& effXLeft = effXMid - 0.5 * effXBinWidth;
562 const float& effXRight = effXMid + 0.5 * effXBinWidth;
572 const bool& binFound = (binClosest > 0);