]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG1/TPC/macros/MakeFinalSpectra.C
small changes in TPCITS
[u/mrichter/AliRoot.git] / PWG1 / TPC / macros / MakeFinalSpectra.C
CommitLineData
dfb7be8c 1void MakeFinalSpectra(const char *file, const char* comp)
2{
64becaf6 3 gStyle->SetPalette(1);
4 gStyle->SetNumberContours(50);
5
dfb7be8c 6 // open proper input file
7 TFile *inFile = TFile::Open(file);
8 inFile->cd();
9
10 TList *coutput = gFile->Get("TPC");
11
12 // Performance object
13 TString str(comp);
14
15 if(str.CompareTo("ALL") == 0)
16 {
17 AliPerformanceTPC * compObjTPC = (AliPerformanceTPC*)coutput->FindObject("AliPerformanceTPC");
18 compObjTPC->Analyse();
19 compObjTPC->GetAnalysisFolder()->ls("*");
20 compObjTPC->PrintHisto(kTRUE,"PerformanceTPCQA.ps");
21 TFile fout("PerformanceTPCQA.root","recreate");
22 compObjTPC->GetAnalysisFolder()->Write();
23 fout.Close();
24
25 inFile->cd();
26 AliPerformanceEff * compObjEff = (AliPerformanceEff*)coutput->FindObject("AliPerformanceEff");
27 compObjEff->Analyse();
28 compObjEff->GetAnalysisFolder()->ls("*");
29 compObjEff->PrintHisto(kTRUE,"PerformanceEffQA.ps");
30 TFile fout("PerformanceEffQA.root","recreate");
31 compObjEff->GetAnalysisFolder()->Write();
32 fout.Close();
33
34 inFile->cd();
35 AliPerformanceDCA * compObjDCA = (AliPerformanceDCA*)coutput->FindObject("AliPerformanceDCA");
36 compObjDCA->Analyse();
37 compObjDCA->GetAnalysisFolder()->ls("*");
38 compObjDCA->PrintHisto(kTRUE,"PerformanceDCAQA.ps");
39 TFile fout("PerformanceDCAQA.root","recreate");
40 compObjDCA->GetAnalysisFolder()->Write();
41 fout.Close();
42
43 inFile->cd();
44 AliPerformanceRes * compObjRes = (AliPerformanceRes*)coutput->FindObject("AliPerformanceRes");
45 compObjRes->Analyse();
46 compObjRes->GetAnalysisFolder()->ls("*");
47 compObjRes->PrintHisto(kTRUE,"PerformanceResQA.ps");
48 TFile fout("PerformanceResQA.root","recreate");
49 compObjRes->GetAnalysisFolder()->Write();
50 fout.Close();
51
52 inFile->cd();
53 AliPerformanceRes * compObjRes = (AliPerformanceRes*)coutput->FindObject("AliPerformanceResTPCInner");
54 compObjRes->Analyse();
55 compObjRes->GetAnalysisFolder()->ls("*");
56 compObjRes->PrintHisto(kTRUE,"PerformanceResTPCInnerQA.ps");
57 TFile fout("PerformanceResTPCInnerQA.root","recreate");
58 compObjRes->GetAnalysisFolder()->Write();
59 fout.Close();
60
61 inFile->cd();
62 AliPerformanceRes * compObjRes = (AliPerformanceRes*)coutput->FindObject("AliPerformanceResTPCOuter");
63 compObjRes->Analyse();
64 compObjRes->GetAnalysisFolder()->ls("*");
65 compObjRes->PrintHisto(kTRUE,"PerformanceResTPCOuterQA.ps");
66 TFile fout("PerformanceResTPCOuterQA.root","recreate");
67 compObjRes->GetAnalysisFolder()->Write();
68 fout.Close();
69
70 inFile->cd();
71 AliPerformanceDEdx* compObjDEdx = (AliPerformanceDEdx*)coutput->FindObject("AliPerformanceDEdxTPCInner");
72 compObjDEdx->Analyse();
73 compObjDEdx->GetAnalysisFolder()->ls("*");
74 compObjDEdx->PrintHisto(kTRUE,"PerformanceDEdxTPCInnerQA.ps");
75 TFile fout("PerformanceDEdxTPCInnerQA.root","recreate");
76 compObjDEdx->GetAnalysisFolder()->Write();
77 fout.Close();
78
79 inFile->cd();
80 AliPerformanceMatch * compObjMatchTPCITS = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCITS");
81 compObjMatchTPCITS->Analyse();
82 compObjMatchTPCITS->GetAnalysisFolder()->ls("*");
83 compObjMatchTPCITS->PrintHisto(kTRUE,"PerformanceMatchTPCITSQA.ps");
84 TFile fout("PerformanceMatchTPCITSQA.root","recreate");
85 compObjMatchTPCITS->GetAnalysisFolder()->Write();
86 fout.Close();
87
88 inFile->cd();
89 AliPerformanceMatch * compObjMatchTPCTRD = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCTRD");
90 compObjMatchTPCTRD->Analyse();
91 compObjMatchTPCTRD->GetAnalysisFolder()->ls("*");
92 compObjMatchTPCTRD->PrintHisto(kTRUE,"PerformanceMatchTPCTRDQA.ps");
93 TFile fout("PerformanceMatchTPCTRDQA.root","recreate");
94 compObjMatchTPCTRD->GetAnalysisFolder()->Write();
95 fout.Close();
96
97inFile->cd();
98 AliPerformanceMatch * compObjMatchTPCEFF = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCEFF");
99 compObjMatchTPCEFF->Analyse();
100 compObjMatchTPCEFF->GetAnalysisFolder()->ls("*");
101 compObjMatchTPCEFF->PrintHisto(kTRUE,"PerformanceMatchTPCEFFQA.ps");
102 TFile fout("PerformanceMatchTPCEFFQA.root","recreate");
103 compObjMatchTPCEFF->GetAnalysisFolder()->Write();
104 fout.Close();
105 }
106 else if(str.CompareTo("NO_MC") == 0)
107 {
108 AliPerformanceTPC * compObjTPC = (AliPerformanceTPC*)coutput->FindObject("AliPerformanceTPC");
109 compObjTPC->Analyse();
110 compObjTPC->GetAnalysisFolder()->ls("*");
111 compObjTPC->PrintHisto(kTRUE,"PerformanceTPCQA.ps");
112 TFile fout("PerformanceTPCQA.root","recreate");
113 compObjTPC->GetAnalysisFolder()->Write();
114 fout.Close();
115
116 inFile->cd();
117 AliPerformanceDCA * compObjDCA = (AliPerformanceDCA*)coutput->FindObject("AliPerformanceDCA");
118 compObjDCA->Analyse();
119 compObjDCA->GetAnalysisFolder()->ls("*");
120 compObjDCA->PrintHisto(kTRUE,"PerformanceDCAQA.ps");
121 TFile fout("PerformanceDCAQA.root","recreate");
122 compObjDCA->GetAnalysisFolder()->Write();
123 fout.Close();
124
125 inFile->cd();
126 AliPerformanceDEdx* compObjDEdx = (AliPerformanceDEdx*)coutput->FindObject("AliPerformanceDEdxTPCInner");
127 compObjDEdx->Analyse();
128 compObjDEdx->GetAnalysisFolder()->ls("*");
129 compObjDEdx->PrintHisto(kTRUE,"PerformanceDEdxTPCInnerQA.ps");
130 TFile fout("PerformanceDEdxTPCInnerQA.root","recreate");
131 compObjDEdx->GetAnalysisFolder()->Write();
132 fout.Close();
133
134 inFile->cd();
135 AliPerformanceMatch * compObjMatchTPCITS = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCITS");
136 compObjMatchTPCITS->Analyse();
137 compObjMatchTPCITS->GetAnalysisFolder()->ls("*");
138 compObjMatchTPCITS->PrintHisto(kTRUE,"PerformanceMatchTPCITSQA.ps");
139 TFile fout("PerformanceMatchTPCITSQA.root","recreate");
140 compObjMatchTPCITS->GetAnalysisFolder()->Write();
141 fout.Close();
142
143 inFile->cd();
144 AliPerformanceMatch * compObjMatchTPCTRD = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCTRD");
145 compObjMatchTPCTRD->Analyse();
146 compObjMatchTPCTRD->GetAnalysisFolder()->ls("*");
147 compObjMatchTPCTRD->PrintHisto(kTRUE,"PerformanceMatchTPCTRDQA.ps");
148 TFile fout("PerformanceMatchTPCTRDQA.root","recreate");
149 compObjMatchTPCTRD->GetAnalysisFolder()->Write();
150 fout.Close();
151
152inFile->cd();
153 AliPerformanceMatch * compObjMatchTPCEFF = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCEFF");
154 compObjMatchTPCEFF->Analyse();
155 compObjMatchTPCEFF->GetAnalysisFolder()->ls("*");
156 compObjMatchTPCEFF->PrintHisto(kTRUE,"PerformanceMatchTPCEFFQA.ps");
157 TFile fout("PerformanceMatchTPCEFFQA.root","recreate");
158 compObjMatchTPCEFF->GetAnalysisFolder()->Write();
159 fout.Close();
160 }
161 else if(str.CompareTo("TPC") == 0)
162 {
163 inFile->cd();
164 AliPerformanceTPC * compObjTPC = (AliPerformanceTPC*)coutput->FindObject("AliPerformanceTPC");
165 compObjTPC->Analyse();
166 compObjTPC->GetAnalysisFolder()->ls("*");
167 compObjTPC->PrintHisto(kTRUE,"PerformanceTPCQA.ps");
168 TFile fout("PerformanceTPCQA.root","recreate");
169 compObjTPC->GetAnalysisFolder()->Write();
170 fout.Close();
171 }
172 else if(str.CompareTo("EFF") == 0)
173 {
174 inFile->cd();
175 AliPerformanceEff * compObjEff = (AliPerformanceEff*)coutput->FindObject("AliPerformanceEff");
176 compObjEff->Analyse();
177 compObjEff->GetAnalysisFolder()->ls("*");
178 compObjEff->PrintHisto(kTRUE,"PerformanceEffQA.ps");
179 TFile fout("PerformanceEffQA.root","recreate");
180 compObjEff->GetAnalysisFolder()->Write();
181 fout.Close();
182 }
183 else if(str.CompareTo("RES") == 0)
184 {
185 inFile->cd();
186 AliPerformanceRes * compObjRes = (AliPerformanceRes*)coutput->FindObject("AliPerformanceRes");
187 compObjRes->Analyse();
188 compObjRes->GetAnalysisFolder()->ls("*");
189 compObjRes->PrintHisto(kTRUE,"PerformanceResQA.ps");
190 TFile fout("PerformanceResQA.root","recreate");
191 compObjRes->GetAnalysisFolder()->Write();
192 fout.Close();
193
194 inFile->cd();
195 AliPerformanceRes * compObjRes = (AliPerformanceRes*)coutput->FindObject("AliPerformanceResTPCInner");
196 compObjRes->Analyse();
197 compObjRes->GetAnalysisFolder()->ls("*");
198 compObjRes->PrintHisto(kTRUE,"PerformanceResTPCInnerQA.ps");
199 TFile fout("PerformanceResTPCInnerQA.root","recreate");
200 compObjRes->GetAnalysisFolder()->Write();
201 fout.Close();
202 }
203 else if(str.CompareTo("DEDX") == 0)
204 {
205 inFile->cd();
206 AliPerformanceDEdx* compObjDEdx = (AliPerformanceDEdx*)coutput->FindObject("AliPerformanceDEdxTPCInner");
207 compObjDEdx->Analyse();
208 compObjDEdx->GetAnalysisFolder()->ls("*");
209 compObjDEdx->PrintHisto(kTRUE,"PerformanceDEdxTPCInnerQA.ps");
210 TFile fout("PerformanceDEdxTPCInnerQA.root","recreate");
211 compObjDEdx->GetAnalysisFolder()->Write();
212 fout.Close();
213 }
214 else if(str.CompareTo("DCA") == 0)
215 {
216 inFile->cd();
217 AliPerformanceDCA * compObjDCA = (AliPerformanceDCA*)coutput->FindObject("AliPerformanceDCA");
218 compObjDCA->Analyse();
219 compObjDCA->GetAnalysisFolder()->ls("*");
220 compObjDCA->PrintHisto(kTRUE,"PerformanceDCAQA.ps");
221 TFile fout("PerformanceDCAQA.root","recreate");
222 compObjDCA->GetAnalysisFolder()->Write();
223 fout.Close();
224 }
225 else if(str.CompareTo("MATCH") == 0)
226 {
227 inFile->cd();
228 AliPerformanceMatch * compObjMatchTPCITS = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCITS");
229 compObjMatchTPCITS->Analyse();
230 compObjMatchTPCITS->GetAnalysisFolder()->ls("*");
231 compObjMatchTPCITS->PrintHisto(kTRUE,"PerformanceMatchTPCITSQA.ps");
232 TFile fout("PerformanceMatchTPCITSQA.root","recreate");
233 compObjMatchTPCITS->GetAnalysisFolder()->Write();
234 fout.Close();
235
236 inFile->cd();
237 AliPerformanceMatch * compObjMatchTPCTRD = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCTRD");
238 compObjMatchTPCTRD->Analyse();
239 compObjMatchTPCTRD->GetAnalysisFolder()->ls("*");
240 compObjMatchTPCTRD->PrintHisto(kTRUE,"PerformanceMatchTPCTRDQA.ps");
241 TFile fout("PerformanceMatchTPCTRDQA.root","recreate");
242 compObjMatchTPCTRD->GetAnalysisFolder()->Write();
243 fout.Close();
244
245inFile->cd();
246 AliPerformanceMatch * compObjMatchTPCEFF = (AliPerformanceMatch*)coutput->FindObject("AliPerformanceMatchTPCEFF");
247 compObjMatchTPCEFF->Analyse();
248 compObjMatchTPCEFF->GetAnalysisFolder()->ls("*");
249 compObjMatchTPCEFF->PrintHisto(kTRUE,"PerformanceMatchTPCEFFQA.ps");
250 TFile fout("PerformanceMatchTPCEFFQA.root","recreate");
251 compObjMatchTPCEFF->GetAnalysisFolder()->Write();
252 fout.Close();
253 }
254}