]>
Commit | Line | Data |
---|---|---|
0bca1a77 | 1 | #if !defined(__CINT__) || defined(__MAKECINT__) |
2 | #include <TFile.h> | |
3 | #include <TFileMerger.h> | |
4 | #include <TAlienFile.h> | |
5 | #include <TSystem.h> | |
6 | #include <TGrid.h> | |
7 | #include <TGridResult.h> | |
8 | #include <Riostream.h> | |
9 | #include <TObjArray.h> | |
10 | #include <TClass.h> | |
11 | #include <TKey.h> | |
2a250bc5 | 12 | #include <TFile.h> |
13 | #include <TFileMerger.h> | |
14 | #include <TAlienFile.h> | |
15 | //#include <TExec.h> | |
16 | #include <TSystem.h> | |
17 | #include <TGrid.h> | |
18 | #include <TGridResult.h> | |
19 | #include <Riostream.h> | |
20 | #include <TObjArray.h> | |
21 | #include <TClass.h> | |
22 | #include <TH1F.h> | |
23 | #include <TH2D.h> | |
24 | #include <TH2F.h> | |
25 | #include <TF1.h> | |
26 | #include <TStyle.h> | |
27 | #include <TCanvas.h> | |
28 | #include <TLegend.h> | |
29 | #include <TMath.h> | |
30 | #include "AliRecoParam.h" | |
0bca1a77 | 31 | #endif |
32 | ||
2a250bc5 | 33 | enum rawexpert_t{pattern,patternnorm,layer3norm,layer4norm,layer3occ,layer4occ,rawtot}; |
0bca1a77 | 34 | enum nonrawexpert_t{layer3,layer4,nonrawtot}; |
35 | ||
2a250bc5 | 36 | enum rpexpert_t{rlocaldistro,rlayer3norm,rlayer4norm,rmodpattern,rmodpatternnorm,rphilayer3,rphilayer4,rrlayer3,rrlayer4,occlayer3,occlayer4,recraw2dlayer3,recraw2dlayer4,recrawlayer3,recrawlayer4,dedxlayer3,dedxlayer4,rtot}; |
0bca1a77 | 37 | enum rnonexpert_t{rphizlayer3,rphizlayer4,rglobalrz,rglobalxy,rchargelayer3,rchargelayer4,rtimelayer3,rtimelayer4,rlayer3,rlayer4,nrtot}; |
38 | ||
2a250bc5 | 39 | enum canvsname_t{canvname0,canvname1,canvname2,canvname3,canvname4,canvname5,canvname6,canvname7,canvname8,canvname9,canvname10,canvname11,canvname12,canvname13,canvname14,canvname15,canvname16,canvname17,canvname18,canvname19,canvname20,canvname21,canvname22,canvname23};// |
0bca1a77 | 40 | |
2a250bc5 | 41 | |
42 | ||
43 | void PlotQASDD(Char_t fileName[100]="File.QA.111333.2010.LHC09b.pass2.root",Char_t eventspecie[25]="LowMultiplicity",Bool_t kDoEps=kFALSE) | |
0bca1a77 | 44 | { |
2a250bc5 | 45 | const TString Rawsexpertname[]={"SDDModPattern","SDDModPatternNORM","SDDphizL3","SDDphizL4","SDDL3_RelativeOccupancy","SDDL4_RelativeOccupancy"};//6 |
46 | const TString Rawsnonexpertname[]={"SDDphizL3NORM","SDDphizL4NORM"};//2 | |
47 | ||
48 | const TString RecPointsexpertname[]={"SDDLocalCoordDistrib","SDDModPatternL3RP","SDDModPatternL4RP","SDDModPatternRP","SDDModPatternRPNORM","SDDphidistrib_Layer3","SDDphidistrib_Layer4","SDDrdistrib_Layer3","SDDrdistrib_Layer4","SDDL3_RelativeOccupancy","SDDL4_RelativeOccupancy","SDDL3_Rec2Raw_2D","SDDL4_Rec2Raw_2D","SDDL3_Rec2Raw","SDDL4_Rec2Raw","SDDL3_dedx","SDDL4_dedx"};//17 | |
49 | const TString RecPointsnonexpertname[]={"SDDGlobalCoordDistribL3PHIZ","SDDGlobalCoordDistribL4PHIZ","SDDGlobalCoordDistribRZ","SDDGlobalCoordDistribYX","SDDLay3TotCh","SDDLay4TotCh","SDDdrifttime_Layer3","SDDdrifttime_Layer4","SDDModPatternL3RPNORM","SDDModPatternL4RPNORM"};//10 | |
0bca1a77 | 50 | |
2a250bc5 | 51 | const TString canvassavedname[]={"RawLayers","Rawpatterns","RawLayersNORM","RawLayersRelOcc","RawLayersRelOccBoth","RecPointsphiz","RecPointsGlobalDistributions","RecPointsCharge","RecPointsDriftTime","RecPointsLocalDistribution","RecPointsLayers","RecPointsLayersNORM","RecPointsLayersPatterns","RecPointsPhiDistribution","RecPointsRDistribution","RecPointsChargeBothLayers","RecPointsDriftTimeBothLayers","RecPointsRelLayersOcc","RecPointsLayersRelOccBoth","RecPointsLayersRecRaw2D","RecPointsLayersRecRaw","RecPointsLayersRecRaw","RecPointsLayersRecRawBoth","RecPointsLayersdedx","RecPointsLayersdedxBoth"};//15 |
52 | ||
53 | Char_t trendfile[25]="FileQAtrend.root"; | |
0bca1a77 | 54 | |
0bca1a77 | 55 | |
56 | gStyle->SetPalette(1); | |
2a250bc5 | 57 | // gStyle->SetOptStat("ne"); |
58 | if(gSystem->Exec(Form("ls %s >/dev/null 2>&1", fileName))!=0) | |
59 | { | |
60 | printf(" No file created --- Exit"); | |
0bca1a77 | 61 | return; |
62 | } | |
2a250bc5 | 63 | TFile mergedfile(fileName); |
64 | if(mergedfile.GetKey("ITS")==0x0){ | |
65 | printf("In this run ITS QA has not been executed.\n\nExit macro \n\n"); | |
66 | return; | |
67 | } | |
0bca1a77 | 68 | Char_t filepath[100]; |
69 | Char_t namecanvas[50]; | |
70 | TDirectory *directory=NULL; | |
71 | TDirectory *directory2=NULL; | |
72 | Char_t histoname[200]; | |
73 | TH2D *historaw=NULL; | |
74 | TH1F *historaw2=NULL; | |
75 | TH2F *histodraw=NULL; | |
2a250bc5 | 76 | |
77 | TH1F *histo2save[9]; | |
78 | for(Int_t i=0;i<9;i++){histo2save[i]=NULL;} | |
79 | ||
80 | TF1 *f1 = new TF1("f1","1",-100000,100000); // this is the function defined to multiply histograms | |
81 | Char_t layer[10]; | |
82 | float fmax=0.; | |
83 | float fmaxold=0.; | |
84 | float fmaxmargin; | |
85 | ||
86 | Int_t cannum=0; | |
87 | Int_t histo2savenumber[9]={4,5,6,7,7,8,3,5,1}; | |
0bca1a77 | 88 | TCanvas *canvas1 = new TCanvas("canvas1","SDD QA Plot",1000,600); |
2a250bc5 | 89 | // TLegend *legend=new TLegend(0.83,0.8,0.97,0.7); |
90 | TLegend *legend=new TLegend(0.81,0.895,0.95,0.995); | |
91 | Bool_t updatecanvas[2]; | |
92 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
0bca1a77 | 93 | |
2a250bc5 | 94 | // -------------This part is to read the number of chunks that were merged |
95 | Float_t fChnknmbr=0.; | |
96 | FILE * pChunkNumber = fopen ("ChunkNumber.txt","r"); | |
97 | fscanf(pChunkNumber, "%f", &fChnknmbr); | |
98 | fclose (pChunkNumber); | |
99 | gStyle->SetPalette(1); | |
100 | float fCNinv=1./fChnknmbr; | |
101 | // printf("\n====================>%f\n\n", fCNinv); | |
0bca1a77 | 102 | |
0bca1a77 | 103 | if(!mergedfile.IsOpen()){return;}else{printf("file is open\n");} |
104 | for(Int_t ispecie=0;ispecie<AliRecoParam::kNSpecies;ispecie++){ | |
105 | //__________________________________________________________________ | |
106 | //raw data | |
107 | sprintf(filepath,"ITS/Raws/%s",AliRecoParam::GetEventSpecieName(ispecie)); | |
108 | printf("%s",filepath); | |
109 | TString especie(filepath); | |
110 | if(!especie.Contains(eventspecie)){printf("...Found and Skipped\n");continue;} | |
111 | canvas1->Print("SDDQAPlot.ps["); | |
112 | directory=(TDirectory*)mergedfile.Get(filepath); | |
113 | if(!directory){printf("...Not Found\n ");}//faccio l'istogramma | |
114 | else{ | |
115 | printf("...Found: The histograms of this EventSpecie will be displayed\n"); | |
116 | printf("1\n"); | |
117 | canvas1->Clear(); | |
118 | canvas1->Divide(2,1); | |
2a250bc5 | 119 | |
0bca1a77 | 120 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} |
2a250bc5 | 121 | for(Int_t iraws=2;iraws<4;iraws++){//non expert raws |
122 | canvas1->cd(iraws-1); | |
123 | ||
124 | sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),Rawsexpertname[iraws].Data()); | |
125 | printf("histo name %s ",Rawsexpertname[iraws].Data()); | |
0bca1a77 | 126 | historaw=(TH2D*)mergedfile.Get(histoname); |
127 | if(historaw){printf("...Found\n");historaw->DrawCopy("colz");} | |
2a250bc5 | 128 | else{updatecanvas[iraws-2]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} |
0bca1a77 | 129 | historaw=NULL; |
130 | }//end for | |
2a250bc5 | 131 | |
0bca1a77 | 132 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) |
133 | { | |
134 | canvas1->Update(); | |
2a250bc5 | 135 | if(kDoEps){ |
136 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
137 | canvas1->SaveAs(namecanvas); | |
138 | } | |
0bca1a77 | 139 | canvas1->Print("SDDQAPlot.ps"); |
140 | } | |
141 | //else{delete canvas1; canvas1=NULL;} | |
142 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
2a250bc5 | 143 | canvas1->Clear(); |
144 | canvas1->Divide(1,2); | |
145 | printf("2 \n"); | |
146 | cannum++; | |
147 | for(Int_t inraws=0;inraws<2;inraws++){//non expert raws | |
148 | canvas1->cd(inraws+1); | |
149 | sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),Rawsexpertname[inraws].Data()); | |
150 | printf("histo name %s ",Rawsexpertname[inraws].Data()); | |
151 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
152 | ||
153 | ||
154 | // -----------------This is the part were I divide between the number of chunks to normalize the histogram---------------- | |
155 | ||
156 | ||
157 | if(historaw2) | |
0bca1a77 | 158 | { |
2a250bc5 | 159 | printf("...Found\n"); |
160 | if (inraws==1) | |
161 | { | |
162 | historaw2->Multiply(f1,fCNinv); | |
163 | ||
164 | } | |
165 | historaw2->DrawCopy(); | |
166 | } | |
167 | else{updatecanvas[inraws]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
168 | historaw2=NULL; | |
169 | }//end for | |
170 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
171 | { | |
172 | canvas1->Update(); | |
173 | if(kDoEps){ | |
174 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
0bca1a77 | 175 | canvas1->SaveAs(namecanvas); |
2a250bc5 | 176 | } |
177 | canvas1->Print("SDDQAPlot.ps"); | |
178 | } | |
179 | //else{delete canvas2; canvas2=NULL;} | |
180 | ||
181 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
182 | printf("3\n"); | |
183 | cannum++; | |
184 | canvas1->Clear(); | |
185 | canvas1->Divide(2,1); | |
186 | for(Int_t iraws=0;iraws<2;iraws++){//non expert raws | |
187 | canvas1->cd(iraws+1); | |
188 | ||
189 | sprintf(histoname,"%s/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),Rawsnonexpertname[iraws].Data()); | |
190 | printf("histo name %s",Rawsnonexpertname[iraws].Data()); | |
191 | historaw=(TH2D*)mergedfile.Get(histoname); | |
192 | if(historaw){ | |
193 | printf("...Found\n"); | |
194 | historaw->Multiply(f1,fCNinv); | |
195 | historaw->DrawCopy("colz"); | |
196 | } | |
197 | else | |
198 | {updatecanvas[iraws]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
199 | historaw=NULL; | |
200 | }//end for | |
201 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
202 | { | |
203 | canvas1->Update(); | |
204 | if(kDoEps){ | |
205 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
206 | canvas1->SaveAs(namecanvas); | |
207 | } | |
208 | canvas1->Print("SDDQAPlot.ps"); | |
209 | } | |
210 | //else{delete canvas3; canvas3=NULL;} | |
211 | ||
212 | //--------------------- new plots | |
213 | printf("================= 4\n"); | |
214 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
215 | cannum++; | |
216 | canvas1->Clear(); | |
217 | canvas1->Divide(2,1); | |
218 | for(Int_t iraws=4;iraws<rawtot;iraws++){//non expert raws | |
219 | canvas1->cd(iraws-3); | |
220 | sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),Rawsexpertname[iraws].Data()); | |
221 | printf("histo name %s",Rawsexpertname[iraws].Data()); | |
222 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
223 | if(historaw2) | |
0bca1a77 | 224 | { |
2a250bc5 | 225 | printf("...Found\n"); |
226 | historaw2->DrawCopy(); | |
227 | }else | |
228 | { | |
229 | updatecanvas[iraws-4]=kFALSE; | |
230 | printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n"); | |
231 | } | |
232 | historaw2=NULL; | |
233 | }//end for | |
234 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
235 | { | |
236 | canvas1->Update(); | |
237 | if(kDoEps){ | |
238 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
0bca1a77 | 239 | canvas1->SaveAs(namecanvas); |
2a250bc5 | 240 | } |
241 | canvas1->Print("SDDQAPlot.ps"); | |
242 | } | |
243 | //else{delete canvas3; canvas3=NULL;} | |
244 | ||
245 | ||
246 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
247 | canvas1->Clear(); | |
248 | legend->Clear(); | |
249 | printf("14\n"); | |
250 | cannum++; | |
251 | for (Int_t i=4;i<rawtot;i++){ | |
252 | sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),Rawsexpertname[i].Data()); | |
253 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
254 | if(historaw2){ | |
255 | fmax=historaw2->GetMaximum(); | |
256 | if (i==4){ | |
257 | fmaxold=fmax;} | |
258 | if (i!=4){ | |
259 | if(fmaxold<fmax){ | |
260 | fmaxold=fmax; | |
261 | } | |
262 | } | |
0bca1a77 | 263 | } |
2a250bc5 | 264 | historaw2=NULL; |
265 | } | |
266 | fmaxmargin=1.1*fmaxold; | |
267 | for(Int_t irrpp=4;irrpp<rawtot;irrpp++){//non expert raws | |
268 | ||
269 | sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),Rawsexpertname[irrpp].Data()); | |
270 | printf("histo name %s",Rawsexpertname[irrpp].Data()); | |
271 | sprintf(layer, "layer %d",irrpp-1); | |
272 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
273 | gStyle->SetOptStat(0); | |
274 | ||
275 | if(historaw2) | |
0bca1a77 | 276 | { |
2a250bc5 | 277 | printf("...Found\n"); |
278 | historaw2->GetYaxis()->SetRangeUser(0,fmaxmargin); | |
279 | historaw2->SetTitle("Raw Relative Occupancy"); | |
280 | if (irrpp==4) {historaw2->SetStats(0);historaw2->SetLineColor(2);historaw2->DrawCopy();} | |
281 | if (irrpp!=4) {historaw2->SetStats(0);historaw2->SetLineColor(4);historaw2->DrawCopy("same");} | |
282 | legend->AddEntry(historaw2,layer,"l"); | |
283 | legend->Draw(); | |
0bca1a77 | 284 | canvas1->Update(); |
2a250bc5 | 285 | } |
286 | else{updatecanvas[irrpp-4]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
287 | historaw2=NULL; | |
288 | }//end for | |
289 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
290 | { | |
291 | canvas1->Update(); | |
292 | if(kDoEps){ | |
293 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
294 | canvas1->SaveAs(namecanvas); | |
295 | } | |
296 | canvas1->Print("SDDQAPlot.ps"); | |
297 | } | |
298 | ||
299 | }//end if directory | |
300 | ||
301 | ||
302 | ||
303 | //_______________________________________________________________________________ | |
304 | //rec point | |
305 | sprintf(filepath,"ITS/RecPoints/%s",AliRecoParam::GetEventSpecieName(ispecie)); | |
306 | printf("%s\n",filepath); | |
307 | directory2=(TDirectory*)mergedfile.Get(filepath); | |
308 | if(directory2){ | |
309 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
310 | canvas1->Clear(); | |
311 | canvas1->Divide(2,1); | |
312 | printf("4\n"); | |
313 | cannum++; | |
314 | for(Int_t irp=0;irp<2;irp++){//non expert rec point | |
315 | canvas1->cd(irp+1); | |
316 | ||
317 | sprintf(histoname,"%s/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsnonexpertname[irp].Data()); | |
318 | printf("histo name %s ",RecPointsnonexpertname[irp].Data()); | |
319 | histodraw=(TH2F*)mergedfile.Get(histoname); | |
320 | if(histodraw){printf("...Found\n");histodraw->DrawCopy("colz");}else{updatecanvas[irp]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
321 | histodraw=NULL; | |
322 | } | |
323 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
324 | { | |
325 | canvas1->Update(); | |
326 | if(kDoEps){ | |
327 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
0bca1a77 | 328 | canvas1->SaveAs(namecanvas); |
0bca1a77 | 329 | } |
2a250bc5 | 330 | canvas1->Print("SDDQAPlot.ps"); |
331 | } | |
332 | // else{delete canvas4; canvas4=NULL;} | |
333 | ||
334 | ||
335 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
336 | canvas1->Clear(); | |
337 | canvas1->Divide(2,1); | |
338 | printf("5\n"); | |
339 | cannum++; | |
340 | for(Int_t irrp=2;irrp<4;irrp++){//non expert raws | |
341 | canvas1->cd(irrp-1); | |
342 | ||
343 | sprintf(histoname,"%s/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsnonexpertname[irrp].Data()); | |
344 | printf("histo name %s",RecPointsnonexpertname[irrp].Data() ); | |
345 | histodraw=(TH2F*)mergedfile.Get(histoname); | |
346 | if(histodraw){printf("...Found\n");histodraw->DrawCopy("colz");}else{updatecanvas[irrp-2]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
347 | histodraw=NULL; | |
348 | } | |
349 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
350 | { | |
351 | canvas1->Update(); | |
352 | if(kDoEps){ | |
353 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
354 | canvas1->SaveAs(namecanvas); | |
355 | } | |
356 | canvas1->Print("SDDQAPlot.ps"); | |
357 | } | |
358 | //else{delete canvas5; canvas5=NULL;} | |
359 | ||
360 | ||
361 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
362 | canvas1->Clear(); | |
363 | canvas1->Divide(1,2); | |
364 | printf("6\n"); | |
365 | cannum++; | |
366 | for(Int_t irrpp=4;irrpp<6;irrpp++){//non expert raws | |
367 | canvas1->cd(irrpp-3); | |
368 | ||
369 | sprintf(histoname,"%s/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsnonexpertname[irrpp].Data()); | |
370 | printf("histo name %s",RecPointsnonexpertname[irrpp].Data()); | |
371 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
372 | ||
373 | if(historaw2){printf("...Found\n");historaw2->DrawCopy();}else{updatecanvas[irrpp-4]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
374 | historaw2=NULL; | |
375 | }//end for | |
376 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
377 | { | |
378 | canvas1->Update(); | |
379 | if(kDoEps){ | |
380 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
381 | canvas1->SaveAs(namecanvas); | |
382 | } | |
383 | canvas1->Print("SDDQAPlot.ps"); | |
384 | } | |
385 | //else{delete canvas6; canvas6=NULL;} | |
386 | ||
387 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
388 | canvas1->Clear(); | |
389 | canvas1->Divide(1,2); | |
390 | printf("7\n"); | |
391 | cannum++; | |
392 | for(Int_t irrpp=6;irrpp<8;irrpp++){//non expert raws | |
393 | canvas1->cd(irrpp-5); | |
394 | // printf("histo name\n"); | |
395 | sprintf(histoname,"%s/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsnonexpertname[irrpp].Data()); | |
396 | printf("histo name %s",RecPointsnonexpertname[irrpp].Data()); | |
397 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
398 | if(historaw2){printf("...Found\n");historaw2->DrawCopy();}else{updatecanvas[irrpp-6]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
399 | historaw2=NULL; | |
400 | }//end for | |
401 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
402 | { | |
403 | canvas1->Update(); | |
404 | if(kDoEps){ | |
405 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
406 | canvas1->SaveAs(namecanvas); | |
407 | } | |
408 | canvas1->Print("SDDQAPlot.ps"); | |
409 | } | |
410 | //else{delete canvas7; canvas7=NULL;} | |
411 | ||
412 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
413 | canvas1->Clear(); | |
414 | printf("8\n"); | |
415 | cannum++; | |
416 | //canvas1->Divide(2,1); | |
417 | sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[rlocaldistro].Data()); | |
418 | printf("histo name %s",RecPointsexpertname[rlocaldistro].Data()); | |
419 | histodraw=(TH2F*)mergedfile.Get(histoname); | |
420 | ||
421 | if(histodraw){printf("...Found\n");histodraw->DrawCopy("colz");}else{updatecanvas[0]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
422 | histodraw=NULL; | |
423 | if(updatecanvas[0]==kTRUE){ | |
424 | canvas1->Update(); | |
425 | if(kDoEps){ | |
426 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
427 | canvas1->SaveAs(namecanvas); | |
428 | } | |
429 | canvas1->Print("SDDQAPlot.ps"); | |
430 | } | |
431 | //else{delete canvas8; canvas8=NULL;} | |
0bca1a77 | 432 | |
2a250bc5 | 433 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} |
434 | canvas1->Clear(); | |
435 | canvas1->Divide(2,1); | |
436 | printf("9\n"); | |
437 | cannum++; | |
438 | for(Int_t i=1;i<3;i++) | |
439 | { | |
440 | canvas1->cd(i); | |
0bca1a77 | 441 | |
2a250bc5 | 442 | sprintf(histoname,"ITS/RecPoints/%s/Expert/%s_%s",AliRecoParam::GetEventSpecieName(ispecie),AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[i].Data()); |
443 | printf("histo name %s",RecPointsexpertname[i].Data()); | |
0bca1a77 | 444 | histodraw=(TH2F*)mergedfile.Get(histoname); |
2a250bc5 | 445 | |
446 | if(histodraw){printf("...Found\n");histodraw->DrawCopy("colz");}else{updatecanvas[i-1]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
0bca1a77 | 447 | histodraw=NULL; |
448 | } | |
2a250bc5 | 449 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) |
450 | { | |
451 | canvas1->Update(); | |
452 | if(kDoEps){ | |
453 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
454 | canvas1->SaveAs(namecanvas); | |
455 | } | |
456 | canvas1->Print("SDDQAPlot.ps"); | |
457 | } | |
458 | //else{delete canvas9; canvas9=NULL;} | |
459 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
460 | canvas1->Clear(); | |
461 | canvas1->Divide(2,1); | |
462 | printf("10\n"); | |
463 | cannum++; | |
464 | for(Int_t i=8;i<10;i++) | |
465 | { | |
466 | canvas1->cd(i-7); | |
467 | ||
468 | sprintf(histoname,"ITS/RecPoints/%s/Expert/%s_%s",AliRecoParam::GetEventSpecieName(ispecie),AliRecoParam::GetEventSpecieName(ispecie),RecPointsnonexpertname[i].Data()); | |
469 | histodraw=(TH2F*)mergedfile.Get(histoname); | |
470 | printf("histo name %s",RecPointsnonexpertname[i].Data()); | |
471 | ||
472 | if(histodraw){ | |
473 | printf("...Found\n");histodraw->Multiply(f1,fCNinv); | |
474 | histodraw->DrawCopy("colz"); | |
475 | }else{updatecanvas[i-8]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
476 | histodraw=NULL; | |
477 | } | |
478 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
479 | { | |
480 | canvas1->Update(); | |
481 | if(kDoEps){ | |
482 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
0bca1a77 | 483 | canvas1->SaveAs(namecanvas); |
0bca1a77 | 484 | } |
2a250bc5 | 485 | canvas1->Print("SDDQAPlot.ps"); |
486 | } | |
487 | //else{delete canvas10; canvas10=NULL;} | |
0bca1a77 | 488 | |
2a250bc5 | 489 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} |
490 | canvas1->Clear(); | |
491 | canvas1->Divide(1,2); | |
492 | printf("11\n"); | |
493 | cannum++; | |
494 | for(Int_t i=3;i<5;i++) | |
495 | { | |
496 | canvas1->cd(i-2); | |
497 | ||
498 | sprintf(histoname,"ITS/RecPoints/%s/Expert/%s_%s",AliRecoParam::GetEventSpecieName(ispecie),AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[i].Data()); | |
499 | printf("histo name %s",RecPointsexpertname[i].Data()); | |
0bca1a77 | 500 | historaw2=(TH1F*)mergedfile.Get(histoname); |
2a250bc5 | 501 | |
502 | if(historaw2) | |
503 | { | |
504 | printf("...Found\n"); | |
505 | if (i==4){historaw2->Multiply(f1,fCNinv);} | |
506 | historaw2->DrawCopy(); | |
507 | } | |
508 | else{updatecanvas[i-3]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
0bca1a77 | 509 | historaw2=NULL; |
2a250bc5 | 510 | } |
511 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
512 | { | |
513 | canvas1->Update(); | |
514 | if(kDoEps){ | |
515 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
0bca1a77 | 516 | canvas1->SaveAs(namecanvas); |
0bca1a77 | 517 | } |
2a250bc5 | 518 | canvas1->Print("SDDQAPlot.ps"); |
519 | } | |
520 | //else{delete canvas11; canvas11=NULL;} | |
521 | ||
522 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
523 | canvas1->Clear(); | |
524 | canvas1->Divide(2,1); | |
525 | printf("12\n"); | |
526 | cannum++; | |
527 | for(Int_t i=5;i<7;i++) | |
528 | { | |
529 | canvas1->cd(i-4); | |
530 | ||
531 | sprintf(histoname,"ITS/RecPoints/%s/Expert/%s_%s",AliRecoParam::GetEventSpecieName(ispecie),AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[i].Data()); | |
532 | printf("histo name %s",RecPointsexpertname[i].Data()); | |
0bca1a77 | 533 | historaw2=(TH1F*)mergedfile.Get(histoname); |
2a250bc5 | 534 | |
535 | if(historaw2){printf("...Found\n");historaw2->DrawCopy();}else{updatecanvas[i-5]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
0bca1a77 | 536 | historaw2=NULL; |
2a250bc5 | 537 | } |
538 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
539 | { | |
540 | canvas1->Update(); | |
541 | if(kDoEps){ | |
542 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
0bca1a77 | 543 | canvas1->SaveAs(namecanvas); |
0bca1a77 | 544 | } |
2a250bc5 | 545 | canvas1->Print("SDDQAPlot.ps"); |
546 | } | |
547 | //else{delete canvas12; canvas12=NULL;} | |
0bca1a77 | 548 | |
2a250bc5 | 549 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} |
550 | canvas1->Clear(); | |
551 | canvas1->Divide(2,1); | |
552 | printf("13\n"); | |
553 | cannum++; | |
554 | for(Int_t i=7;i<9;i++) | |
555 | { | |
556 | canvas1->cd(i-6); | |
557 | sprintf(histoname,"ITS/RecPoints/%s/Expert/%s_%s",AliRecoParam::GetEventSpecieName(ispecie),AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[i].Data()); | |
558 | printf("histo name %s",RecPointsexpertname[i].Data()); | |
559 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
0bca1a77 | 560 | |
2a250bc5 | 561 | if(historaw2){printf("...Found\n");historaw2->DrawCopy();}else{updatecanvas[i-7]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} |
562 | historaw2=NULL; | |
563 | } | |
564 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
565 | { | |
0bca1a77 | 566 | canvas1->Update(); |
2a250bc5 | 567 | if(kDoEps){ |
568 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
569 | canvas1->SaveAs(namecanvas); | |
570 | } | |
0bca1a77 | 571 | canvas1->Print("SDDQAPlot.ps"); |
572 | } | |
2a250bc5 | 573 | |
0bca1a77 | 574 | |
2a250bc5 | 575 | //superimposed |
576 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
577 | canvas1->Clear(); | |
578 | legend->Clear(); | |
579 | printf("14\n"); | |
580 | cannum++; | |
581 | for (Int_t i=4;i<6;i++){ | |
582 | sprintf(histoname,"%s/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsnonexpertname[i].Data()); | |
583 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
584 | if(historaw2){ | |
585 | fmax=historaw2->GetMaximum(); | |
586 | if (i==4){ | |
587 | fmaxold=fmax;} | |
588 | if (i!=4){ | |
589 | if(fmaxold<fmax){ | |
590 | fmaxold=fmax; | |
591 | } | |
0bca1a77 | 592 | } |
2a250bc5 | 593 | } |
594 | historaw2=NULL; | |
595 | } | |
596 | fmaxmargin=1.1*fmaxold; | |
597 | for(Int_t irrpp=4;irrpp<6;irrpp++){//non expert raws | |
598 | ||
599 | sprintf(histoname,"%s/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsnonexpertname[irrpp].Data()); | |
600 | printf("histo name %s",RecPointsnonexpertname[irrpp].Data()); | |
601 | sprintf(layer, "layer %d",irrpp-1); | |
602 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
603 | gStyle->SetOptStat(0); | |
604 | ||
605 | if(historaw2) | |
0bca1a77 | 606 | { |
2a250bc5 | 607 | printf("...Found\n"); |
608 | historaw2->GetYaxis()->SetRangeUser(0,fmaxmargin); | |
609 | historaw2->SetTitle("Charge"); | |
610 | if (irrpp==4) {historaw2->SetStats(0);historaw2->SetLineColor(2);historaw2->DrawCopy();} | |
611 | if (irrpp!=4) {historaw2->SetStats(0);historaw2->SetLineColor(4);historaw2->DrawCopy("same");} | |
612 | legend->AddEntry(historaw2,layer,"l"); | |
613 | legend->Draw(); | |
0bca1a77 | 614 | canvas1->Update(); |
2a250bc5 | 615 | } |
616 | else{updatecanvas[irrpp-4]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
617 | historaw2=NULL; | |
618 | }//end for | |
619 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
620 | { | |
621 | canvas1->Update(); | |
622 | if(kDoEps){ | |
623 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
0bca1a77 | 624 | canvas1->SaveAs(namecanvas); |
0bca1a77 | 625 | } |
2a250bc5 | 626 | canvas1->Print("SDDQAPlot.ps"); |
627 | } | |
628 | ||
629 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
630 | canvas1->Clear(); | |
631 | legend->Clear(); | |
632 | printf("15\n"); | |
633 | cannum++; | |
634 | for (Int_t i=6;i<8;i++){ | |
635 | sprintf(histoname,"%s/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsnonexpertname[i].Data()); | |
636 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
637 | if(historaw2){ | |
638 | fmax=historaw2->GetMaximum(); | |
639 | if (i==6){ | |
640 | fmaxold=fmax;} | |
641 | if (i!=6){ | |
642 | if(fmaxold<fmax){ | |
643 | fmaxold=fmax;}}} | |
644 | fmaxmargin=1.1*fmaxold; | |
645 | } | |
646 | for(Int_t irrpp=6;irrpp<8;irrpp++){//non expert raws | |
647 | ||
648 | sprintf(histoname,"%s/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsnonexpertname[irrpp].Data()); | |
649 | printf("histo name %s",RecPointsnonexpertname[irrpp].Data()); | |
650 | sprintf(layer, "layer %d",irrpp-3); | |
651 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
652 | gStyle->SetOptStat(0); | |
653 | ||
654 | if(historaw2) | |
0bca1a77 | 655 | { |
2a250bc5 | 656 | printf("...Found\n"); |
657 | historaw2->GetYaxis()->SetRangeUser(0,fmaxmargin); | |
658 | historaw2->SetTitle("Drift Time"); | |
659 | if (irrpp==6) {historaw2->SetStats(0); historaw2->SetLineColor(2);historaw2->DrawCopy();} | |
660 | if (irrpp!=6) {historaw2->SetStats(0); historaw2->SetLineColor(4);historaw2->DrawCopy("same");} | |
661 | legend->AddEntry(historaw2,layer,"l"); | |
662 | legend->Draw(); | |
0bca1a77 | 663 | canvas1->Update(); |
2a250bc5 | 664 | } |
665 | else{updatecanvas[irrpp-6]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
666 | printf("%s\n%s\n",historaw2->GetName(),historaw2->GetTitle()); | |
667 | historaw2=NULL; | |
668 | }//end for | |
669 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
670 | { | |
671 | canvas1->Update(); | |
672 | if(kDoEps){ | |
673 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
0bca1a77 | 674 | canvas1->SaveAs(namecanvas); |
0bca1a77 | 675 | } |
2a250bc5 | 676 | canvas1->Print("SDDQAPlot.ps"); |
677 | } | |
0bca1a77 | 678 | |
2a250bc5 | 679 | //------------------------------------------- new plot |
0bca1a77 | 680 | |
2a250bc5 | 681 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} |
682 | canvas1->Clear(); | |
683 | canvas1->Divide(2,1); | |
684 | printf("13\n"); | |
685 | cannum++; | |
686 | for(Int_t i=9;i<11;i++) | |
687 | { | |
688 | canvas1->cd(i-8); | |
689 | sprintf(histoname,"ITS/RecPoints/%s/Expert/%s_%s",AliRecoParam::GetEventSpecieName(ispecie),AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[i].Data()); | |
690 | printf("histo name %s",RecPointsexpertname[i].Data()); | |
691 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
0bca1a77 | 692 | |
2a250bc5 | 693 | if(historaw2){printf("...Found\n");historaw2->DrawCopy();}else{updatecanvas[i-9]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} |
694 | historaw2=NULL; | |
695 | } | |
696 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
697 | { | |
698 | canvas1->Update(); | |
699 | if(kDoEps){ | |
700 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
701 | canvas1->SaveAs(namecanvas); | |
702 | } | |
703 | canvas1->Print("SDDQAPlot.ps"); | |
704 | } | |
705 | ||
706 | //------------------------------------ | |
707 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
708 | canvas1->Clear(); | |
709 | legend->Clear(); | |
710 | printf("14\n"); | |
711 | cannum++; | |
712 | for (Int_t i=9;i<11;i++){ | |
713 | sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[i].Data()); | |
714 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
715 | if(historaw2){ | |
716 | fmax=historaw2->GetMaximum(); | |
717 | if (i==4){ | |
718 | fmaxold=fmax;} | |
719 | if (i!=4){ | |
720 | if(fmaxold<fmax){ | |
721 | fmaxold=fmax; | |
722 | } | |
0bca1a77 | 723 | } |
2a250bc5 | 724 | } |
725 | historaw2=NULL; | |
726 | } | |
727 | fmaxmargin=1.1*fmaxold; | |
728 | for(Int_t irrpp=9;irrpp<11;irrpp++){//non expert raws | |
729 | ||
730 | sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[irrpp].Data()); | |
731 | printf("histo name %s",RecPointsexpertname[irrpp].Data()); | |
732 | sprintf(layer, "layer %d",irrpp-6); | |
733 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
734 | gStyle->SetOptStat(0); | |
735 | ||
736 | if(historaw2) | |
0bca1a77 | 737 | { |
2a250bc5 | 738 | printf("...Found\n"); |
739 | historaw2->GetYaxis()->SetRangeUser(0,fmaxmargin); | |
740 | historaw2->SetTitle("RecPoint Relative Occupancy"); | |
741 | if (irrpp==9) {historaw2->SetStats(0);historaw2->SetLineColor(2);historaw2->DrawCopy();} | |
742 | if (irrpp!=9) {historaw2->SetStats(0);historaw2->SetLineColor(4);historaw2->DrawCopy("same");} | |
743 | legend->AddEntry(historaw2,layer,"l"); | |
744 | legend->Draw(); | |
0bca1a77 | 745 | canvas1->Update(); |
2a250bc5 | 746 | } |
747 | else{updatecanvas[irrpp-9]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
748 | historaw2=NULL; | |
749 | }//end for | |
750 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
751 | { | |
752 | canvas1->Update(); | |
753 | if(kDoEps){ | |
754 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
0bca1a77 | 755 | canvas1->SaveAs(namecanvas); |
0bca1a77 | 756 | } |
2a250bc5 | 757 | canvas1->Print("SDDQAPlot.ps"); |
758 | } | |
759 | ||
760 | ||
761 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
762 | canvas1->Clear(); | |
763 | canvas1->Divide(2,1); | |
764 | printf("13\n"); | |
765 | cannum++; | |
766 | for(Int_t i=11;i<13;i++) | |
767 | { | |
768 | canvas1->cd(i-10); | |
769 | sprintf(histoname,"ITS/RecPoints/%s/Expert/%s_%s",AliRecoParam::GetEventSpecieName(ispecie),AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[i].Data()); | |
770 | printf("histo name %s",RecPointsexpertname[i].Data()); | |
771 | historaw=(TH2D*)mergedfile.Get(histoname); | |
772 | ||
773 | if(historaw){printf("...Found\n");historaw->DrawCopy("colz");}else{updatecanvas[i-11]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
774 | historaw2=NULL; | |
775 | } | |
776 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
777 | { | |
778 | canvas1->Update(); | |
779 | if(kDoEps){ | |
780 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
781 | canvas1->SaveAs(namecanvas); | |
782 | } | |
783 | canvas1->Print("SDDQAPlot.ps"); | |
784 | } | |
785 | ||
0bca1a77 | 786 | |
0bca1a77 | 787 | |
2a250bc5 | 788 | //----------------- |
789 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
790 | canvas1->Clear(); | |
791 | canvas1->Divide(2,1); | |
792 | printf("13\n"); | |
793 | cannum++; | |
794 | for(Int_t i=13;i<15;i++) | |
795 | { | |
796 | canvas1->cd(i-12); | |
797 | sprintf(histoname,"ITS/RecPoints/%s/Expert/%s_%s",AliRecoParam::GetEventSpecieName(ispecie),AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[i].Data()); | |
798 | printf("histo name %s",RecPointsexpertname[i].Data()); | |
799 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
800 | ||
801 | if(historaw2){printf("...Found\n");historaw2->DrawCopy();}else{updatecanvas[i-13]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
802 | historaw2=NULL; | |
803 | } | |
804 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
805 | { | |
806 | canvas1->Update(); | |
807 | if(kDoEps){ | |
808 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
809 | canvas1->SaveAs(namecanvas); | |
810 | } | |
811 | canvas1->Print("SDDQAPlot.ps"); | |
812 | } | |
813 | //-------------------------------------------- | |
0bca1a77 | 814 | |
2a250bc5 | 815 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} |
816 | canvas1->Clear(); | |
817 | legend->Clear(); | |
818 | printf("14\n"); | |
819 | cannum++; | |
820 | for (Int_t i=13;i<15;i++){ | |
821 | sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[i].Data()); | |
822 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
823 | if(historaw2){ | |
824 | fmax=historaw2->GetMaximum(); | |
825 | if (i==13){ | |
826 | fmaxold=fmax;} | |
827 | if (i!=13){ | |
828 | if(fmaxold<fmax){ | |
829 | fmaxold=fmax; | |
830 | } | |
0bca1a77 | 831 | } |
2a250bc5 | 832 | } |
833 | historaw2=NULL; | |
834 | } | |
835 | fmaxmargin=1.1*fmaxold; | |
836 | for(Int_t irrpp=13;irrpp<15;irrpp++){//non expert raws | |
837 | ||
838 | sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[irrpp].Data()); | |
839 | printf("histo name %s",RecPointsexpertname[irrpp].Data()); | |
840 | sprintf(layer, "layer %d",irrpp-10); | |
841 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
842 | gStyle->SetOptStat(0); | |
843 | ||
844 | if(historaw2) | |
0bca1a77 | 845 | { |
2a250bc5 | 846 | printf("...Found\n"); |
847 | historaw2->GetYaxis()->SetRangeUser(0,fmaxmargin); | |
848 | historaw2->SetTitle("Rec2Raw Ratio"); | |
849 | if (irrpp==13) {historaw2->SetStats(0);historaw2->SetLineColor(2);historaw2->DrawCopy();} | |
850 | if (irrpp!=13) {historaw2->SetStats(0);historaw2->SetLineColor(4);historaw2->DrawCopy("same");} | |
851 | legend->AddEntry(historaw2,layer,"l"); | |
852 | legend->Draw(); | |
0bca1a77 | 853 | canvas1->Update(); |
2a250bc5 | 854 | } |
855 | else{updatecanvas[irrpp-13]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
856 | historaw2=NULL; | |
857 | }//end for | |
858 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
859 | { | |
860 | canvas1->Update(); | |
861 | if(kDoEps){ | |
862 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
0bca1a77 | 863 | canvas1->SaveAs(namecanvas); |
0bca1a77 | 864 | } |
2a250bc5 | 865 | canvas1->Print("SDDQAPlot.ps"); |
866 | } | |
0bca1a77 | 867 | |
2a250bc5 | 868 | |
869 | //-------------------------------------- | |
870 | ||
871 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
872 | canvas1->Clear(); | |
873 | canvas1->Divide(2,1); | |
874 | printf("13\n"); | |
875 | cannum++; | |
876 | for(Int_t i=15;i<17;i++) | |
877 | { | |
878 | canvas1->cd(i-14); | |
879 | sprintf(histoname,"ITS/RecPoints/%s/Expert/%s_%s",AliRecoParam::GetEventSpecieName(ispecie),AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[i].Data()); | |
880 | printf("histo name %s",RecPointsexpertname[i].Data()); | |
881 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
882 | ||
883 | if(historaw2){printf("...Found\n");historaw2->DrawCopy();}else{updatecanvas[i-15]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
884 | historaw2=NULL; | |
885 | } | |
886 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
887 | { | |
888 | canvas1->Update(); | |
889 | if(kDoEps){ | |
890 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
891 | canvas1->SaveAs(namecanvas); | |
892 | } | |
893 | canvas1->Print("SDDQAPlot.ps"); | |
894 | } | |
895 | ||
0bca1a77 | 896 | |
2a250bc5 | 897 | //-------------------------------------------- |
898 | ||
899 | for(Int_t i=0;i<2;i++){updatecanvas[i]=kTRUE;} | |
900 | canvas1->Clear(); | |
901 | legend->Clear(); | |
902 | printf("14\n"); | |
903 | cannum++; | |
904 | for (Int_t i=15;i<17;i++){ | |
905 | sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[i].Data()); | |
906 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
907 | if(historaw2){ | |
908 | fmax=historaw2->GetMaximum(); | |
909 | if (i==15){ | |
910 | fmaxold=fmax;} | |
911 | if (i!=15){ | |
912 | if(fmaxold<fmax){fmaxold=fmax;} | |
0bca1a77 | 913 | } |
2a250bc5 | 914 | } |
915 | historaw2=NULL; | |
916 | } | |
917 | fmaxmargin=1.1*fmaxold; | |
918 | for(Int_t irrpp=15;irrpp<17;irrpp++){//non expert raws | |
919 | ||
920 | sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[irrpp].Data()); | |
921 | printf("histo name %s",RecPointsexpertname[irrpp].Data()); | |
922 | sprintf(layer, "layer %d",irrpp-12); | |
923 | historaw2=(TH1F*)mergedfile.Get(histoname); | |
924 | gStyle->SetOptStat(0); | |
925 | ||
926 | if(historaw2) | |
0bca1a77 | 927 | { |
2a250bc5 | 928 | printf("...Found\n"); |
929 | historaw2->GetYaxis()->SetRangeUser(0,fmaxmargin); | |
930 | historaw2->SetTitle("RecPoint dEdx"); | |
931 | if (irrpp==15) {historaw2->SetStats(0);historaw2->SetLineColor(2);historaw2->DrawCopy();} | |
932 | if (irrpp!=15) {historaw2->SetStats(0);historaw2->SetLineColor(4);historaw2->DrawCopy("same");} | |
933 | legend->AddEntry(historaw2,layer,"l"); | |
934 | legend->Draw(); | |
0bca1a77 | 935 | canvas1->Update(); |
2a250bc5 | 936 | } |
937 | else{updatecanvas[irrpp-15]=kFALSE;printf("...Not Found: the histogram or this QA has been done before the histograms was added to QA\n");} | |
938 | historaw2=NULL; | |
939 | }//end for | |
940 | if(updatecanvas[0]==kTRUE||updatecanvas[1]==kTRUE) | |
941 | { | |
942 | canvas1->Update(); | |
943 | if(kDoEps){ | |
944 | sprintf(namecanvas,"%s.eps",canvassavedname[cannum].Data()); | |
0bca1a77 | 945 | canvas1->SaveAs(namecanvas); |
0bca1a77 | 946 | } |
2a250bc5 | 947 | canvas1->Print("SDDQAPlot.ps"); |
948 | } | |
949 | canvas1->Print("SDDQAPlot.ps]"); | |
950 | ||
951 | ||
952 | for(Int_t isave=0;isave<9;isave++){ | |
953 | if(isave<4)sprintf(histoname,"%s/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsnonexpertname[histo2savenumber[isave]].Data()); | |
954 | if(isave>4&&isave<7)sprintf(histoname,"%s/Expert/%s_%s",filepath,AliRecoParam::GetEventSpecieName(ispecie),RecPointsexpertname[histo2savenumber[isave]].Data()); | |
955 | if(isave>7)sprintf(histoname,"ITS/Raws/%s/Expert/%s_%s",AliRecoParam::GetEventSpecieName(ispecie),AliRecoParam::GetEventSpecieName(ispecie),Rawsexpertname[histo2savenumber[isave]].Data()); | |
956 | printf("file2save name:\t %s\n",histoname); | |
957 | histo2save[isave]=(TH1F*)mergedfile.Get(histoname); | |
958 | } | |
959 | ||
960 | TFile file2savefortrend(trendfile,"recreate"); | |
961 | file2savefortrend.cd(); | |
962 | for(Int_t iss=0;iss<9;iss++){printf("Saved %d\n",iss); histo2save[iss]->Write();} | |
963 | file2savefortrend.Close(); | |
964 | ||
965 | //else{delete canvas13; canvas13=NULL;} | |
966 | //directory2=NULL; | |
967 | }//end directory | |
968 | ||
969 | ||
970 | ||
0bca1a77 | 971 | }//end for |
972 | ||
2a250bc5 | 973 | |
974 | ||
975 | ||
0bca1a77 | 976 | delete directory; |
977 | directory=NULL; | |
978 | delete directory2; | |
979 | directory2=NULL; | |
980 | ||
981 | }//end macro | |
982 | ||
983 |