28 htemp = (TH1F*) gPad->GetPrimitive(
"htemp");
29 Double_t XMin = htemp->GetXaxis()->GetBinLowEdge(1);
30 Int_t NBins = htemp->GetNbinsX();
31 Double_t XMax = htemp->GetXaxis()->GetBinLowEdge(NBins) + htemp->GetXaxis()->GetBinWidth(NBins);
33 htemp = (TH1F*) gPad->GetPrimitive(
"htemp");
34 Double_t checkM = htemp->GetXaxis()->GetBinLowEdge(1);
37 NBins = htemp->GetNbinsX();
38 checkM = htemp->GetXaxis()->GetBinLowEdge(NBins) + htemp->GetXaxis()->GetBinWidth(NBins);
49 const Int_t numPoints = NumBins + 1;
50 Double_t XVals[numPoints];
51 Double_t RevXVals[numPoints];
52 Double_t YVals[numPoints];
53 Double_t RevYVals[numPoints];
55 Double_t sigArea = theHists[0]->Integral();
56 Double_t backArea = theHists[1]->Integral();
58 for (Int_t iPoint = 0; iPoint < numPoints; iPoint++) {
59 XVals[iPoint] = theHists[0]->Integral(iPoint, numPoints)/sigArea;
60 RevXVals[iPoint] = theHists[0]->Integral(0, numPoints-iPoint)/sigArea;
61 YVals[iPoint] = theHists[1]->Integral(iPoint, numPoints)/backArea;
62 RevYVals[iPoint] = theHists[1]->Integral(0, numPoints-iPoint)/backArea;
66 for (Int_t iPoint = 0; iPoint < numPoints; iPoint++) {
67 XVals[iPoint] = theHists[0]->GetXaxis()->GetBinLowEdge(iPoint);
68 RevXVals[iPoint] = theHists[0]->GetXaxis()->GetBinLowEdge(iPoint);
70 sigArea = theHists[0]->Integral(iPoint, numPoints);
71 backArea = theHists[1]->Integral(iPoint, numPoints);
72 YVals[iPoint] = (backArea + sigArea == 0) ? 0 : sigArea / sqrt(sigArea + backArea);
74 sigArea = theHists[0]->Integral(0, numPoints - iPoint);
75 backArea = theHists[1]->Integral(0, numPoints - iPoint);
76 YVals[iPoint] = (backArea + sigArea == 0) ? 0 : sigArea / sqrt(sigArea + backArea);
80 TGraph *rocCurve =
new TGraph(numPoints, XVals, YVals);
81 TGraph *revRocCurve =
new TGraph(numPoints, RevXVals, RevYVals);
86 if (revRocCurve->Integral() > rocCurve->Integral()) {
100 std::vector<TGraph*> theGraphs;
101 for (UInt_t i0 = 0; i0 <
fROCVars.size(); i0++)
110 TString YLabel, Bool_t logY, Bool_t logX)
115 std::vector<TGraph*> rocs =
MakeROCs(NumBins);
116 BaseCanvas(FileBase, rocs, XLabel, YLabel, logY, logX);
118 for (UInt_t i0 = 0; i0 != rocs.size(); ++i0)