update for 2012-02-27 meeting.
[u/mrichter/AliRoot.git] / PWGGA / PHOSTasks / PHOS_PbPb / macros / production / DrawMNN.C
CommitLineData
c59f15f2 1void DrawMNN()
2{
3 gROOT->LoadMacro("MakeRawProduction.C+g");
4
5 RawProduction::Output output;
6
7 const char* example1 = "kMB/pt003_hPi0M11";
8 TCanvas* canv = new TCanvas(example1, example1);
9 gStyle->SetOptFit(1);
10 TH1* hist = output.GetHistogram(example1);
11 hist->SetAxisRange(0.05, 0.3);
3da63262 12 hist->GetXaxis()->SetTitle("M_{#gamma#gamma}");
c59f15f2 13 hist->Draw();
18b446aa 14 canv->SaveAs("imgs/kMB_pt003_hPi0M11.pdf");
c59f15f2 15
16 const char* example2 = "kMB/pt003_hPi0M12";
17 TCanvas* canv = new TCanvas(example2, example2);
18 gStyle->SetOptFit(1);
19 TH1* hist = output.GetHistogram(example2);
20 hist->SetAxisRange(0.05, 0.3);
3da63262 21 hist->GetXaxis()->SetTitle("M_{#gamma#gamma}");
c59f15f2 22 hist->Draw();
18b446aa 23 canv->SaveAs(Form("imgs/kMB_pt003_hPi0M12.pdf", example2));
f4adc6d5 24
25
26
27 const char* badM11 = "kCentral/pt003_hPi0M11";
28 TCanvas* canv = new TCanvas(badM11, badM11);
29 gStyle->SetOptFit(1);
30 TH1* hist = output.GetHistogram(badM11);
31 hist->SetAxisRange(0.05, 0.3);
3da63262 32 hist->GetXaxis()->SetTitle("M_{#gamma#gamma}");
f4adc6d5 33 hist->Draw();
34 canv->SaveAs(Form("imgs/kCentral_pt003_hPi0M11.pdf", badM11));
35
36
37 const char* badM22 = "kCentral/pt003_hPi0M22";
38 TCanvas* canv = new TCanvas(badM22, badM22);
39 gStyle->SetOptFit(1);
40 TH1* hist = output.GetHistogram(badM22);
41 hist->SetAxisRange(0.05, 0.3);
3da63262 42 hist->GetXaxis()->SetTitle("M_{#gamma#gamma}");
f4adc6d5 43 hist->Draw();
44 canv->SaveAs(Form("imgs/kCentral_pt003_hPi0M22.pdf", badM22));
45
46
47 const char* badM33 = "kCentral/pt003_hPi0M33";
48 TCanvas* canv = new TCanvas(badM33, badM33);
49 gStyle->SetOptFit(1);
50 TH1* hist = output.GetHistogram(badM33);
51 hist->SetAxisRange(0.05, 0.3);
3da63262 52 hist->GetXaxis()->SetTitle("M_{#gamma#gamma}");
f4adc6d5 53 hist->Draw();
54 canv->SaveAs(Form("imgs/kCentral_pt003_hPi0M33.pdf", badM33));
c59f15f2 55
56
57
58 TStringToken triggers("kMB kCentral kSemiCentral kPHOSPb", " ");
59 while(triggers.NextToken()) {
60 canv = new TCanvas(Form("cMean_%s", triggers.Data()), Form("cMean_%s", triggers.Data()));
61
62 RawProduction::TriggerBin triggerBin(triggers);
63 TH1* hM11 = output.GetHistogram("M_M11", triggerBin);
64 TH1* hM12 = output.GetHistogram("M_M12", triggerBin);
65 TH1* hM13 = output.GetHistogram("M_M13", triggerBin);
66 TH1* hM22 = output.GetHistogram("M_M22", triggerBin);
67 TH1* hM23 = output.GetHistogram("M_M23", triggerBin);
68 TH1* hM33 = output.GetHistogram("M_M33", triggerBin);
69
70
71 hM12->SetMarkerStyle(24);
72 hM12->SetMarkerColor(kCyan+1);
73 hM12->SetLineColor(kCyan+1);
74 hM12->GetYaxis()->SetRangeUser(0.12, 0.15);
18b446aa 75 hM12->SetTitle(Form("#pi^{0} Peak Mean, %s", triggers.Data()));
3da63262 76 hM12->GetYaxis()->SetTitle("Peak #mu");
77 hM12->GetYaxis()->SetTitleOffset(1.3);
78 hM12->GetXaxis()->SetTitle("p_{T}");
c59f15f2 79 gStyle->SetOptStat(0);
80 hM12->Draw();
81
82 hM13->SetMarkerStyle(25);
83 hM13->SetMarkerColor(kMagenta);
84 hM13->SetLineColor(kMagenta);
85 hM13->Draw("same");
86
87 hM23->SetMarkerStyle(26);
88 hM23->SetMarkerColor(kYellow+1);
89 hM23->SetLineColor(kYellow+1);
90 hM23->Draw("same");
91
92
93 hM11->SetMarkerStyle(21);
94 hM11->SetMarkerColor(1);
95 hM11->SetLineColor(1);
96 hM11->GetYaxis()->SetRangeUser(0.12, 0.15);
97 hM11->Draw("same");
98
99 hM22->SetMarkerStyle(22);
100 hM22->SetMarkerColor(kRed);
101 hM22->SetLineColor(kRed);
102 hM22->Draw("same");
103
104 hM33->SetMarkerStyle(23);
105 hM33->SetMarkerColor(kGreen);
106 hM33->SetLineColor(kGreen);
107 hM33->Draw("same");
108
109 TLegend* leg = new TLegend(0.8,0.6,0.95,0.95);
110 leg->AddEntry(hM11, "M11", "lep");
111 leg->AddEntry(hM22, "M22", "lep");
112 leg->AddEntry(hM33, "M33", "lep");
113 leg->AddEntry(hM12, "M12", "lep");
114 leg->AddEntry(hM13, "M13", "lep");
115 leg->AddEntry(hM23, "M23", "lep");
116 leg->Draw();
117
118 canv->SaveAs(Form("imgs/MNN_Mean_%s.pdf", triggers.Data()));
f4adc6d5 119 canv->SaveAs(Form("imgs/MNN_Mean_%s.png", triggers.Data()));
c59f15f2 120
121
122
123 canv = new TCanvas(Form("cWidth_%s", triggers.Data()), Form("cWidth_%s", triggers.Data()));
124
125 TH1* hW11 = output.GetHistogram("W_M11", triggerBin);
126 TH1* hW12 = output.GetHistogram("W_M12", triggerBin);
127 TH1* hW13 = output.GetHistogram("W_M13", triggerBin);
128 TH1* hW22 = output.GetHistogram("W_M22", triggerBin);
129 TH1* hW23 = output.GetHistogram("W_M23", triggerBin);
130 TH1* hW33 = output.GetHistogram("W_M33", triggerBin);
131
132
133 hW12->SetMarkerStyle(24);
134 hW12->SetMarkerColor(kCyan+1);
135 hW12->SetLineColor(kCyan+1);
18b446aa 136 hW12->GetYaxis()->SetRangeUser(0., 0.012);
137 hW12->SetTitle(Form("#pi^{0} Peak Width, %s", triggers.Data()));
3da63262 138 hW12->GetYaxis()->SetTitle("Peak #sigma");
139 hW12->GetYaxis()->SetTitleOffset(1.3);
140 hW12->GetXaxis()->SetTitle("p_{T}");
c59f15f2 141 gStyle->SetOptStat(0);
142 hW12->Draw();
143
144 hW13->SetMarkerStyle(25);
145 hW13->SetMarkerColor(kMagenta);
146 hW13->SetLineColor(kMagenta);
147 hW13->Draw("same");
148
149 hW23->SetMarkerStyle(26);
150 hW23->SetMarkerColor(kYellow+1);
151 hW23->SetLineColor(kYellow+1);
152 hW23->Draw("same");
153
154
155 hW11->SetMarkerStyle(21);
156 hW11->SetMarkerColor(1);
157 hW11->SetLineColor(1);
158 hW11->GetYaxis()->SetRangeUser(0.12, 0.15);
159 hW11->Draw("same");
160
161 hW22->SetMarkerStyle(22);
162 hW22->SetMarkerColor(kRed);
163 hW22->SetLineColor(kRed);
164 hW22->Draw("same");
165
166 hW33->SetMarkerStyle(23);
167 hW33->SetMarkerColor(kGreen);
168 hW33->SetLineColor(kGreen);
169 hW33->Draw("same");
170
171 leg = new TLegend(0.8,0.6,0.95,0.95);
18b446aa 172 leg->AddEntry(hW11, "M11", "lep");
173 leg->AddEntry(hW22, "M22", "lep");
174 leg->AddEntry(hW33, "M33", "lep");
175 leg->AddEntry(hW12, "M12", "lep");
176 leg->AddEntry(hW13, "M13", "lep");
177 leg->AddEntry(hW23, "M23", "lep");
c59f15f2 178 leg->Draw();
179
180 canv->SaveAs(Form("imgs/MNN_Width_%s.pdf", triggers.Data()));
181 }
182}