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) :
122 const int& dimHistos = discrCfHistos.size();
128 const int& nBins = dDiscriminatorFC.
nBins();
131 for (
int iFlav = 0; iFlav < dimHistos; iFlav++ ) {
132 if (discrCfHistos[iFlav] == 0)
continue;
133 discrNoCutHistos[iFlav]->SetXTitle(
"Discriminant" );
134 discrNoCutHistos[iFlav]->GetXaxis()->SetTitleOffset( 0.75 );
138 const double& nJetsFlav = discrCfHistos[iFlav]->GetEntries();
139 double sum = discrCfHistos[iFlav]->GetBinContent( nBins+1 );
141 for (
int iDiscr = nBins; iDiscr > 0 ; --iDiscr ) {
143 discrNoCutHistos[iFlav]->SetBinContent( iDiscr, nJetsFlav );
144 discrNoCutHistos[iFlav]->SetBinError ( iDiscr,
sqrt(nJetsFlav) );
145 sum += discrCfHistos[iFlav]->GetBinContent( iDiscr );
146 discrCutHistos[iFlav]->SetBinContent( iDiscr, sum );
147 discrCutHistos[iFlav]->SetBinError ( iDiscr,
sqrt(sum) );
178 hX =
"FlavEffVsBEff";
182 hX =
"FlavEffVsCEff";
186 (
"Flavour misidentification vs. " + Title +
"-tagging efficiency " +
histoExtension).c_str());
195 bool btppColour =
true;
203 gPad->UseCurrentStyle();
204 gPad->SetFillColor( 0 );
220 float mSize = gPad->GetWh() * gPad->GetHNDC() / 500.;
353 ((nBins_d == nBins_u &&
354 nBins_d == nBins_s &&
355 nBins_d == nBins_c &&
356 nBins_d == nBins_b &&
357 nBins_d == nBins_g &&
358 nBins_d == nBins_ni &&
359 nBins_d == nBins_dus &&
360 nBins_d == nBins_dusg)||
361 (nBins_c == nBins_b &&
362 nBins_c == nBins_dusg &&
363 nBins_c == nBins_ni &&
364 nBins_c == nBins_pu) );
368 <<
"Input histograms do not all have the same number of bins!\n";
392 ((sBin_d == sBin_u &&
398 sBin_d == sBin_dus &&
399 sBin_d == sBin_dusg)||
401 sBin_c == sBin_dusg &&
403 sBin_c == sBin_pu) );
407 <<
"EffPurFromHistos::check() : Input histograms do not all have the same start bin!\n";
431 ((eBin_d == eBin_u &&
437 eBin_d == eBin_dus &&
438 eBin_d == eBin_dusg)||
440 eBin_c == eBin_dusg &&
442 eBin_c == eBin_pu) );
446 <<
"EffPurFromHistos::check() : Input histograms do not all have the same end bin!\n";
474 hX =
"FlavEffVsBEff_";
478 hX =
"FlavEffVsCEff_";
564 const int&
nBinX = EffFlavVsXEff->
getTH1F()->GetNbinsX();
566 for (
int iBinX = 1; iBinX <=
nBinX; iBinX++ ) {
568 const float& effXBinWidth = EffFlavVsXEff->
getTH1F()->GetBinWidth ( iBinX );
569 const float& effXMid = EffFlavVsXEff->
getTH1F()->GetBinCenter( iBinX );
570 const float& effXLeft = effXMid - 0.5*effXBinWidth;
571 const float& effXRight = effXMid + 0.5*effXBinWidth;
581 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
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)
void setEfficiencyFlag(void)
MonitorElement * EffFlavVsXEff_dus
double upperBound() const
bool fromDiscriminatorDistr
void psPlot(const std::string &name)
MonitorElement * EffFlavVsXEff_b
TH1F * effVersusDiscr_dus