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),
71 std::make_unique<FlavourHistograms<double>>(
"totalEntries" +
histoExtension,
73 dDiscriminatorFC.
nBins(),
87 std::make_unique<FlavourHistograms<double>>(
"effVsDiscrCut" +
histoExtension,
89 dDiscriminatorFC.
nBins(),
164 const int& dimHistos = discrCfHistos.size();
173 for (
int iFlav = 0; iFlav < dimHistos; iFlav++) {
174 if (discrCfHistos[iFlav] ==
nullptr)
176 discrNoCutHistos[iFlav]->SetXTitle(
"Discriminant");
177 discrNoCutHistos[iFlav]->GetXaxis()->SetTitleOffset(0.75);
181 const double& nJetsFlav = discrCfHistos[iFlav]->GetEntries();
182 double sum = discrCfHistos[iFlav]->GetBinContent(
nBins + 1);
184 for (
int iDiscr =
nBins; iDiscr > 0; --iDiscr) {
186 discrNoCutHistos[iFlav]->SetBinContent(iDiscr, nJetsFlav);
187 discrNoCutHistos[iFlav]->SetBinError(iDiscr,
sqrt(nJetsFlav));
188 sum += discrCfHistos[iFlav]->GetBinContent(iDiscr);
189 discrCutHistos[iFlav]->SetBinContent(iDiscr, sum);
190 discrCutHistos[iFlav]->SetBinError(iDiscr,
sqrt(sum));
215 hX =
"FlavEffVsBEff";
218 hX =
"FlavEffVsCEff";
222 (
"Flavour misidentification vs. " + Title +
"-tagging efficiency " +
histoExtension).c_str());
230 bool btppColour =
true;
238 gPad->UseCurrentStyle();
239 gPad->SetFillColor(0);
255 float mSize = gPad->GetWh() * gPad->GetHNDC() / 500.;
384 const bool& lNBins = ((nBins_d == nBins_u && nBins_d == nBins_s && nBins_d == nBins_c && nBins_d == nBins_b &&
385 nBins_d == nBins_g && nBins_d == nBins_ni && nBins_d == nBins_dus && nBins_d == nBins_dusg) ||
386 (nBins_c == nBins_b && nBins_c == nBins_dusg && nBins_c == nBins_ni && nBins_c == nBins_pu));
389 throw cms::Exception(
"Configuration") <<
"Input histograms do not all have the same number of bins!\n";
411 const bool& lSBin = ((sBin_d == sBin_u && sBin_d == sBin_s && sBin_d == sBin_c && sBin_d == sBin_b &&
412 sBin_d == sBin_g && sBin_d == sBin_ni && sBin_d == sBin_dus && sBin_d == sBin_dusg) ||
413 (sBin_c == sBin_b && sBin_c == sBin_dusg && sBin_c == sBin_ni && sBin_c == sBin_pu));
417 <<
"EffPurFromHistos::check() : Input histograms do not all have the same start bin!\n";
439 const bool& lEBin = ((eBin_d == eBin_u && eBin_d == eBin_s && eBin_d == eBin_c && eBin_d == eBin_b &&
440 eBin_d == eBin_g && eBin_d == eBin_ni && eBin_d == eBin_dus && eBin_d == eBin_dusg) ||
441 (eBin_c == eBin_b && eBin_c == eBin_dusg && eBin_c == eBin_ni && eBin_c == eBin_pu));
445 <<
"EffPurFromHistos::check() : Input histograms do not all have the same end bin!\n";
469 hX =
"FlavEffVsBEff_";
472 hX =
"FlavEffVsCEff_";
557 const int&
nBinX = EffFlavVsXEff->
getTH1F()->GetNbinsX();
559 for (
int iBinX = 1; iBinX <=
nBinX; iBinX++) {
561 const float& effXBinWidth = EffFlavVsXEff->
getTH1F()->GetBinWidth(iBinX);
562 const float& effXMid = EffFlavVsXEff->
getTH1F()->GetBinCenter(iBinX);
563 const float& effXLeft = effXMid - 0.5 * effXBinWidth;
564 const float& effXRight = effXMid + 0.5 * effXBinWidth;
574 const bool& binFound = (binClosest > 0);