{ // exercise HAFT resolution functions // gSystem->Load("libHAFT.so"); Char_t fname[]="HadesAcceptanceFilter_NOV02_v1.acc"; setfilename_(fname,sizeof(fname)); Int_t pid = 3; // select a particle ID Float_t p0 = 1.010; // select cut planes sitting on the grid points Float_t th0 = 45.0; // (e.g. 50 p bins, 45 theta bins, 15 phi bins centered Float_t ph0 = 31.0; // at 25,75,125,... & 1,3,5,7,9,... & 2,6,10,14,18,...) Int_t m1=0, m2=-4, m3=3, m4=4; Int_t mode; Int_t xdim, ydim, zdim; getdimensions_(&pid, &xdim, &ydim, &zdim); Float_t plo, phi, dp, thlo, thhi, dth, phlo, phhi, dph; getlimits_(&pid, &plo, &phi, &dp, &thlo, &thhi, &dth, &phlo, &phhi, &dph); Float_t pgrid[xdim], thgrid[ydim], phgrid[zdim] ; for (Int_t i=0; iSetTitle("Momentum"); p1.SetLineColor(1); p1.SetLineWidth(2); p1->GetXaxis()->SetLabelSize(0.06); p1->GetXaxis()->SetRangeUser(plo,phi); p1->GetYaxis()->SetLabelSize(0.06); TGraph p2(xdim,pgrid,respme); // momentum resolution (medium mode) p2.SetLineColor(4); p2.SetLineWidth(2); TGraph p3(xdim,pgrid,resphi); // momentum resolution (high mode) p3.SetLineColor(3); p3.SetLineWidth(2); c1.cd(1); gPad->SetGrid(); p1->Draw("al"); p2->Draw("l"); p3->Draw("l"); Double_t theta, phi1, phi0; const Double_t d2r = 0.017453293; n=10000; mode = 3; for (Int_t j=0; jSetTitle("Theta"); th1.SetLineColor(1); th1.SetLineWidth(2); th1->GetXaxis()->SetLabelSize(0.06); th1->GetXaxis()->SetRangeUser(10.,90.); th1->GetYaxis()->SetLabelSize(0.06); c1.cd(2); gPad->SetGrid(); th1->Draw("al"); n=10000; mode = 3; for (Int_t k=0; kSetTitle("Phi"); ph1.SetLineColor(1); ph1.SetLineWidth(2); ph1->GetXaxis()->SetLabelSize(0.06); ph1->GetXaxis()->SetRangeUser(10.,90.); ph1->GetYaxis()->SetRangeUser(0.,2.); ph1->GetYaxis()->SetLabelSize(0.06); c1.cd(3); gPad->SetGrid(); ph1->Draw("al"); }