11 #include <TVirtualPad.h>
64 fChi2(f.GetChisquare()),
93 for (
Int_t i = 0; i <
fN-1; i++) {
157 for (
Int_t i = 0; i <
fN-1; i++) {
180 fESigmaN(o.fESigmaN),
182 fQuality(o.fQuality),
186 fMaxWeight(o.fMaxWeight)
197 for (
Int_t i = 0; i <
fN-1; i++) {
218 if (&o ==
this)
return *
this;
237 if (fA)
delete [] fA;
238 if (fEA)
delete [] fEA;
242 if (fN <= 0)
return *
this;
245 for (
Int_t i = 0; i < fN; i++) {
257 if (fEA)
delete[] fEA;
284 if (fMaxWeight > 0)
return fMaxWeight;
289 for (
Int_t i = 0; i < n; i++, m++) {
292 if (fA[i] < leastWeight)
break;
293 if (fEA[i] / fA[i] > maxRelError)
break;
296 return fMaxWeight = m;
322 TMath::Min(maxN,
UShort_t(fN)), fA);
356 for (
Int_t i = 1; i <= n; i++) {
357 Double_t a = (i == 1 ? 1 : fA[i-1]);
358 if (fA[i-1] < 0)
break;
363 if (den <= 0)
return 1;
368 #define OUTPAR(N,V,E) \
369 std::setprecision(9) << \
370 std::setw(12) << N << ": " << \
371 std::setw(14) << V << " +/- " << \
372 std::setw(14) << E << " (" << \
373 std::setprecision(-1) << \
374 std::setw(5) << 100*(V>0?E/V:1) << "%)\n"
396 if (this->fQuality < other->fQuality)
return -1;
397 if (this->fQuality > other->
fQuality)
return +1;
398 Double_t chi2nu = (fNu == 0 ? 1000 : fChi2 / fNu);
400 if (TMath::Abs(chi2nu-1) < TMath::Abs(oChi2nu-1))
return +1;
401 if (TMath::Abs(chi2nu-1) > TMath::Abs(oChi2nu-1))
return -1;
402 if (fN > other->
fN)
return +1;
403 if (fN < other->fN)
return -1;
418 if (o.Contains(
"S", TString::kIgnoreCase)) {
419 Printf(
"%15s: q=%2d n=%1d chi2/nu=%6.3f",
420 GetName(), fQuality, fN, (fNu <= 0 ? 999 : fChi2 / fNu));
424 std::cout << GetName() <<
":\n"
425 <<
" chi^2/nu = " << fChi2 <<
"/" << fNu <<
" = "
426 << (fNu == 0 ? 999 : fChi2 / fNu) <<
"\n"
427 <<
" Quality: " << fQuality <<
"\n"
428 <<
" NParticles: " << fN <<
" (" << FindMaxWeight() <<
")\n"
429 <<
OUTPAR(
"Delta", fDelta, fEDelta)
430 <<
OUTPAR(
"xi", fXi, fEXi)
431 <<
OUTPAR(
"sigma", fSigma, fESigma)
432 <<
OUTPAR(
"sigma_n", fSigmaN, fESigmaN);
433 for (
Int_t i = 0; i < fN-1; i++)
434 std::cout <<
OUTPAR(Form(
"a%d", i+2), fA[i], fEA[i]);
435 std::cout << std::flush;
442 const Double_t upX = (max < 0 ? 10 : max);
443 Int_t maxW = FindMaxWeight();
448 fSigma, fSigmaN, maxW, fA, lowX, upX);
453 fDelta, fXi, fSigma, fSigmaN, i, lowX, upX);
465 if (!(f = GetF1(1,5)))
466 throw TString(
"Didn't TF1 object");
467 if (!(g =
new TGraph(f,
"i")))
468 throw TString(
"Failed to integrate function");
473 throw TString::Format(
"Invalid integral: %lf", total);
475 for (
Int_t i = 0; i < n; i++) {
476 Double_t prob = g->GetY()[i] / total;
483 throw TString::Format(
"Couldn't find x value for cut %lf", low);
486 AliWarningF(
"%s: %s", GetName(), str.Data());
505 return Form(
"FMD%d%c_etabin%03d", fDet, fRing, fBin);
518 Draw(b ? b->GetDrawOption() :
"comp values");
541 if (opt.Contains(
"COMP")) {
542 opt.ReplaceAll(
"COMP",
"");
545 if (opt.Contains(
"GOOD")) {
546 opt.ReplaceAll(
"GOOD",
"");
549 if (opt.Contains(
"VALUES")) {
550 opt.ReplaceAll(
"VALUES",
"");
553 if (opt.Contains(
"LEGEND")) {
554 opt.ReplaceAll(
"LEGEND",
"");
557 if (!opt.Contains(
"SAME")) {
560 if (opt.Contains(
"PEAK")) {
565 l =
new TLegend(.3, .5, .59, .94);
571 Int_t maxW = FindMaxWeight();
574 tot->SetLineColor(kBlack);
575 tot->SetLineWidth(2);
576 tot->SetLineStyle(1);
577 tot->SetTitle(GetName());
578 if (l) l->AddEntry(tot,
"Total",
"l");
582 if (!opt.Contains(
"SAME")) {
583 TH1* frame =
new TH1F(GetName(),
584 Form(
"FMD%d%c, eta bin %d",fDet,fRing,fBin),
586 frame->SetMinimum(max/10000);
587 frame->SetMaximum(max*1.4);
588 frame->SetXTitle(
"#Delta / #Delta_{mip}");
592 TF1* cpy = tot->DrawCopy(opt.Data());
600 TLatex* ltx1 =
new TLatex(x1, y,
"");
601 TLatex* ltx2 =
new TLatex(x2, y,
"");
603 ltx1->SetTextAlign(33);
604 ltx1->SetTextFont(132);
605 ltx1->SetTextSize(dy-.01);
607 ltx2->SetTextAlign(13);
608 ltx2->SetTextFont(132);
609 ltx2->SetTextSize(dy-.01);
611 ltx1->DrawLatex(x1, y,
"Quality");
612 ltx2->DrawLatex(x2, y, Form(
"%d", fQuality));
615 ltx1->DrawLatex(x1, y,
"#chi^{2}/#nu");
616 ltx2->DrawLatex(x2, y, Form(
"%7.3f", (fNu > 0 ? fChi2 / fNu : -1)));
619 const Char_t* pn[] = {
"C",
"#Delta",
"#xi",
"#sigma" };
620 Double_t pv[] = { fC, fDelta, fXi, fSigma };
621 Double_t pe[] = { fEC, fEDelta, fEXi, fESigma };
622 for (
Int_t i = 0; i < 4; i++) {
623 ltx1->DrawLatex(x1, y, pn[i]);
624 ltx2->DrawLatex(x2, y, Form(
"%6.4f#pm%6.4f", pv[i], pe[i]));
627 for (
Int_t i=2; i <= fN; i++) {
629 ltx1->SetTextColor(kRed+3);
630 ltx2->SetTextColor(kRed+3);
632 ltx1->DrawLatex(x1, y, Form(
"a_{%d}", i));
633 ltx2->DrawLatex(x2, y, Form(
"%6.4f#pm%6.4f", fA[i-2], fEA[i-2]));
640 TLine* pl =
new TLine(fDelta, 0.01*max, fDelta, 1.5*max);
642 pl->SetLineColor(kBlack);
652 for (
Int_t i=1; i <= fN; i++) {
653 if (good && i > maxW)
break;
659 f->SetLineStyle(i > maxW ? 2 : 1);
660 min = TMath::Min(f->GetMaximum(), min);
661 f->DrawCopy(opt.Data());
662 if (l) l->AddEntry(f, Form(
"%d MIP%s", i, (i>1 ?
"s" :
"")),
"l");
667 if (max <= 0) max = 0.1;
668 if (min <= 0) min = 1e-4;
669 cpy->SetMaximum(max);
670 cpy->SetMinimum(min);
671 cpy->GetHistogram()->SetMaximum(max);
672 cpy->GetHistogram()->SetMinimum(min);
673 cpy->GetHistogram()->GetYaxis()->SetRangeUser(min, max);
681 #define CHECKPAR(V,E,T) ((V > 0) && (E / V < T))
695 Bool_t includeSigma)
const
700 return fDelta - f * (fXi + (includeSigma ? fSigma : 0));
716 if (red < maxChi2nu) qual += 4;
718 Int_t q =
Int_t((maxChi2nu+decline - red) / decline * 4);
719 if (q > 0) qual += q;
722 if (
CHECKPAR(fDelta, fEDelta, maxRelError)) qual++;
723 if (
CHECKPAR(fXi, fEXi, maxRelError)) qual++;
724 if (
CHECKPAR(fSigma, fESigma, maxRelError)) qual++;
725 if (
CHECKPAR(fSigmaN, fESigmaN, maxRelError)) qual++;
727 if (fSigma > 4*fXi) qual -= 4;
728 if (fXi < 0.01) qual -= 2;
729 if (fSigma < 0.01) qual -= 2;
732 qual += FindMaxWeight(2*maxRelError, leastWeight, fN);
758 fEtaAxis(o.fEtaAxis.GetNbins(),o.fEtaAxis.GetXmin(),o.fEtaAxis.GetXmax()),
795 if (&o ==
this)
return *
this;
803 #define CACHE(BIN,IDX,OFFSET) fCache[IDX*OFFSET+BIN-1]
804 #define CACHEDR(BIN,D,R,OFFSET) \
805 CACHE(BIN,(D == 1 ? 0 : (D - 2) * 2 + 1 + (R=='I' || R=='i' ? 0 : 1)),OFFSET)
812 if (
fCache.GetSize() > 0)
return;
817 fCache.Set(nRings*offset);
820 for (
Int_t i = 0; i < nRings; i++) {
826 Int_t minBin = offset+1;
828 Int_t realMinBin = offset+1;
829 Int_t realMaxBin = -1;
830 for (
Int_t j = 1; j < ringArray->GetEntriesFast(); j++) {
836 realMinBin = TMath::Min(j, realMinBin);
837 realMaxBin = TMath::Max(j, realMaxBin);
843 if (minQuality > 0 && fit->
fQuality < minQuality)
continue;
847 CACHE(j,i,offset) = j;
848 minBin = TMath::Min(j, minBin);
849 maxBin = TMath::Max(j, maxBin);
851 AliInfoF(
"Out of %d bins, %d had fits, of which %d are good (%5.1f%%)",
852 offset, nFits, nGood, (nFits > 0 ? 100*
float(nGood)/nFits : 0));
855 realMinBin = TMath::Max(1, realMinBin-1);
856 realMaxBin = TMath::Min(offset, realMaxBin+1);
857 for (
Int_t j = realMinBin; j <= realMaxBin; j++) {
858 if (
CACHE(j,i,offset) > 0)
continue;
860 Int_t nK = TMath::Max(realMaxBin - j, j - realMinBin);
862 for (
Int_t k = 1; k <= nK; k++) {
865 if (left > realMinBin &&
866 CACHE(left,i,offset) == left) found = left;
867 else if (right < realMaxBin &&
868 CACHE(right,i,offset) == right) found = right;
869 if (found > 0)
break;
872 if (found)
CACHE(j,i,offset) =
CACHE(found,i,offset);
873 else AliWarningF(
"No fit found for etabin=%d in ring=%d", j, i);
895 AliWarning(
"No eta axis defined");
899 if (bin <= 0 || bin >
fEtaAxis.GetNbins())
return 0;
918 AliError(Form(
"Failed to make ring array for FMD%d%c", d, r));
921 if (etaBin <= 0 || etaBin >=
fEtaAxis.GetNbins()+1) {
922 AliError(Form(
"bin=%d is out of range [%d,%d]",
927 ringArray->AddAtAndExpand(fit, etaBin);
946 AliError(Form(
"eta=%f is out of range [%f,%f]",
951 return SetFit(d, r, bin, fit);
1000 if (!
SetFit(d, r, eta, e)) {
1009 Int_t quality,
const TF1& f)
1022 if (!
SetFit(d, r, eta, e)) {
1044 if (!ringArray)
return 0;
1045 if (etabin <= 0 || etabin >=
fEtaAxis.GetNbins())
return 0;
1046 if (etabin > ringArray->GetEntriesFast())
return 0;
1047 else if (etabin >= ringArray->GetEntriesFast()) etabin--;
1048 else if (!ringArray->At(etabin)) etabin++;
1049 return static_cast<ELossFit*
>(ringArray->At(etabin));
1067 return GetFit(d, r, etabin);
1086 if (etabin <= 0 || etabin >=
fEtaAxis.GetNbins()) {
1094 AliError(Form(
"Failed to make ring array for FMD%d%c", d, r));
1097 DMSG(fDebug, 10,
"Got ringArray %s for FMD%d%c", ringArray->GetName(), d, r);
1100 Int_t idx = (d == 1 ? 0 :
1101 (d - 2) * 2 + 1 + (r==
'I' || r==
'i' ? 0 : 1));
1105 if (bin < 0 || bin > ringArray->GetEntriesFast())
return 0;
1107 return static_cast<ELossFit*
>(ringArray->At(bin));
1126 return FindFit(d, r, etabin, minQ);
1134 case 2:
return (r ==
'i' || r ==
'I') ? 1 : 2;
1135 case 3:
return (r ==
'i' || r ==
'I') ? 3 : 4;
1155 if (idx < 0)
return 0;
1173 if (idx < 0)
return 0;
1174 if (idx >=
fRings.GetEntriesFast() || !
fRings.At(idx)) {
1177 a->SetName(Form(
"FMD%d%c", d, r));
1179 fRings.AddAtAndExpand(a, idx);
1190 if (!fit)
return -1024;
1199 if (bin <= 0)
return -1024;
1207 DGUARD(fDebug, 10,
"Get probability cut for FMD%d%c etabin=%d", d, r, etabin);
1209 if (!fit)
return -1024;
1217 DGUARD(fDebug, 10,
"Get probability cut for FMD%d%c eta=%8.4f", d, r, eta);
1219 DMSG(fDebug, 10,
"bin=%4d", bin);
1220 if (bin <= 0)
return -1024;
1227 Bool_t includeSigma)
const
1232 AliWarning(Form(
"No fit for FMD%d%c @ etabin=%d", d, r, etabin));
1243 Bool_t includeSigma)
const
1248 AliError(Form(
"eta=%f out of bounds for FMD%d%c", eta, d, r));
1251 return GetLowerBound(d, r, bin, f, showErrors, includeSigma);
1267 if (
fRings.GetEntries() <= 0) isGood =
false;
1270 while ((ringArray = static_cast<TObjArray*>(nextRing()))) {
1271 Char_t r = ringArray->GetName()[4];
1279 if (iEta > ringArray->GetEntriesFast()) {
1280 max = TMath::Max(gap, max);
1283 TObject* o = ringArray->At(iEta);
1285 if (!first) { gap++; len++; }
1297 max = TMath::Max(max, gap);
1301 Int_t min = (r ==
'I' ? minInner : minOuter);
1303 if (rate < minRate) thisGood =
false;
1304 if (len < min) thisGood =
false;
1305 if (max > maxGap) thisGood =
false;
1306 if (!thisGood) isGood =
false;
1308 Printf(
"%s: %2d/%2d=%5.1f%%%-2s%5.1f%% good (%d) fits (%-2s %2d) "
1309 "max gap %2d (%-2s %2d) -> %s",
1310 ringArray->GetName(), good, len, 100*rate,
1311 (rate < minRate ?
"<" :
">="), 100*minRate,
1313 (len < min ?
"<" :
">="), min, max,
1314 (max > maxGap ?
">" :
"<="), maxGap,
1315 (thisGood ?
"good" :
"bad"));
1327 TH1D* MakeHist(
const TAxis& axis,
const char* name,
const char*
title,
1330 TH1D* h =
new TH1D(Form(
"%s_%s", name, title),
1331 Form(
"%s %s", name, title),
1332 axis.GetNbins(), axis.GetXmin(), axis.GetXmax());
1334 h->SetMarkerStyle(20);
1335 h->SetMarkerColor(color);
1336 h->SetMarkerSize(0.5);
1337 h->SetFillColor(color);
1338 h->SetFillStyle(3001);
1339 h->SetLineColor(color);
1346 #define IDX2RING(I) (i == 0 || i == 1 || i == 3 ? 'I' : 'O')
1347 #define IDX2DET(I) (i == 0 ? 1 : (i == 1 || i == 2 ? 2 : 3))
1376 stacks->AddAt(sChi2nu=
new THStack(
"chi2",
"#chi^{2}/#nu"), kChi2nu);
1377 stacks->AddAt(sC =
new THStack(
"c",
"C"), kC);
1378 stacks->AddAt(sDelta =
new THStack(
"delta",
"#Delta_{mp}"), kDelta);
1379 stacks->AddAt(sXi =
new THStack(
"xi",
"#xi"), kXi);
1380 stacks->AddAt(sSigma =
new THStack(
"sigma",
"#sigma"), kSigma);
1382 stacks->AddAt(n =
new THStack(
"n",
"N"), kN);
1384 sChi2nu->SetName(
"qual");
1385 sChi2nu->SetTitle(
"Quality");
1387 n->SetTitle(
"Bin map");
1389 for (
Int_t i = 1; i <= maxN; i++) {
1390 stacks->AddAt(
new THStack(Form(
"a_%02d", i+1), Form(
"a_{%d}", i+1)), kN+i);
1398 for (
Int_t i = 0; i < nRings; i++) {
1399 if (!
fRings.At(i))
continue;
1401 Int_t nFits = a->GetEntriesFast();
1414 for (
Int_t j = 0; j < maxN; j++) hA[j] = 0;
1415 const char* ho = (rel || !err ?
"hist" :
"e");
1416 sChi2nu->Add(hChi,
"hist");
1418 sDelta ->Add(hDelta, ho);
1420 sSigma ->Add(hSigma, ho);
1422 n ->Add(hN,
"hist");
1423 hChi->SetFillColor(color);
1424 hChi->SetFillStyle(3001);
1425 hN->SetFillColor(color);
1426 hN->SetFillStyle(3001);
1428 for (
Int_t k = 1; k <= maxN; k++) {
1429 hA[k-1] = MakeHist(
fEtaAxis,a->GetName(), Form(
"a%02d",k+1),
color);
1430 static_cast<THStack*
>(stacks->At(kN+k))->Add(hA[k-1], ho);
1438 UpdateStackHist(f, rel, j, hChi, hN, hC, hDelta, hXi, hSigma, maxN, hA);
1442 for (
Int_t j = 0; j < nFits; j++) {
1447 hChi, hN, hC, hDelta, hXi, hSigma, maxN, hA);
1471 hChi ->SetBinContent(b, chi2nu);
1472 hN ->SetBinContent(b, w);
1473 hC ->SetBinContent(b, c);
1474 hDelta ->SetBinContent(b, delta);
1475 hXi ->SetBinContent(b, xi);
1476 hSigma ->SetBinContent(b, sigma);
1479 hC ->SetBinError(b, f->
fEC);
1480 hDelta ->SetBinError(b, f->
fEDelta);
1481 hXi ->SetBinError(b, f->
fEXi);
1482 hSigma ->SetBinError(b, f->
fESigma);
1485 for (
Int_t k = 0; k < f->
fN-1 && k < maxN; k++) {
1487 hA[k]->SetBinContent(b, a);
1488 if (!rel) hA[k]->SetBinError(b, f->
fEA[k]);
1503 TString opt(Form(
"nostack %s", option));
1505 Bool_t rel = (opt.Contains(
"relative"));
1506 Bool_t err = (opt.Contains(
"error"));
1507 Bool_t clr = (opt.Contains(
"clear"));
1508 Bool_t gdd = (opt.Contains(
"good"));
1509 if (rel) opt.ReplaceAll(
"relative",
"");
1510 if (err) opt.ReplaceAll(
"error",
"");
1511 if (clr) opt.ReplaceAll(
"clear",
"");
1512 if (gdd) opt.ReplaceAll(
"good",
"");
1516 for (
Int_t i = 0; i < nRings; i++) {
1517 if (!
fRings.At(i))
continue;
1519 Int_t nFits = a->GetEntriesFast();
1521 for (
Int_t j = 0; j < nFits; j++) {
1528 Int_t nPad = 6+maxN-1;
1529 TVirtualPad* pad = gPad;
1532 pad->SetTopMargin(0.02);
1533 pad->SetRightMargin(0.02);
1534 pad->SetBottomMargin(0.15);
1535 pad->SetLeftMargin(0.10);
1537 pad->Divide(2, (nPad+1)/2, 0.1, 0, 0);
1541 Int_t nPad2 = (nPad+1) / 2;
1542 for (
Int_t i = 0; i < nPad; i++) {
1543 Int_t iPad = 1 + i/nPad2 + 2 * (i % nPad2);
1544 TVirtualPad* p = pad->cd(iPad);
1545 p->SetLeftMargin(.15);
1550 if (rel && i != 0 && i != 6 && i != 5 && i != 4) p->SetLogy();
1553 THStack* stack =
static_cast<THStack*
>(stacks->At(i));
1554 if (!stack->GetHists() || stack->GetHists()->GetEntries() <= 0) {
1555 AliWarningF(
"No histograms in %s", stack->GetName());
1564 stack->Draw(opt.Data());
1566 TString tit(stack->GetTitle());
1567 if (rel && i != 0 && i != 5)
1568 tit = Form(
"#delta %s/%s", tit.Data(), tit.Data());
1569 TH1* hist = stack->GetHistogram();
1570 TAxis* yaxis = hist->GetYaxis();
1571 yaxis->SetTitle(tit.Data());
1572 yaxis->SetTitleSize(0.15);
1573 yaxis->SetLabelSize(0.08);
1574 yaxis->SetTitleOffset(0.35);
1575 yaxis->SetTitleFont(132);
1576 yaxis->SetLabelFont(132);
1577 yaxis->SetNdivisions(5);
1580 TAxis* xaxis = stack->GetHistogram()->GetXaxis();
1581 xaxis->SetTitle(
"#eta");
1582 xaxis->SetTitleSize(0.15);
1583 xaxis->SetLabelSize(0.08);
1584 xaxis->SetTitleOffset(0.35);
1585 xaxis->SetTitleFont(132);
1586 xaxis->SetLabelFont(132);
1587 xaxis->SetNdivisions(10);
1589 stack->Draw(opt.Data());
1609 bool recurse = opt.Contains(
"R");
1610 bool cache = opt.Contains(
"C") &&
fCache.GetSize() > 0;
1613 std::cout <<
"Low cut in fit range: " <<
fLowCut <<
"\n"
1614 <<
"Eta axis: " << nBins
1615 <<
" bins, range [" <<
fEtaAxis.GetXmin() <<
","
1616 <<
fEtaAxis.GetXmax() <<
"]" << std::endl;
1618 for (
Int_t i = 0; i < nRings; i++) {
1619 if (!
fRings.At(i))
continue;
1621 Int_t nFits = a->GetEntriesFast();
1623 std::cout << a->GetName() <<
" [" << nFits <<
" entries]"
1624 << (recurse ?
":\n" :
"\t");
1627 for (
Int_t j = 0; j < nFits; j++) {
1628 if (!a->At(j))
continue;
1630 min = TMath::Min(j, min);
1631 max = TMath::Max(j, max);
1634 std::cout <<
"Bin # " << j <<
"\t";
1640 std::cout <<
" bin range: " << std::setw(3) << min
1641 <<
"-" << std::setw(3) << max <<
" " << std::setw(3)
1642 << (max-min+1) <<
" bins" << std::endl;
1647 std::cout <<
" eta bin | Fit bin \n"
1648 <<
" # range | FMD1i FMD2i FMD2o FMD3i FMD3o"
1651 size_t oldPrec = std::cout.precision();
1652 std::cout.precision(3);
1653 for (
Int_t i = 1; i <= nBins; i++) {
1654 std::cout << std::setw(4) << i <<
" "
1655 << std::setw(5) << std::showpos <<
fEtaAxis.GetBinLowEdge(i)
1656 <<
" - " << std::setw(5) <<
fEtaAxis.GetBinUpEdge(i)
1657 << std::noshowpos <<
" | ";
1658 for (
Int_t j = 0; j < 5; j++) {
1660 if (bin <= 0) std::cout <<
" ";
1661 else std::cout << std::setw(5) << bin
1662 << (bin == i ?
' ' :
'*') <<
' ';
1664 std::cout << std::endl;
1666 std::cout.precision(oldPrec);
return jsonbuilder str().c_str()
Bool_t SetFit(UShort_t d, Char_t r, Double_t eta, Int_t quality, const TF1 &f)
void UpdateStackHist(ELossFit *f, Bool_t rel, Int_t used, TH1 *hChi, TH1 *hN, TH1 *hC, TH1 *hDelta, TH1 *hXi, TH1 *hSigma, Int_t maxN, TH1 **hA) const
Double_t GetLowerBound(Double_t f, Bool_t includeSigma) const
static TF1 * MakeFn(Double_t c, Double_t delta, Double_t xi, Double_t sigma, Double_t sigma_n, Int_t n, const Double_t *a, Double_t xmin, Double_t xmax)
TObjArray * GetOrMakeRingArray(UShort_t d, Char_t r)
#define CACHE(BIN, IDX, OFFSET)
virtual ~AliFMDCorrELossFit()
ELossFit * FindFit(UShort_t d, Char_t r, Double_t eta, UShort_t minQ) const
#define DMSG(L, N, F,...)
void Print(Option_t *option="R") const
static TF1 * MakeF1(Double_t c, Double_t delta, Double_t xi, Double_t sigma, Double_t sigma_n, Double_t xmin, Double_t xmax)
void CalculateQuality(Double_t maxChi2nu=fgMaxChi2nu, Double_t maxRelError=fgMaxRelError, Double_t leastWeight=fgLeastWeight)
static Double_t Fn(Double_t x, Double_t delta, Double_t xi, Double_t sigma, Double_t sigma_n, Int_t n, const Double_t *a)
void CacheBins(UShort_t minQuality=kDefaultQuality) const
Declaration and implementation of Landau-Gauss distributions.
void Draw(Option_t *option="comp")
#define CACHEDR(BIN, D, R, OFFSET)
Double_t Evaluate(Double_t x, UShort_t maxN=999) const
Double_t FindProbabilityCut(Double_t low) const
Double_t GetLowerBound(UShort_t d, Char_t r, Int_t etaBin, Double_t f) const
static Color_t RingColor(UShort_t d, Char_t r)
Bool_t IsGood(Bool_t verbose=true, Double_t minRate=.7, Int_t maxGap=3, Int_t minInner=25, Int_t minOuter=15, Int_t minQuality=kDefaultQuality)
TObjArray * GetRingArray(UShort_t d, Char_t r) const
Int_t Compare(const TObject *o) const
Int_t FindEtaBin(Double_t eta) const
static Double_t fgMaxRelError
Cached maximum weight.
void Print(Option_t *option) const
ELossFit & operator=(const ELossFit &o)
Various utilities used in PWGLF/FORWARD.
static TF1 * MakeFi(Double_t c, Double_t delta, Double_t xi, Double_t sigma, Double_t sigma_n, Int_t i, Double_t xmin, Double_t xmax)
#define DGUARD(L, N, F,...)
void SetEtaAxis(const TAxis &axis)
TList * GetStacks(Bool_t err, Bool_t rel, Bool_t good, UShort_t maxN=5) const
const Char_t * GetName() const
ELossFit * GetFit(UShort_t d, Char_t r, Double_t eta) const
void Draw(Option_t *option="")
static Bool_t EnableSigmaShift(Short_t val=-1)
static Double_t fgMaxChi2nu
static Double_t Fi(Double_t x, Double_t delta, Double_t xi, Double_t sigma, Double_t sigma_n, Int_t i)
Double_t EvaluateWeighted(Double_t x, UShort_t maxN=9999) const
AliFMDCorrELossFit & operator=(const AliFMDCorrELossFit &o)
TF1 * GetF1(Int_t i=0, Double_t max=20) const
#define CHECKPAR(V, E, T)
Int_t GetRingIndex(UShort_t d, Char_t r) const
static Double_t fgLeastWeight
Int_t FindMaxWeight(Double_t maxRelError=2 *fgMaxRelError, Double_t leastWeight=fgLeastWeight, UShort_t maxN=999) const