26 const Int_t nHars = 4;
27 const Int_t nSels = 2;
28 const Int_t nSubs = 2;
31 char fileNumber[4] =
"x";
38 TCanvas* plot(Int_t pageNumber=0, Int_t selN=0, Int_t harN=0){
39 gInterpreter->ProcessLine(
".O0");
41 Bool_t includeFtpc = kTRUE;
42 Bool_t reCent = kFALSE;
44 bool multiGraph = kFALSE;
45 bool singleGraph = kFALSE;
46 if (selN == 0) multiGraph = kTRUE;
48 TCanvas* cOld = (TCanvas*)gROOT->GetListOfCanvases();
49 if (cOld) cOld->Delete();
52 gROOT->SetStyle(
"Bold");
54 gStyle->SetOptStat(10);
55 gStyle->SetPalette(1);
59 const char* baseName1[] = {
64 "Flow_EtaSymVerZ2D_Tpc",
66 "Flow_EtaSymVerZ2D_Ftpc",
77 "Flow_DcaGlobal_Ftpc",
84 "Flow_FitOverMax_Tpc",
87 "Flow_FitOverMax_Ftpc",
89 "Flow_EtaPtPhi2D.PhiEta",
90 "Flow_EtaPtPhi2D.PhiPt",
100 "Flow_MeanDedxNeg2D",
112 "Flow_Phi_FarEast_Sel",
113 "Flow_Phi_Flat_FarEast_Sel",
115 "Flow_Phi_Flat_East_Sel",
117 "Flow_Phi_Flat_West_Sel",
118 "Flow_Phi_FarWest_Sel",
119 "Flow_Phi_Flat_FarWest_Sel",
120 "Flow_Phi_FtpcFarEast_Sel",
121 "Flow_Phi_Flat_FtpcFarEast_Sel",
122 "Flow_Phi_FtpcEast_Sel",
123 "Flow_Phi_Flat_FtpcEast_Sel",
124 "Flow_Phi_FtpcWest_Sel",
125 "Flow_Phi_Flat_FtpcWest_Sel",
126 "Flow_Phi_FtpcFarWest_Sel",
127 "Flow_Phi_Flat_FtpcFarWest_Sel",
130 "Flow_Yield.Eta_Sel",
136 "Flow_Psi_Sub_Corr_Sel",
137 "Flow_Psi_Sub_Corr_Diff_Sel",
148 "Flow_vObs2D_ScalarProd_Sel",
149 "Flow_v2D_ScalarProd_Sel",
150 "Flow_vEta_ScalarProd_Sel",
151 "Flow_vPt_ScalarProd_Sel"
154 const char* baseName2[] = {
159 "Flow_EtaSymVerZ2D_Tpc",
169 "Flow_DcaGlobal_Tpc",
173 "Flow_FitOverMax_Tpc",
175 "Flow_EtaPtPhi2D.PhiEta",
176 "Flow_EtaPtPhi2D.PhiPt",
181 "Flow_YieldPart.Eta",
198 "Flow_Phi_FarEast_Sel",
199 "Flow_Phi_Flat_FarEast_Sel",
201 "Flow_Phi_Flat_East_Sel",
203 "Flow_Phi_Flat_West_Sel",
204 "Flow_Phi_FarWest_Sel",
205 "Flow_Phi_Flat_FarWest_Sel",
208 "Flow_Yield.Eta_Sel",
214 "Flow_Psi_Sub_Corr_Sel",
215 "Flow_Psi_Sub_Corr_Diff_Sel",
226 "Flow_vObs2D_ScalarProd_Sel",
227 "Flow_v2D_ScalarProd_Sel",
228 "Flow_vEta_ScalarProd_Sel",
229 "Flow_vPt_ScalarProd_Sel"
232 const char* baseName3[] = {
237 "Flow_EtaSymVerZ2D_Tpc",
239 "Flow_EtaSymVerZ2D_Ftpc",
249 "Flow_DcaGlobal_Tpc",
250 "Flow_DcaGlobal_Ftpc",
257 "Flow_FitOverMax_Tpc",
260 "Flow_FitOverMax_Ftpc",
262 "Flow_EtaPtPhi2D.PhiEta",
263 "Flow_EtaPtPhi2D.PhiPt",
268 "Flow_YieldPart.Eta",
272 "Flow_MeanDedxPos2D",
273 "Flow_MeanDedxNeg2D",
287 "Flow_Yield.Eta_Sel",
293 "Flow_Psi_Sub_Corr_Sel",
294 "Flow_Psi_Sub_Corr_Diff_Sel",
297 "Flow_QFTPCSubXY2D_Sel",
298 "Flow_QTPCSubXY2D_Sel",
308 "Flow_vObs2D_ScalarProd_Sel",
309 "Flow_v2D_ScalarProd_Sel",
310 "Flow_vEta_ScalarProd_Sel",
311 "Flow_vPt_ScalarProd_Sel"
314 const Int_t firstMultFtpc = 38;
315 const Int_t firstMultTpc = 27;
319 nName =
sizeof(baseName3) /
sizeof(
char*);
320 nSingles = firstMultFtpc + 1;
321 }
else if (includeFtpc) {
322 nName =
sizeof(baseName1) /
sizeof(
char*);
323 nSingles = firstMultFtpc + 1;
325 nName =
sizeof(baseName2) /
sizeof(
char*);
326 nSingles = firstMultTpc + 1;
328 const Int_t nNames = nName;
331 char* baseName[nNames];
332 char* shortName[nNames];
333 for (
int n = 0; n < nNames; n++) {
334 baseName[n] =
new char[35];
335 shortName[n] =
new char[35];
338 strcpy(baseName[n], baseName3[n]);
340 }
else if (includeFtpc) {
341 strcpy(baseName[n], baseName1[n]);
344 strcpy(baseName[n], baseName2[n]);
347 strcpy(shortName[n], baseName[n]);
348 char* cp = strstr(shortName[n],
"_Sel");
353 if (runNumber == 0) {
354 cout <<
" run number? ";
355 fgets(runNo,
sizeof(runNo), stdin);
356 runNumber = atoi(runNo);
357 sprintf(runName,
"ana%2d", runNumber);
358 cout <<
" run name = " << runName << endl;
362 if (strstr(fileNumber,
"x")!=0) {
363 cout <<
" anaXX.root file number? [0= flow.hist.root] ";
364 fgets(fileNumber,
sizeof(fileNumber), stdin);
365 fileNumber[strlen(fileNumber)-1] =
'\0';
366 if (strlen(fileNumber) == 1 && strstr(fileNumber,
"0")) {
367 sprintf(fileName,
"flow.hist.root");
369 sprintf(fileName,
"ana%s.root", fileNumber);
371 cout <<
" file name = " << fileName << endl;
372 histFile =
new TFile(fileName);
376 while (pageNumber <= 1 || pageNumber > nNames) {
377 if (pageNumber < 0) {
378 plotAll(nNames, selN, harN, -pageNumber);
381 if (pageNumber == 1) {
382 can = plotResolution();
385 cout <<
"-1: \t All" << endl;
386 for (
int i = 0; i < nNames; i++) {
387 cout << i+1 <<
":\t " << shortName[i] << endl;
389 cout <<
" page number? ";
390 fgets(tmp,
sizeof(tmp), stdin);
391 pageNumber = atoi(tmp);
393 if (pageNumber > 0 && pageNumber <= nSingles) {
398 cout << pageNumber+1 <<
": graph name= " << shortName[pageNumber] << endl;
401 float twopi = 2. * TMath::Pi();
402 float phiMax = twopi;
404 TString* histProjName = NULL;
407 char* cp = strstr(shortName[pageNumber],
"Subs");
408 int columns = (cp) ? nSubs * nSels : nSels;
410 rows = (strstr(shortName[pageNumber],
"Phi_") ||
411 strstr(shortName[pageNumber],
"Psi_Diff") ? 2 : nHars);
413 if (strcmp(shortName[pageNumber],
"Flow_Phi_Corr")==0) rows = nHars;
414 if (strcmp(shortName[pageNumber],
"Flow_Psi_Sub_Corr_Diff")==0) rows = 3;
415 int pads = rows*columns;
416 cout <<
"pads = " << pads << endl;
420 int canvasWidth = 600, canvasHeight = 780;
422 int canvasWidth = 780, canvasHeight = 600;
424 TString* canName =
new TString(shortName[pageNumber]);
426 *canName += runNumber;
428 cout << canName->Data() << endl;
429 can =
new TCanvas(canName->Data(), canName->Data(), canvasWidth, canvasHeight);
430 can->ToggleEventStatus();
432 TPaveLabel* title =
new TPaveLabel(0.1,0.96,0.9,0.99,shortName[pageNumber]);
435 TPaveLabel* run =
new TPaveLabel(0.1,0.01,0.2,0.03,runName);
438 TPaveLabel* date =
new TPaveLabel(0.7,0.01,0.9,0.03,now.AsString());
440 TPad* graphPad =
new TPad(
"Graphs",
"Graphs",0.01,0.05,0.97,0.95);
445 graphPad->Divide(columns,rows);
446 int firstK = 0, firstJ = 0, lastK = columns, lastJ = rows;
447 }
else if (singleGraph) {
448 int firstK = 0, firstJ = 0, lastK = 1, lastJ = 1;
450 int firstK = selN -1, firstJ = harN -1, lastK = selN, lastJ = harN;
452 TLine* lineZeroY =
new TLine(-etaMax, 0., etaMax, 0.);
453 TLine* lineYcm =
new TLine(Ycm, -10., Ycm, 10.);
454 TLine* lineOnePhi =
new TLine(0., 1., phiMax, 1.);
455 for (
int j = firstJ; j < lastJ; j++) {
456 float order = (float)(j+1);
457 for (
int k = firstK ; k < lastK; k++) {
458 int padN = j*columns + k + 1;
461 char* temp =
new char[35];
462 strcpy(temp,shortName[pageNumber]);
463 char* cproj = strstr(temp,
".");
467 cproj = strstr(temp,
"2");
475 strcat(temp,
"2D_Sel");
477 TString* histName =
new TString(temp);
478 histProjName =
new TString(baseName[pageNumber]);
480 *histProjName += k+1;
481 histProjName->Append(
"_Har");
482 *histProjName += j+1;
485 TString* histName =
new TString(baseName[pageNumber]);
489 histName->Append(
"_Har");
492 cout <<
" col= " << k+1 <<
" row= " << order <<
" pad= " << padN <<
"\t"
493 << histName->Data() << endl;
497 bool threeD = kFALSE;
499 if (strstr(temp,
"3D")) {
501 TH3* hist3D =
dynamic_cast<TH3*
>(histFile->Get(histName->Data()));
503 cout <<
"### Can't find histogram " << histName->Data() << endl;
507 TH2* hist2D =
dynamic_cast<TH2*
>(histFile->Get(histName->Data()));
509 cout <<
"### Can't find histogram " << histName->Data() << endl;
514 if (strstr(shortName[pageNumber],
"3D")!=0) {
516 TH3* hist3D =
dynamic_cast<TH3*
>(histFile->Get(histName->Data()));
518 cout <<
"### Can't find histogram " << histName->Data() << endl;
521 }
else if (strstr(shortName[pageNumber],
"2D")!=0) {
523 TH2* hist2D =
dynamic_cast<TH2*
>(histFile->Get(histName->Data()));
525 cout <<
"### Can't find histogram " << histName->Data() << endl;
529 TH1* hist =
dynamic_cast<TH1*
>(histFile->Get(histName->Data()));
531 cout <<
"### Can't find histogram " << histName->Data() << endl;
534 float max = hist->GetXaxis()->GetXmax();
539 if (multiGraph) graphPad->cd(padN);
541 gStyle->SetOptStat(10);
544 if (strstr(shortName[pageNumber],
".PhiEta")!=0) {
545 TH2D* projZX = hist3D->Project3D(
"zx");
546 projZX->SetName(histProjName->Data());
547 projZX->SetYTitle(
"azimuthal angle (rad)");
548 projZX->SetXTitle(
"rapidity");
549 gStyle->SetOptStat(0);
550 if (projZX) projZX->Draw(
"COLZ");
551 }
else if (strstr(shortName[pageNumber],
".PhiPt")!=0) {
552 TH2D* projZY = hist3D->Project3D(
"zy");
553 projZY->SetName(histProjName->Data());
554 projZY->SetYTitle(
"azimuthal angle (rad");
555 projZY->SetXTitle(
"Pt (GeV/c)");
556 gStyle->SetOptStat(0);
557 if (projZY) projZY->Draw(
"COLZ");
558 }
else if ((strstr(shortName[pageNumber],
"QXY")!=0)) {
559 TLine* lineZeroX =
new TLine(-0.5, 0., 0.5, 0.);
560 TLine* lineZeroY =
new TLine(0., -0.5, 0., 0.5);
561 gStyle->SetOptStat(100110);
562 hist2D->Draw(
"COLZ");
566 }
else if ((strstr(shortName[pageNumber],
"TPCSubXY")!=0)) {
567 TLine* lineZeroX =
new TLine(-1., 0., 1., 0.);
568 TLine* lineZeroY =
new TLine(0., -1., 0., 1.);
569 gStyle->SetOptStat(100110);
570 hist2D->Draw(
"COLZ");
574 }
else if (strstr(shortName[pageNumber],
"XY")!=0) {
575 TLine* lineZeroX =
new TLine(-1., 0., 1., 0.);
576 TLine* lineZeroY =
new TLine(0., -1., 0., 1.);
577 gStyle->SetOptStat(10);
578 hist2D->Draw(
"COLZ");
581 }
else if (strstr(shortName[pageNumber],
"Dedx")!=0) {
582 TVirtualPad::Pad()->SetLogz();
583 gStyle->SetOptStat(10);
584 hist2D->Draw(
"COLZ");
585 }
else if (strstr(shortName[pageNumber],
"_v")!=0) {
586 hist2D->SetMaximum(20.);
587 hist2D->SetMinimum(-20.);
588 gStyle->SetOptStat(0);
589 hist2D->Draw(
"COLZ");
591 gStyle->SetOptStat(10);
592 hist2D->Draw(
"COLZ");
594 }
else if (strstr(shortName[pageNumber],
".Eta")!=0) {
596 TH1D* projX = hist2D->ProjectionX(histName->Data());
599 TH1D* projX = hist2D->ProjectionX(histName->Data());
601 projX->SetName(histProjName->Data());
602 char* xTitle = hist2D->GetXaxis()->GetTitle();
603 projX->SetXTitle(xTitle);
604 projX->SetYTitle(
"Counts");
605 gStyle->SetOptStat(0);
606 if (projX) projX->Draw(
"H");
607 if (!singleGraph) lineZeroY->Draw();
608 }
else if (strstr(shortName[pageNumber],
".Pt")!=0) {
610 TH1D* projY = hist2D->ProjectionY(histName->Data());
612 TH1D* projY = hist2D->ProjectionY(histName->Data(), -1, 9999,
"E");
614 projY->SetName(histProjName->Data());
615 projY->SetXTitle(
"Pt (GeV/c)");
616 projY->SetYTitle(
"Counts");
617 TVirtualPad::Pad()->SetLogy();
618 gStyle->SetOptStat(0);
619 if (projY) projY->Draw(
"H");
620 }
else if (strstr(shortName[pageNumber],
".Phi")!=0) {
622 TH1D* projY = hist2D->ProjectionY(histName->Data());
624 TH1D* projY = hist2D->ProjectionY(histName->Data(), -1, 9999,
"E");
626 projY->SetName(histProjName->Data());
627 projY->SetXTitle(
"azimuthal angle (rad");
628 projY->SetYTitle(
"Counts");
629 gStyle->SetOptStat(0);
630 if (projY) projY->Draw(
"H");
631 }
else if (strstr(shortName[pageNumber],
"Corr")!=0) {
632 float norm = (hist->Integral()) ? ((
float)(hist->GetNbinsX()) / hist->Integral()) : 1.;
633 cout <<
" Normalized by: " << norm << endl;
635 if (strstr(shortName[pageNumber],
"Diff")!=0) {
636 TF1* funcCos1 =
new TF1(
"funcCos1",
637 "1+[0]*2/100*cos([1]*x)", 0., twopi);
638 funcCos1->SetParNames(
"k=1",
"har");
639 funcCos1->SetParameters(0, order+1);
640 funcCos1->SetParLimits(1, 1, 1);
643 }
else if (strstr(shortName[pageNumber],
"Sub")!=0) {
644 TF1* funcSubCorr =
new TF1(
"SubCorr", SubCorr, 0., twopi/order, 2);
645 funcSubCorr->SetParNames(
"chi",
"har");
646 funcSubCorr->SetParameters(1., order);
647 funcSubCorr->SetParLimits(1, 1, 1);
648 hist->Fit(
"SubCorr");
651 TF1* funcCos3 =
new TF1(
"funcCos3",
652 "1+[0]*2/100*cos([3]*x)+[1]*2/100*cos(([3]+1)*x)+[2]*2/100*cos(([3]+2)*x)",
654 funcCos3->SetParNames(
"n=har",
"n=har+1",
"n=har+2",
"har");
655 funcCos3->SetParameters(0, 0, 0, order);
656 funcCos3->SetParLimits(3, 1, 1);
660 if (strstr(shortName[pageNumber],
"Phi")!=0)
661 hist->SetMinimum(0.9*(hist->GetMinimum()));
662 gStyle->SetOptStat(10);
663 gStyle->SetOptFit(111);
665 }
else if (strstr(shortName[pageNumber],
"_q")!=0) {
666 gStyle->SetOptStat(110);
667 gStyle->SetOptFit(111);
669 float n_qBins = (float)hist->GetNbinsX();
670 double area = hist->Integral() * max / n_qBins;
671 TString* histName =
new TString(
"Flow_Mul_Sel");
673 histName->Append(
"_Har");
675 TH1* histMult =
dynamic_cast<TH1*
>(histFile->Get(histName->Data()));
677 cout <<
"### Can't find histogram " << histName->Data() << endl;
681 float mult = histMult->GetMean();
682 TF1* fit_q =
new TF1(
"qDist", qDist, 0., max, 4);
683 fit_q->SetParNames(
"v",
"mult",
"area",
"g");
684 float qMean = hist->GetMean();
685 float vGuess = (qMean > 1.) ? sqrt(2.*(qMean - 1.) / mult) : 0.03;
688 cout <<
"vGuess = " << vGuess << endl;
689 fit_q->SetParameters(vGuess, mult, area, 0.3);
690 fit_q->SetParLimits(1, 1, 1);
691 fit_q->SetParLimits(2, 1, 1);
692 hist->Fit(
"qDist",
"Q");
695 fit_q->FixParameter(3, 0.);
696 fit_q->SetLineStyle(kDotted);
697 hist->Fit(
"qDist",
"Q+");
699 fit_q->ReleaseParameter(3);
700 fit_q->SetParameter(3, 0.5);
701 fit_q->FixParameter(0, 0.);
702 fit_q->SetLineStyle(kDashed);
703 hist->Fit(
"qDist",
"Q+");
705 fit_q->ReleaseParameter(0);
706 }
else if (strstr(shortName[pageNumber],
"PhiLab")!=0) {
708 float norm = (hist->Integral()) ? ((
float)(hist->GetNbinsX()) / hist->Integral()) : 1.;
709 cout <<
" Normalized by: " << norm << endl;
711 hist->SetMinimum(0.);
712 hist->SetMaximum(1.3);
713 TF1* funcCosSin =
new TF1(
"funcCosSin",
714 "1.+[0]*2./100.*cos([2]*x)+[1]*2./100.*sin([2]*x)", 0., twopi);
715 funcCosSin->SetParNames(
"100*cos",
"100*sin",
"har");
716 funcCosSin->SetParameters(0, 0, order);
717 funcCosSin->SetParLimits(2, 1, 1);
718 hist->Fit(
"funcCosSin");
720 gStyle->SetOptFit(111);
721 }
else if (strstr(shortName[pageNumber],
"Phi")!=0) {
723 hist->SetMinimum(0.);
724 gStyle->SetOptStat(10);
726 }
else if (strstr(shortName[pageNumber],
"Psi_Diff")!=0) {
728 }
else if (strstr(shortName[pageNumber],
"Psi")!=0) {
729 float norm = (hist->Integral()) ? ((
float)(hist->GetNbinsX()) / hist->Integral()) : 1.;
730 cout <<
" Normalized by: " << norm << endl;
732 hist->SetMinimum(0.);
733 TF1* funcCosSin =
new TF1(
"funcCosSin",
734 "1.+[0]*2./100.*cos([2]*x)+[1]*2./100.*sin([2]*x)", 0., twopi/order);
735 funcCosSin->SetParNames(
"100*cos",
"100*sin",
"har");
736 funcCosSin->SetParameters(0, 0, order);
737 funcCosSin->SetParLimits(2, 1, 1);
738 hist->Fit(
"funcCosSin");
740 gStyle->SetOptFit(111);
742 }
else if (strstr(shortName[pageNumber],
"Eta")!=0) {
743 gStyle->SetOptStat(100110);
744 if (strstr(shortName[pageNumber],
"_v")!=0 ) {
745 hist->SetMaximum(10.);
746 hist->SetMinimum(-10.);
753 }
else if (strstr(shortName[pageNumber],
"Pt")!=0) {
754 if (strstr(shortName[pageNumber],
"_v")!=0 ) {
755 hist->SetMaximum(25.);
756 hist->SetMinimum(-5.);
758 gStyle->SetOptStat(100110);
760 if (strstr(shortName[pageNumber],
"v")!=0) {
761 TLine* lineZeroPt =
new TLine(0., 0., max, 0.);
764 }
else if (strstr(shortName[pageNumber],
"Bin")!=0) {
765 if (strstr(shortName[pageNumber],
"Pt")!=0) {
766 TLine* lineDiagonal =
new TLine(0., 0., max, max);
768 TLine* lineDiagonal =
new TLine(-max, -max, max, max);
770 gStyle->SetOptStat(0);
771 hist->SetMarkerStyle(21);
772 hist->SetMarkerColor(2);
774 lineDiagonal->Draw();
775 }
else if (strstr(shortName[pageNumber],
"PidMult")!=0) {
776 TVirtualPad::Pad()->SetLogy();
777 gStyle->SetOptStat(0);
780 gStyle->SetOptStat(100110);
785 if (histProjName)
delete histProjName;
794 TCanvas* plotResolution() {
804 int rows =
sizeof(resName) /
sizeof(
char*);
805 int pads = rows*columns;
808 can =
new TCanvas(resName[1], resName[1], 600, 780);
809 can->ToggleEventStatus();
810 TPaveLabel* run =
new TPaveLabel(0.1,0.01,0.2,0.03,runName);
813 TPaveLabel* date =
new TPaveLabel(0.7,0.01,0.9,0.03,now.AsString());
815 TLine* lineZeroHar =
new TLine(0.5, 0., nHars+0.5, 0.);
816 TPad* graphPad =
new TPad(
"Graphs",
"Graphs",0.01,0.05,0.97,0.99);
819 graphPad->Divide(columns,rows);
824 for (
int j = 0; j < rows; j++) {
826 cout <<
"resolution name= " << resName[resNumber] << endl;
827 for (
int k = 0; k < columns; k++) {
828 int padN = j*columns + k +1;
829 TString* histName =
new TString(resName[resNumber]);
831 cout <<
"row= " << j <<
" col= " << k <<
" pad= " << padN <<
"\t"
832 << histName->Data() << endl;
833 TH1* hist =
dynamic_cast<TH1*
>(histFile->Get(histName->Data()));
835 cout <<
"### Can't find histogram " << histName->Data() << endl;
839 gStyle->SetOptStat(0);
840 if (strstr(resName[resNumber],
"_v")!=0) {
841 hist->SetMaximum(10.);
842 hist->SetMinimum(-5.);
844 hist->SetMaximum(1.1);
845 hist->SetMinimum(0.);
847 for (
int n=1; n < nHars+1; n++) {
848 v = hist->GetBinContent(n);
849 err = hist->GetBinError(n);
850 cout <<
" " << n <<
": " << setprecision(3) << v <<
" +/- " << err << endl;
851 if (TMath::IsNaN(v)) {
852 hist->SetBinContent(n, 0.);
853 hist->SetBinError(n, 0.);
865 void plotAll(Int_t nNames, Int_t selN, Int_t harN, Int_t first = 1) {
866 for (
int i = first; i < nNames + 1; i++) {
867 can = plot(i, selN, harN);
869 cout <<
"save? y/[n], quit? q" << endl;
870 fgets(tmp,
sizeof(tmp), stdin);
871 if (strstr(tmp,
"y")!=0) can->Print(
".pdf");
872 else if (strstr(tmp,
"q")!=0)
return;
873 else if (strstr(tmp,
" ")!=0)
continue;
875 cout <<
" plotAll Done" << endl;
880 static Double_t qDist(
double* q,
double* par) {
883 double sig2 = 0.5 * (1. + par[3]);
884 double expo = (par[1]*par[0]*par[0]/10000. + q[0]*q[0]) / (2*sig2);
885 Double_t dNdq = par[2] * (q[0]*exp(-expo)/sig2) *
886 TMath::BesselI0(q[0]*par[0]/100.*sqrt(par[1])/sig2);
893 static Double_t SubCorr(
double* x,
double* par) {
897 double chi2 = par[0] * par[0] / 2;
898 double z = chi2 * cos(par[1]*x[0]);
899 double TwoOverPi = 2./TMath::Pi();
901 Double_t dNdPsi = exp(-chi2)/TwoOverPi * (TwoOverPi*(1.+chi2)
902 + z*(TMath::BesselI0(z) + TMath::StruveL0(z))
903 + chi2*(TMath::BesselI1(z) + TMath::StruveL1(z)));