]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - FLOW/AliFlowDist.C
Implementing of new function to check for holes (M.Ivanov)
[u/mrichter/AliRoot.git] / FLOW / AliFlowDist.C
... / ...
CommitLineData
1//
2// This macro is a part of "Alice PPR fast flow analysis package"
3//
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
9//
10// INPUT PARAMETERS:
11// type: type of plot:
12// 0 - Event Plane Resolution
13// 1 - Sub-Events Correlation
14// 2 - V2 distribution
15//
16// info: if !0 display histogram info
17//
18// if (plotName != 0) two files are created in "plots" directory
19// plotName.eps and plotMame.gif
20//
21// Sylwester Radomski, GSI
22// mail: S.Radomski@gsi
23// 23. Oct. 2002
24//
25
26
27AliFlowDist(int multiplicity, float trueV2, int type = 0, int info = 0,
28 const char *plotName = 0) {
29
30 gROOT->SetStyle("Plain");
31 gStyle->SetOptTitle(0);
32
33 if (info) gStyle->SetOptStat(1110);
34 else gStyle->SetOptStat(0);
35
36
37 if (type > 2 || type < 0) {
38 ::Error("AliFlowDrawSummary","Wrong Type [0-1] : %d", type);
39 return;
40 }
41
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)" };
45
46 const char *xTitle[3] = {"Event Plane Resolution [deg]",
47 "Sub-Events Correlation [deg]",
48 "V_{2}"};
49
50 const char *where = "Mult == %d && (trueV2 > %f) && (trueV2 < %f)";
51
52 TFile *inFile = new TFile("flowPicoEvent.root");
53 TNtuple *data = (TNtuple*) inFile->Get("flowData");
54
55 char buff[80];
56 sprintf(buff, where, multiplicity, trueV2-0.001, trueV2+0.001);
57
58 data->Draw(what[type], buff, "");
59
60 TH1 *h = (TH1*)gPad->FindObject("htemp");
61 h->GetXaxis()->SetTitle(xTitle[type]);
62
63 gPad->SetTicks(1,1);
64 //gPad->Update();
65
66 if (plotName) {
67
68 char buffer[60];
69
70 sprintf(buffer, "plots/%s.eps", plotName);
71 gPad->Print(buffer, "eps");
72
73 sprintf(buffer, "plots/%s.gif", plotName);
74 gPad->Print(buffer, "gif");
75 }
76}