2 // This macro is a part of "Alice PPR fast flow analysis package"
4 // The macro draw event plane resolution for a given
5 // multiplicity and V2. As source data it is using
6 // "flowData" NTuple in "flowPicoEvent.root" file.
7 // Data source structure have to be created
8 // by AliFlowCreate.C and filed by AliFlowReconstruction.C
11 // type: type of plot:
12 // 0 - Event Plane Resolution
13 // 1 - Sub-Events Correlation
14 // 2 - V2 distribution
16 // info: if !0 display histogram info
18 // if (plotName != 0) two files are created in "plots" directory
19 // plotName.eps and plotMame.gif
21 // Sylwester Radomski, GSI
22 // mail: S.Radomski@gsi
27 AliFlowDist(int multiplicity, float trueV2, int type = 0, int info = 0,
28 const char *plotName = 0) {
30 gROOT->SetStyle("Plain");
31 gStyle->SetOptTitle(0);
33 if (info) gStyle->SetOptStat(1110);
34 else gStyle->SetOptStat(0);
37 if (type > 2 || type < 0) {
38 ::Error("AliFlowDrawSummary","Wrong Type [0-1] : %d", type);
42 const char *what[3] = {"Psi - truePsi>> htemp(40,-40,40)",
43 "PsiA - PsiB >> htemp(40,-40,40)",
44 "V2 >> htemp(40,0.0, 0.14)" };
46 const char *xTitle[3] = {"Event Plane Resolution [deg]",
47 "Sub-Events Correlation [deg]",
50 const char *where = "Mult == %d && (trueV2 > %f) && (trueV2 < %f)";
52 TFile *inFile = new TFile("flowPicoEvent.root");
53 TNtuple *data = (TNtuple*) inFile->Get("flowData");
56 sprintf(buff, where, multiplicity, trueV2-0.001, trueV2+0.001);
58 data->Draw(what[type], buff, "");
60 TH1 *h = (TH1*)gPad->FindObject("htemp");
61 h->GetXaxis()->SetTitle(xTitle[type]);
70 sprintf(buffer, "plots/%s.eps", plotName);
71 gPad->Print(buffer, "eps");
73 sprintf(buffer, "plots/%s.gif", plotName);
74 gPad->Print(buffer, "gif");