2 // This macro is a part of "Alice PPR fast flow analysis package"
4 // The macro draws event plane resolution and V2 resolution in function
5 // of V2 and multiplicity
9 // 0 - event plane resolution
12 // desc 0/1 - draw Graph descriptions
14 // Sylwester Radomski, GSI
15 // mail: S.Radomski@gsi.de
19 AliFlowDrawSummary(int type = 0, int desc = 0, const char* fileName = 0) {
21 gROOT->SetStyle("Plain");
24 ::Error("AliFlowDrawSummary","Wrong Type [0-1] : %d", type);
28 const Int_t startMarker = 21;
29 const char *dataName = "flowPicoEvent.root";
30 TFile *dataFile = new TFile(dataName,"UPDATE");
31 TNtuple *data = (TNtuple *) dataFile->Get("flowData");
36 const char* patt = "Mult == %d && trueV2 > %f && trueV2 < %f";
38 const char* varName[2] = {"Psi - truePsi >> htemp(90, -90, 90) ",
39 "100 * (trueV2-V2)/trueV2 >> htemp(100,-200,200)"};
41 const char* yTitle[2] = {"Event Plane Resolution [deg]",
42 "V_{2} Resolution [%]"};
48 const Int_t nMultPoint = 11;
49 const Int_t nV2Point = 4;
51 const Int_t multPoints[nMultPoint] = {200, 400, 600, 800, 1000, 1500, 2000, 2500, 3000,
52 4000, 5000};// 6000, 8000, 10000};
54 const Double_t v2Points[nV2Point] = {0.04, 0.06, 0.08, 0.1};
55 //const Double_t v2Points[nV2Point] = {0.06};
57 TCanvas *c = new TCanvas();
61 TCanvas *d = new TCanvas();
63 for (Int_t j=0; j<nV2Point; j++) {
65 g = new TGraphErrors();
66 g->SetMarkerStyle(18+j);
68 for(Int_t i=0; i<nMultPoint; i++) {
70 Int_t totalMult = multPoints[i];
71 Double_t totalV2 = v2Points[j];
73 sprintf(buff, patt, totalMult, totalV2-0.001, totalV2+0.001);
74 data->Draw(varName[type], buff);
75 h = (TH1D*)gPad->GetPrimitive("htemp");
77 ::Info("AliFlowDrawSummary", buff);
79 g->SetPoint(i, multPoints[i], h->GetRMS());
80 g->SetPointError(i, 0, h->GetRMS() / TMath::Sqrt(h->GetEntries()));
85 g->SetMarkerStyle(startMarker+j);
90 g->GetHistogram()->SetXTitle("Number of Good Tracks");
91 g->GetHistogram()->SetYTitle(yTitle[type]);
103 const char* info = "v2 = %.2f";
105 for (Int_t j=0; j<nV2Point; j++) {
108 if (type == 0) y = 30 - 3*y;
111 marker = new TMarker(3000, y+1, startMarker+j);
115 sprintf(buff, info, v2Points[j]);
116 text = new TText(3100, y, buff);
117 //text->SetTextColor(j-1);
125 sprintf(buffer, "plots/%s.eps", fileName);
126 c->Print(buffer, "eps");
128 sprintf(buffer, "plots/%s.gif", fileName);
129 c->Print(buffer, "gif");