00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00019 #include <iomanip.h>
00020 #include <math.h>
00021 #include "TMath.h"
00022
00023 const Int_t nCens = 10;
00024
00025 int runNumber = 0;
00026 char runName[60];
00027 char fileName[60];
00028 char histTitle[30];
00029 TFile* histFile[nCens];
00030 char tmp[10];
00031 TCanvas* can;
00032
00033 TCanvas* plotCen(Int_t pageNumber=0, Int_t selN=2, Int_t harN=2){
00034 gInterpreter->ProcessLine(".O0");
00035
00036 TCanvas* cOld = (TCanvas*)gROOT->GetListOfCanvases();
00037 if (cOld) cOld->Delete();
00038
00039
00040 gROOT->SetStyle("Bold");
00041 gStyle->SetPalette(1);
00042 gROOT->ForceStyle();
00043 gStyle->SetLabelSize(.1,"X");
00044
00045 int canvasWidth = 600, canvasHeight = 780;
00046 int columns = 2;
00047 int rows;
00048 bool oddPads = (nCens) % 2;
00049 if (oddPads) {
00050 rows = nCens/columns + 1;
00051 } else {
00052 rows = nCens/columns;
00053 }
00054 int pads = nCens;
00055
00056
00057
00058 const char* baseName[] = {
00059 "Flow_Cos_Sel",
00060 "Flow_Res_Sel",
00061 "Flow_v_Sel",
00062 "FlowLYZ_V_Sel",
00063 "FlowLYZ_vr0_Sel",
00064 "FlowLYZ_v_Sel",
00065 "Flow_v_ScalarProd_Sel",
00066 "Flow_Cumul_v_Order2_Sel",
00067 "Flow_Cumul_v_Order4_Sel",
00068 "Flow_VertexZ",
00069 "Flow_VertexXY2D",
00070 "Flow_EtaSymVerZ2D_Tpc",
00071 "Flow_EtaSym_Tpc",
00072 "Flow_EtaSymVerZ2D_Ftpc",
00073 "Flow_EtaSym_Ftpc",
00074 "Flow_CTBvsZDC2D",
00075 "Flow_Cent",
00076 "Flow_OrigMult",
00077 "Flow_Mult",
00078 "FlowLYZ_Mult",
00079 "Flow_MultOverOrig",
00080 "Flow_MultEta",
00081 "Flow_MultPart",
00082 "Flow_Charge_Ftpc",
00083 "Flow_DcaGlobal_Tpc",
00084 "Flow_Dca_Ftpc",
00085 "Flow_DcaGlobal_Ftpc",
00086 "Flow_Chi2_Tpc",
00087 "Flow_Chi2_Ftpc",
00088 "Flow_FitPts_Tpc",
00089 "Flow_MaxPts_Tpc",
00090 "Flow_FitOverMax_Tpc",
00091 "Flow_FitPts_Ftpc",
00092 "Flow_MaxPts_Ftpc",
00093 "Flow_FitOverMax_Ftpc",
00094 "Flow_YieldAll2D",
00095 "Flow_YieldAll.Eta",
00096 "Flow_YieldAll.Pt",
00097 "Flow_YieldPart2D",
00098 "Flow_YieldPart.Eta",
00099 "Flow_YieldPart.Pt",
00100 "Flow_MeanDedxPos2D",
00101 "Flow_MeanDedxNeg2D",
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 "Flow_PidMult",
00113
00114 "Flow_Yield2D_Sel",
00115 "Flow_Yield.Eta_Sel",
00116 "Flow_Yield.Pt_Sel",
00117 "Flow_Mul_Sel",
00118
00119
00120
00121
00122
00123
00124
00125
00126 "Flow_Psi_Subs",
00127 "Flow_Psi_Sel",
00128 "Flow_Psi_Sub_Corr_Sel",
00129 "Flow_Psi_Sub_Corr_Diff_Sel",
00130 "Flow_Phi_Corr_Sel",
00131 "Flow_vObs2D_Sel",
00132 "Flow_vObsEta_Sel",
00133 "Flow_vObsPt_Sel",
00134 "Flow_v2D_Sel",
00135 "Flow_vEta_Sel",
00136 "Flow_vPt_Sel",
00137 "Flow_q_Sel",
00138 "FlowLYZ_r0theta_Sel",
00139 "FlowLYZ_Vtheta_Sel",
00140 "FlowLYZ_vEta_Sel",
00141 "FlowLYZ_vPt_Sel",
00142 "FlowLYZ_Gtheta0_Sel",
00143 "Flow_vObs2D_ScalarProd_Sel",
00144 "Flow_v2D_ScalarProd_Sel",
00145 "Flow_vEta_ScalarProd_Sel",
00146 "Flow_vPt_ScalarProd_Sel",
00147 "Flow_Cumul_vEta_Order2_Sel",
00148 "Flow_Cumul_vPt_Order2_Sel",
00149 "Flow_Cumul_vEta_Order4_Sel",
00150 "Flow_Cumul_vPt_Order4_Sel"
00151 };
00152 int nName = sizeof(baseName) / sizeof(char*);
00153 const Int_t nNames = nName;
00154 const int nDoubles = 9;
00155 const int nSingles = 46 + nDoubles;
00156
00157
00158 char* shortName[nNames];
00159 for (int n = 0; n < nNames; n++) {
00160 shortName[n] = new char[35];
00161 strcpy(shortName[n], baseName[n]);
00162 char* cp = strstr(shortName[n],"_Sel");
00163 if (cp) *cp = '\0';
00164 }
00165
00166 cout << "Harmonic = " << harN << endl << endl;
00167
00168 if (runNumber == 0) {
00169 cout << " first run number? ";
00170 fgets(tmp, sizeof(tmp), stdin);
00171 runNumber = atoi(tmp);
00172 sprintf(runName, "ana%2d", runNumber);
00173 cout << " first run name = " << runName << endl;
00174
00175
00176 for (int n = 0; n < nCens; n++) {
00177 sprintf(fileName, "ana%2d.root", runNumber + n);
00178 cout << " file name = " << fileName << endl;
00179 histFile[n] = new TFile(fileName);
00180 }
00181 }
00182
00183
00184 while (pageNumber <= 0 || pageNumber > nNames) {
00185 if (pageNumber < 0) {
00186 plotCenAll(nNames, selN, harN, -pageNumber);
00187 return can;
00188 }
00189 cout << "-1: \t All" << endl;
00190 for (int i = 0; i < nNames; i++) {
00191 cout << i+1 << ":\t " << shortName[i] << endl;
00192 }
00193 cout << " page number? ";
00194 fgets(tmp, sizeof(tmp), stdin);
00195 pageNumber = atoi(tmp);
00196 }
00197
00198
00199 bool multiGraph = kFALSE;
00200 bool doubleGraph = kFALSE;
00201 bool singleGraph = kFALSE;
00202 if (pageNumber > 0 && pageNumber <= nDoubles) {
00203 doubleGraph = kTRUE;
00204 } else if (pageNumber > nDoubles && pageNumber <= nSingles) {
00205 singleGraph = kTRUE;
00206 } else {
00207 multiGraph = kTRUE;
00208 }
00209 pageNumber--;
00210
00211
00212 float twopi = 2. * TMath::Pi();
00213 float etaMax = 1.5;
00214 float yMin = -4.5;
00215 float yMax = 4.5;
00216 float qMax = 3.5;
00217 float phiMax = twopi;
00218 int n_qBins = 50;
00219 float Ycm = 0.0;
00220 TString* histProjName = NULL;
00221
00222
00223 char sel[2];
00224 sprintf(sel,"%d",selN);
00225 char har[2];
00226 sprintf(har,"%d",harN);
00227 float order = (float)harN;
00228 char* temp = new char[35];
00229 strcpy(temp,shortName[pageNumber]);
00230 char* cproj = strstr(temp,".");
00231 if (cproj) {
00232 *cproj = '\0';
00233 if (singleGraph) {
00234 cproj = strstr(temp,"2");
00235 if (cproj) {
00236 *cproj = '\0';
00237 strcat(temp,"3D");
00238 } else {
00239 strcat(temp,"2D");
00240 }
00241 } else {
00242 strcat(temp,"2D_Sel");
00243 }
00244 TString* histName = new TString(temp);
00245 histProjName = new TString(baseName[pageNumber]);
00246 if (multiGraph) {
00247 histProjName->Append(*sel);
00248 histProjName->Append("_Har");
00249 histProjName->Append(*har);
00250 }
00251 } else {
00252 TString* histName = new TString(baseName[pageNumber]);
00253 }
00254 if (!singleGraph) histName->Append(*sel);
00255 if (multiGraph) {
00256 histName->Append("_Har");
00257 histName->Append(*har);
00258 }
00259 cout << pageNumber+1 << ": graph name= " << histName->Data() << endl;
00260
00261
00262 can = new TCanvas(shortName[pageNumber], shortName[pageNumber],
00263 canvasWidth, canvasHeight);
00264 can->ToggleEventStatus();
00265 TPaveLabel* title = new TPaveLabel(0.1,0.96,0.9,0.99,histName->Data());
00266 title->Draw();
00267 TPaveLabel* run = new TPaveLabel(0.1,0.01,0.2,0.03,runName);
00268 run->Draw();
00269 TDatime now;
00270 TPaveLabel* date = new TPaveLabel(0.7,0.01,0.9,0.03,now.AsString());
00271 date->Draw();
00272 TPad* graphPad = new TPad("Graphs","Graphs",0.01,0.05,0.97,0.95);
00273 graphPad->Draw();
00274 graphPad->cd();
00275 graphPad->Divide(columns, rows);
00276 TLine* lineZeroY = new TLine(yMin, 0., yMax, 0.);
00277 TLine* lineYcm = new TLine(Ycm, -10., Ycm, 10.);
00278 float v;
00279 float err;
00280 int centr;
00281 for (int i = 0; i < pads; i++) {
00282 int fileN = i;
00283 int padN = fileN + 1;
00284 centr = oddPads ? padN : padN-1;
00285 sprintf(histTitle,"Centrality %d",centr);
00286 cout << "centrality= " << centr << endl;
00287
00288
00289 bool twoD;
00290 bool threeD;
00291 if (histProjName) {
00292 if (strstr(temp,"3D")) {
00293 twoD = kTRUE;
00294 TH3* hist3D = (TH3*)(histFile[fileN]->Get(histName->Data()));
00295 if (!hist3D) {
00296 cout << "### Can't find histogram " << histName->Data() << endl;
00297 return can;
00298 }
00299 hist3D->SetTitle(histTitle);
00300 } else {
00301 TH2* hist2D = (TH2*)(histFile[fileN]->Get(histName->Data()));
00302 if (!hist2D) {
00303 cout << "### Can't find histogram " << histName->Data() << endl;
00304 return can;
00305 }
00306 hist2D->SetTitle(histTitle);
00307 }
00308 } else {
00309 if (strstr(shortName[pageNumber],"3D")!=0) {
00310 threeD = kTRUE;
00311 TH3* hist3D = (TH3*)(histFile[fileN]->Get(histName->Data()));
00312 if (!hist3D) {
00313 cout << "### Can't find histogram " << histName->Data() << endl;
00314 return can;
00315 }
00316 hist3D->SetTitle(histTitle);
00317 } else if (strstr(shortName[pageNumber],"2D")!=0) {
00318 twoD = kTRUE;
00319 TH2* hist2D = (TH2*)(histFile[fileN]->Get(histName->Data()));
00320 if (!hist2D) {
00321 cout << "### Can't find histogram " << histName->Data() << endl;
00322 return can;
00323 }
00324 hist2D->SetTitle(histTitle);
00325 } else {
00326 TH1* hist = (TH1*)(histFile[fileN]->Get(histName->Data()));
00327 if (!hist) {
00328 cout << "### Can't find histogram " << histName->Data() << endl;
00329 return can;
00330 }
00331 float ptMax = hist->GetXaxis()->GetXmax();
00332 hist->SetTitle(histTitle);
00333 }
00334 }
00335
00336
00337 graphPad->cd(padN);
00338
00339 if (threeD) {
00340 gStyle->SetOptStat(10);
00341 hist3D->Draw("BOX");
00342 } else if (twoD) {
00343 if (strstr(shortName[pageNumber],".PhiEta")!=0) {
00344 TH2D* projZX = (TH2*)hist3D->Project3D("zx");
00345 projZX->SetName(histProjName->Data());
00346 projZX->SetYTitle("azimuthal angle (rad)");
00347 projZX->SetXTitle("rapidity");
00348 gStyle->SetOptStat(0);
00349 if (projZX) projZX->Draw("COLZ");
00350 } else if (strstr(shortName[pageNumber],".PhiPt")!=0) {
00351 TH2D* projZY = (TH2*)hist3D->Project3D("zy");
00352 projZY->SetName(histProjName->Data());
00353 projZY->SetYTitle("azimuthal angle (rad");
00354 projZY->SetXTitle("Pt (GeV)");
00355 gStyle->SetOptStat(0);
00356 if (projZY) projZY->Draw("COLZ");
00357 } else if (strstr(shortName[pageNumber],"XY")!=0) {
00358 TLine* lineZeroX = new TLine(-1., 0., 1., 0.);
00359 TLine* lineZero = new TLine(0., -1., 0., 1.);
00360 gStyle->SetOptStat(10);
00361 hist2D->Draw("COLZ");
00362 lineZeroX->Draw();
00363 lineZero->Draw();
00364 } else if (strstr(shortName[pageNumber],"Dedx")!=0) {
00365 gStyle->SetOptStat(10);
00366 (TVirtualPad::Pad()) ->SetLogz();
00367 hist2D->Draw("COLZ");
00368 } else if (strstr(shortName[pageNumber],"_v")!=0) {
00369 hist2D->SetMaximum(20.);
00370 hist2D->SetMinimum(-20.);
00371 gStyle->SetOptStat(0);
00372 hist2D->Draw("COLZ");
00373 } else {
00374 gStyle->SetOptStat(10);
00375 hist2D->Draw("COLZ");
00376 }
00377 } else if (strstr(shortName[pageNumber],".Eta")!=0) {
00378 if (singleGraph) {
00379 TH1D* projX = hist2D->ProjectionX(histName->Data(), 0, 9999);
00380 } else {
00381 TH1D* projX = hist2D->ProjectionX(histName->Data(), 0, 9999);
00382 }
00383 projX->SetName(histProjName->Data());
00384 char* xTitle = hist2D->GetXaxis()->GetTitle();
00385 projX->SetXTitle(xTitle);
00386 projX->SetYTitle("Counts");
00387 gStyle->SetOptStat(0);
00388 if (projX) projX->Draw("H");
00389 if (!singleGraph) lineZeroY->Draw();
00390 } else if (strstr(shortName[pageNumber],".Pt")!=0) {
00391 if (singleGraph) {
00392 TH1D* projY = hist2D->ProjectionY(histName->Data(), 0, 9999);
00393 } else {
00394 TH1D* projY = hist2D->ProjectionY(histName->Data(), 0, 9999, "E");
00395 }
00396 projY->SetName(histProjName->Data());
00397 projY->SetXTitle("Pt (GeV)");
00398 projY->SetYTitle("Counts");
00399 (TVirtualPad::Pad())->SetLogy();
00400 gStyle->SetOptStat(0);
00401 if (projY) projY->Draw("H");
00402 } else if (strstr(shortName[pageNumber],"Corr")!=0) {
00403 float norm = (float)(hist->GetNbinsX()) / hist->Integral();
00404 cout << " Normalized by: " << norm << endl;
00405 hist->Scale(norm);
00406 if (strstr(shortName[pageNumber],"Sub")!=0) {
00407 TF1* funcSubCorr = new TF1("SubCorr", SubCorr, 0., twopi/order, 2);
00408 funcSubCorr->SetParNames("chi", "har");
00409 funcSubCorr->SetParameters(1., order);
00410 funcSubCorr->SetParLimits(1, 1, 1);
00411 hist->Fit("SubCorr");
00412 delete funcSubCorr;
00413 } else {
00414 TF1* funcCos2 = new TF1("funcCos2",
00415 "1+[0]*2/100*cos([2]*x)+[1]*2/100*cos(([2]+1)*x)", 0., twopi/order);
00416 funcCos2->SetParNames("k=1", "k=2", "har");
00417 funcCos2->SetParameters(0, 0, order);
00418 funcCos2->SetParLimits(2, 1, 1);
00419 hist->Fit("funcCos2");
00420 delete funcCos2;
00421 }
00422 if (strstr(shortName[pageNumber],"Phi")!=0)
00423 hist->SetMinimum(0.9*(hist->GetMinimum()));
00424 gStyle->SetOptStat(10);
00425 gStyle->SetOptFit(111);
00426 hist->Draw("E1");
00427 } else if (strstr(shortName[pageNumber],"_q")!=0) {
00428 gStyle->SetOptStat(110);
00429 gStyle->SetOptFit(111);
00430 double area = hist->Integral() * qMax / (float)n_qBins;
00431 TString* histMulName = new TString("Flow_Mul_Sel");
00432 histMulName->Append(*sel);
00433 histMulName->Append("_Har");
00434 histMulName->Append(*har);
00435 TH1* histMult = (TH1*)(histFile[fileN]->Get(histMulName->Data()));
00436 if (!histMult) {
00437 cout << "### Can't find histogram " << histMulName->Data() << endl;
00438 return can;
00439 }
00440 delete histMulName;
00441 float mult = histMult->GetMean();
00442 TF1* fit_q = new TF1("qDist", qDist, 0., qMax, 4);
00443 fit_q->SetParNames("v", "mult", "area", "g");
00444 float qMean = hist->GetMean();
00445 float vGuess = (qMean > 1.) ? sqrt(2.*(qMean - 1.) / mult) : 0.03;
00446
00447 vGuess *= 100.;
00448 cout << "vGuess = " << vGuess << endl;
00449 fit_q->SetParameters(vGuess, mult, area, 0.3);
00450 fit_q->SetParLimits(1, 1, 1);
00451 fit_q->SetParLimits(2, 1, 1);
00452
00453 hist->Fit("qDist");
00454 fit_q->Draw("same");
00455 } else if (strstr(shortName[pageNumber],"Phi")!=0) {
00456 hist->SetMinimum(0.9*(hist->GetMinimum()));
00457 if (strstr(shortName[pageNumber],"Weight")!=0) {
00458 TLine* lineOnePhi = new TLine(0., 1., phiMax, 1.);
00459 gStyle->SetOptStat(0);
00460 hist->Draw();
00461 lineOnePhi->Draw();
00462 } else {
00463 gStyle->SetOptStat(10);
00464 hist->Draw();
00465 }
00466 } else if (strstr(shortName[pageNumber],"Psi")!=0) {
00467 gStyle->SetOptStat(10);
00468 hist->Draw("E1");
00469 } else if (strstr(shortName[pageNumber],"Eta")!=0) {
00470 if (strstr(shortName[pageNumber],"_v")!=0 ) {
00471 hist->SetMaximum(10.);
00472 hist->SetMinimum(-10.);
00473 }
00474 gStyle->SetOptStat(100110);
00475 hist->Draw();
00476 lineZeroY->Draw();
00477 lineYcm->Draw();
00478 } else if (strstr(shortName[pageNumber],"Pt")!=0) {
00479 if (strstr(shortName[pageNumber],"_v")!=0 ) {
00480 hist->SetMaximum(30.);
00481 hist->SetMinimum(-5.);
00482 }
00483 gStyle->SetOptStat(100110);
00484 hist->Draw();
00485 if (strstr(shortName[pageNumber],"v")!=0) {
00486 TLine* lineZeroPt = new TLine(0., 0., ptMax, 0.);
00487 lineZeroPt->Draw();
00488 }
00489 } else if (strstr(shortName[pageNumber],"Bin")!=0) {
00490 if (strstr(shortName[pageNumber],"Pt")!=0) {
00491 TLine* lineDiagonal = new TLine(0., 0., ptMax, ptMax);
00492 } else {
00493 TLine* lineDiagonal = new TLine(-etaMax, -etaMax, etaMax, etaMax);
00494 }
00495 gStyle->SetOptStat(0);
00496 hist->SetMarkerStyle(21);
00497 hist->SetMarkerColor(2);
00498 hist->Draw();
00499 lineDiagonal->Draw();
00500
00501
00502
00503
00504
00505 } else if (strstr(shortName[pageNumber],"Mult")!=0) {
00506 float mult = hist->GetMean();
00507 cout << centr << ": " << mult << endl;
00508 (TVirtualPad::Pad())->SetLogy();
00509 gStyle->SetOptStat(0);
00510 hist->Draw();
00511 } else if (strstr(shortName[pageNumber],"MultPart")!=0) {
00512 float multPart = hist->GetMean();
00513 cout << centr << ": " << multPart << endl;
00514 (TVirtualPad::Pad())->SetLogy();
00515 gStyle->SetOptStat(0);
00516 hist->Draw();
00517 } else if (strstr(shortName[pageNumber],"PidMult")!=0) {
00518 (TVirtualPad::Pad())->SetLogy();
00519 gStyle->SetOptStat(0);
00520 hist->Draw();
00521 } else if (strstr(shortName[pageNumber],"LYZ_G")!=0) {
00522 (TVirtualPad::Pad())->SetLogy();
00523 gStyle->SetOptStat(0);
00524 TString hist_r0Name("FlowLYZ_r0theta_Sel");
00525 hist_r0Name += selN;
00526 hist_r0Name += "_Har";
00527 hist_r0Name += harN;
00528 cout << hist_r0Name << endl;
00529 TH1D* hist_r0 = (TH1D*)histFile[fileN]->Get(hist_r0Name);
00530 float r0 = hist_r0->GetBinContent(1);
00531 hist->SetAxisRange(0., 2*r0, "X");
00532 hist->Draw();
00533 TLine* r0Line = new TLine(r0, 0., r0, 1.);
00534 r0Line->SetLineColor(kBlue);
00535 r0Line->Draw("same");
00536 } else if (strstr(shortName[pageNumber],"LYZ_M")!=0) {
00537 hist->SetMinimum(0.);
00538 gStyle->SetOptStat(0);
00539 hist->Draw();
00540 Float_t mult = hist->GetMean();
00541 TString* multChar = new TString("mult= ");
00542 *multChar += (int)mult;
00543 TLatex l;
00544 l.SetNDC();
00545 l.SetTextSize(0.1);
00546 l.DrawLatex(0.65,0.8,multChar->Data());
00547 } else if (strstr(shortName[pageNumber],"LYZ")!=0) {
00548 hist->SetMinimum(0.);
00549 hist->Draw();
00550 } else if (strstr(shortName[pageNumber],"_v")!=0 ) {
00551 TLine* lineZeroHar = new TLine(0.5, 0., 4.5, 0.);
00552 hist->SetMaximum(10.);
00553 gStyle->SetOptStat(0);
00554 hist->Draw();
00555 lineZeroHar->Draw();
00556 for (int n=1; n <= 4; n++) {
00557 v = hist->GetBinContent(n);
00558 err = hist->GetBinError(n);
00559 if (n==2) cout << " v2 = " << setprecision(3) << v << " +/- " <<
00560 setprecision(2) << err << endl;
00561 if (n==4) cout << " v4 = " << setprecision(3) << v << " +/- " <<
00562 setprecision(2) << err << endl;
00563 if (TMath::IsNaN(v)) {
00564 hist->SetBinContent(n, 0.);
00565 hist->SetBinError(n, 0.);
00566 }
00567 }
00568 } else if (strstr(shortName[pageNumber],"_Res")!=0 ) {
00569 for (int n=1; n < 4; n++) {
00570 double res = hist->GetBinContent(n);
00571 err = hist->GetBinError(n);
00572 if (n==2) cout << " res = " << setprecision(3) << res << " +/- " <<
00573 setprecision(2) << err << endl;
00574 if (TMath::IsNaN(v)) {
00575 hist->SetBinContent(n, 0.);
00576 hist->SetBinError(n, 0.);
00577 }
00578 }
00579 hist->Draw();
00580 } else {
00581 gStyle->SetOptStat(100110);
00582 hist->Draw();
00583 }
00584 }
00585
00586 delete [] temp;
00587 delete histName;
00588 if (histProjName) delete histProjName;
00589 for (int m = 0; m < nNames; m++) {
00590 delete [] shortName[m];
00591 }
00592 delete shortName[];
00593
00594 return can;
00595 }
00596
00597 void plotCenAll(Int_t nNames, Int_t selN, Int_t harN, Int_t first = 1) {
00598 for (int i = first; i < nNames + 1; i++) {
00599 can = plotCen(i, selN, harN);
00600 can->Update();
00601 cout << "save? y/[n], quit? q" << endl;
00602 fgets(tmp, sizeof(tmp), stdin);
00603 if (strstr(tmp,"y")!=0) can->Print(".pdf");
00604 else if (strstr(tmp,"q")!=0) return;
00605 }
00606 cout << " Done" << endl;
00607 }
00608
00609
00610
00611 static Double_t qDist(double* q, double* par) {
00612
00613
00614 double sig2 = 0.5 * (1. + par[3]);
00615 double expo = (par[1]*par[0]*par[0]/10000. + q[0]*q[0]) / (2*sig2);
00616 Double_t dNdq = par[2] * (q[0]*exp(-expo)/sig2) *
00617 TMath::BesselI0(q[0]*par[0]/100.*sqrt(par[1])/sig2);
00618
00619 return dNdq;
00620 }
00621
00622
00623
00624 static Double_t SubCorr(double* x, double* par) {
00625
00626
00627
00628
00629 double chi2 = par[0] * par[0] / 2;
00630 double z = chi2 * cos(par[1]*x[0]);
00631 double TwoOverPi = 2./TMath::Pi();
00632
00633 Double_t dNdPsi = exp(-chi2)/TwoOverPi * (TwoOverPi*(1.+chi2)
00634 + z*(TMath::BesselI0(z) + TMath::StruveL0(z))
00635 + chi2*(TMath::BesselI1(z) + TMath::StruveL1(z)));
00636
00637 return dNdPsi;
00638 }
00639
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733