Worng indexes fixed
[u/mrichter/AliRoot.git] / ZDC / CheckAlienZDCESD.C
CommitLineData
9577d217 1#if !defined(__CINT__) || defined(__MAKECINT__)
2
3#include <stdio.h>
4#include <stdlib.h>
5#include <TROOT.h>
6#include <Riostream.h>
7#include <TClassTable.h>
8#include <TStyle.h>
9#include <TMath.h>
10#include <TGrid.h>
11#include <TFile.h>
12#include <TCanvas.h>
13#include <TH1.h>
14#include <TH2.h>
15#include <TProfile.h>
16#include <TLine.h>
17#include "AliRun.h"
18#include "AliRunLoader.h"
19#include "AliPDG.h"
131ddcfa 20#include "STEER/ESD/AliESDEvent.h"
21#include "STEER/ESD/AliESDZDC.h"
9577d217 22
23#endif
fb8c9f86 24void CheckAlienZDCESD(Int_t year=2010, const char* period="10f",
9577d217 25 Int_t nRun=0, Int_t recoPass=1, Int_t nMaxFiles=1,
131ddcfa 26 Bool_t plot=kFALSE, Bool_t esdWordCut=kFALSE)
9577d217 27{
28
29 if(nRun==0){
30 printf("\n\n YOU MUST PROVIDE A RUN NUMBER!!! \n\n");
31 return;
32 }
33
34 // Histogram definition
35 // ----------------------------------------------------------------
131ddcfa 36 TH2F *centroidZNsideC = new TH2F("centroidZNsideC","Impact point over ZNC",100,-3.5,3.5,100,-3.5,3.5);
9577d217 37 centroidZNsideC->SetXTitle("X_{ZNC} (cm)");
38 centroidZNsideC->SetYTitle("Y_{ZNC} (cm)");
131ddcfa 39 TH2F * centroidZNsideA = new TH2F("centroidZNsideA","Impact point over ZNA",100,-3.5,3.5,100,-3.5,3.5);
9577d217 40 centroidZNsideA->SetXTitle("X_{ZNA} (cm)");
41 centroidZNsideA->SetYTitle("Y_{ZNA} (cm)");
13727fd4 42 TH1F * enZNC = new TH1F("enZNC", "ZNC signal",100,0.,2000.);
9577d217 43 enZNC->SetXTitle("E (GeV)");
13727fd4 44 TH1F * enZPC = new TH1F("enZPC", "ZPC signal",100,0.,2000.);
9577d217 45 enZPC->SetXTitle("E (GeV)");
13727fd4 46 TH1F * enZNA = new TH1F("enZNA", "ZNA signal",100,0.,2000.);
9577d217 47 enZNA->SetXTitle("E (GeV)");
13727fd4 48 TH1F * enZPA = new TH1F("enZPA", "ZPA signal",100,0.,2000.);
9577d217 49 enZPA->SetXTitle("E (GeV)");
13727fd4 50 TH1D * enZEM1 = new TH1D("enZEM1", "Energy in ZEM1",100,0.,2000.);
9577d217 51 enZEM1->SetXTitle("E (GeV)");
13727fd4 52 TH1D * enZEM2 = new TH1D("enZEM2", "Energy in ZEM2",100,0.,2000.);
9577d217 53 enZEM2->SetXTitle("E (GeV)");
54 // ----------------------------------------------------------------
55 TH1D * hZNCTow[5]; TH1D * hZPCTow[5];
56 TH1D * hZNATow[5]; TH1D * hZPATow[5];
57 char nomehistznc[30], nomehistzpc[30], nomehistzna[30], nomehistzpa[30];
58 for(Int_t i=0; i<5; i++){
59 sprintf(nomehistznc,"ZNC-pm%d",i);
131ddcfa 60 hZNCTow[i] = new TH1D(nomehistznc, nomehistznc, 100, 0.,1200.);
9577d217 61 sprintf(nomehistzpc,"ZPC-pm%d",i);
131ddcfa 62 hZPCTow[i] = new TH1D(nomehistzpc, nomehistzpc, 100, 0.,1200.);
9577d217 63 sprintf(nomehistzna,"ZNA-pm%d",i);
131ddcfa 64 hZNATow[i] = new TH1D(nomehistzna, nomehistzna, 100, 0.,1200.);
9577d217 65 sprintf(nomehistzpa,"ZPA-pm%d",i);
131ddcfa 66 hZPATow[i] = new TH1D(nomehistzpa, nomehistzpa, 100, 0.,1200.);
9577d217 67 }
13727fd4 68 //
9577d217 69 TH1F *hESDword = new TH1F("hESDword","hESDword",6,0.5,6.5);
70 hESDword->SetXTitle("ZDC trigger pattern");
131ddcfa 71
72
73 // ----------------------------------------------------------------
74 // %%%%% TDCs
75 // ----------------------------------------------------------------
76 TH1F * hTDC[11];
77 for(Int_t itdc=0; itdc<11; itdc++){
78
79 if(itdc==0) hTDC[itdc] = new TH1F("TDCZNC", "TDC ZNC", 200, -150., 50.);
80 else if(itdc==1) hTDC[itdc] = new TH1F("TDCZNA", "TDC ZNA", 200, -150., 50.);
81 else if(itdc==2) hTDC[itdc] = new TH1F("TDCL0", "TDC L0", 100, 250., 350.);
82 else if(itdc==3) hTDC[itdc] = new TH1F("TDCADCgate", "TDC ADCgate", 100, 500., 600.);
83 else if(itdc==4) hTDC[itdc] = new TH1F("TDCZNsum", "TDC ZNsum", 60, -100., -40.);
84 else if(itdc==5) hTDC[itdc] = new TH1F("TDCZNdiff", "TDC ZNdiff", 60, -30., 30.);
85 else if(itdc==6) hTDC[itdc] = new TH1F("TDCZPC", "TDC ZPC", 200, -150., 50.);
86 else if(itdc==7) hTDC[itdc] = new TH1F("TDCZPA", "TDC ZPA", 200, -150., 50.);
87 else if(itdc==8) hTDC[itdc] = new TH1F("TDCZEM1", "TDC ZEM1", 200, -150., 50.);
88 else if(itdc==9) hTDC[itdc] = new TH1F("TDCZEM2", "TDC ZEM2", 200, -150., 50.);
89 else if(itdc==10) hTDC[itdc] = new TH1F("TDCorZN", "TDC OR ZN", 400, -150., 50.);
90
fb8c9f86 91 hTDC[itdc]->SetXTitle("TDC (ns)");
92 }
131ddcfa 93
94 TH2F *hDebunch = new TH2F("hDebunch","hDebunch",240,-30.,30.,240,-30.,30.);
95 hDebunch->SetYTitle("t_{ZNC}+t_{ZNA} (ns)");
96 hDebunch->SetXTitle("t_{ZNC}-t_{ZNA} (ns)");
97
98 TH1F * hTDCcorr[4];
99 for(Int_t itdc=0; itdc<4; itdc++){
100 if(itdc==0) hTDCcorr[itdc] = new TH1F("TDCZNCcorr", "TDC ZNC corr", 200, -100., 100.);
101 else if(itdc==1) hTDCcorr[itdc] = new TH1F("TDCZNAcorr", "TDC ZNA corr", 200, -100., 100.);
102 else if(itdc==2) hTDCcorr[itdc] = new TH1F("TDCDiffcorr", "TDC Diff corr", 100, -50., 50.);
103 else if(itdc==3) hTDCcorr[itdc] = new TH1F("TDCSumcorr", "TDC Sum corr", 100, -50., 50.);
104
105 hTDCcorr[itdc]->SetXTitle("TDC (ns)");
106 }
9577d217 107
108 TGrid::Connect("alien:",0,0,"t");
109 gSystem->Exec(Form("gbbox find \"/alice/data/%d/LHC%s/000%d/ESDs/pass%d\" \"AliESDs.root\" > ESDFiles.txt",
110 year, period, nRun, recoPass));
131ddcfa 111 //gSystem->Exec(Form("gbbox find \"/alice/data/%d/LHC%s/000%d/ESDs/hlt_clustering\" \"AliESDs.root\" > ESDFiles.txt",
112 // year, period, nRun));
9577d217 113 FILE* listruns=fopen("ESDFiles.txt","r");
114
115 char esdFileName[200], filnamalien[200];
116 char yperiod, dirESD;
117 //
118 Int_t nAnalyzedFiles=0;
119 Int_t nevPhys=0, nevZNC=0, nevZPC=0, nevZNA=0, nevZPA=0, nevZEM1=0, nevZEM2=0;
120
121 while(!feof(listruns)){
122
123 if(nAnalyzedFiles!=nMaxFiles){
124
125 int st = fscanf(listruns,"%s\n",esdFileName);
126 Char_t directory[100];
127 sprintf(directory,"/alice/data/%d",year);
128 if(!strstr(esdFileName,directory)) continue;
129 sscanf(esdFileName,"/alice/data/%d/LHC%s/000%d/ESDs/pass%d/%s/AliESDs.root",&year,&yperiod,&nRun,&recoPass,&dirESD);
131ddcfa 130 //sscanf(esdFileName,"/alice/data/%d/LHC%s/000%d/ESDs/hlt_clustering/%s/AliESDs.root",&year,&yperiod,&nRun,&dirESD);
9577d217 131 sprintf(filnamalien,"alien://%s",esdFileName);
132 printf("\n Opening file: %s\n",filnamalien);
133
134 // open the ESD file
135 TFile* esdFile = TFile::Open(filnamalien);
136 if(!esdFile) {
137 Error("CheckZDCESD", "opening ESD file %s failed",filnamalien);
138 return;
139 }
140
141 AliESDEvent* esd = new AliESDEvent();
142 TTree* tree = (TTree*) esdFile->Get("esdTree");
143 if(!tree) {
144 Error("CheckZDCESD", "No ESD tree found");
145 return;
146 }
147
148 tree->SetBranchStatus("*", 0);
149 tree->SetBranchStatus("AliESDHeader*", 1);
150 tree->SetBranchStatus("AliESDRun*", 1);
151 tree->SetBranchStatus("AliESDZDC*", 1);
152 tree->SetBranchStatus("PrimaryVertex*", 1);
153 tree->SetBranchStatus("SPDVertex*", 1);
154 tree->SetBranchStatus("AliESDVZERO*", 1);
155
156 esd->ReadFromTree(tree);
157
158 Int_t nevents = (Int_t)tree->GetEntries();
159 printf("\n No. of events in ESD tree = %d\n", nevents);
160 for(Int_t iEvent=0; iEvent<nevents; iEvent++){
161 // get the event summary data
162 tree->GetEvent(iEvent);
163
9577d217 164 //
165 if(esd->GetEventType() == 7){
9577d217 166 if(!esd) {
167 Error("CheckESD", "no ESD object found for event %d", iEvent);
168 return;
169 }
170
171 Double_t sumQznc=0., sumQzpc=0., sumQzna=0., sumQzpa=0.;
172
173 AliESDZDC *esdZDC = esd->GetESDZDC();
131ddcfa 174 //printf(" ev.%d \n",nevPhys);
175 //esdZDC->Print("");
176 nevPhys++;
177
178
179 Double_t centrZNC[2]={-999.,-999.}, centrZNA[2]={-999.,-999.};
180 esdZDC->GetZNCentroidInPbPb(2760.,centrZNC, centrZNA);
181 //
9577d217 182 Double_t energyZNC = esdZDC->GetZDCN1Energy();
183 Double_t energyZPC = esdZDC->GetZDCP1Energy();
184 Double_t energyZNA = esdZDC->GetZDCN2Energy();
185 Double_t energyZPA = esdZDC->GetZDCP2Energy();
186 Double_t energyZEM1 = esdZDC->GetZDCEMEnergy(0);
187 Double_t energyZEM2 = esdZDC->GetZDCEMEnergy(1);
188 const Double_t * towZNC = esdZDC->GetZN1TowerEnergy();
189 const Double_t * towZPC = esdZDC->GetZP1TowerEnergy();
190 const Double_t * towZNA = esdZDC->GetZN2TowerEnergy();
191 const Double_t * towZPA = esdZDC->GetZP2TowerEnergy();
192 UInt_t iWord = esdZDC->GetESDQuality();
193 //
194 if((iWord & 0x00000001) == 0x00000001){
195 nevZNA++;
196 hESDword->Fill(1.);
197 }
198 if((iWord & 0x00000002) == 0x00000002){
199 nevZPA++;
200 hESDword->Fill(2.);
201 }
202 if((iWord & 0x00000004) == 0x00000004){
203 nevZEM1++;
204 hESDword->Fill(3.);
205 }
206 if((iWord & 0x00000008) == 0x00000008){
207 nevZEM2++;
208 hESDword->Fill(4.);
209 }
210 if((iWord & 0x00000010) == 0x00000010){
211 nevZNC++;
212 hESDword->Fill(5.);
213 }
214 if((iWord & 0x00000020) == 0x00000020){
215 nevZPC++;
216 hESDword->Fill(6.);
217 }
9577d217 218 enZNC->Fill(energyZNC);
219 enZPC->Fill(energyZPC);
220 enZNA->Fill(energyZNA);
221 enZPA->Fill(energyZPA);
222 enZEM1->Fill(energyZEM1);
223 enZEM2->Fill(energyZEM2);
224 //
225 for(Int_t jj=0; jj<5; jj++){
226 if(esdWordCut){
227 if((iWord & 0x00000010) == 0x00000010) hZNCTow[jj]->Fill(towZNC[jj]);
228 if((iWord & 0x00000020) == 0x00000020) hZPCTow[jj]->Fill(towZPC[jj]);
229 if((iWord & 0x00000001) == 0x00000001) hZNATow[jj]->Fill(towZNA[jj]);
230 if((iWord & 0x00000002) == 0x00000002) hZPATow[jj]->Fill(towZPA[jj]);
231 }
232 else{
233 hZNCTow[jj]->Fill(towZNC[jj]);
234 hZPCTow[jj]->Fill(towZPC[jj]);
235 hZNATow[jj]->Fill(towZNA[jj]);
236 hZPATow[jj]->Fill(towZPA[jj]);
237 }
238 //
239 if(jj!=0){
240 if(esdWordCut){
241 if((iWord & 0x00000010) == 0x00000010) sumQznc += towZNC[jj];
242 if((iWord & 0x00000020) == 0x00000020) sumQzpc += towZPC[jj];
243 if((iWord & 0x00000001) == 0x00000001) sumQzna += towZNA[jj];
244 if((iWord & 0x00000002) == 0x00000002) sumQzpa += towZPA[jj];
9577d217 245 }
246 else{
247 sumQznc += towZNC[jj];
248 sumQzpc += towZPC[jj];
249 sumQzna += towZNA[jj];
250 sumQzpa += towZPA[jj];
251 }
252 }
253 }
254 //
131ddcfa 255
256 if(centrZNA[0]!=-999. && centrZNA[1]!=-999) centroidZNsideA->Fill(centrZNA[0], centrZNA[1], towZNA[0]);
257 if(centrZNC[0]!=-999. && centrZNC[1]!=-999) centroidZNsideC->Fill(centrZNC[0], centrZNC[1], towZNC[0]);
13727fd4 258/* if(esdWordCut){
9577d217 259 if((iWord & 0x00000010) == 0x00000010) {
260 hSumQZNC->Fill(sumQznc);
9577d217 261 }
262 //
263 if((iWord & 0x00000020) == 0x00000020) {
264 hSumQZPC->Fill(sumQzpc);
265 }
13727fd4 266
9577d217 267 }
268 else{
269 hSumQZNC->Fill(sumQznc);
270 //
271 hSumQZPC->Fill(sumQzpc);
272 }
273 //
274 hSumQZNA->Fill(sumQzna);
275 hSumQZPA->Fill(sumQzpa);
13727fd4 276*/
131ddcfa 277
278 Int_t tdcData[32][4];
279 Float_t tdcCorr[32][4];
280 for(int ij=0; ij<32; ij++){
281 for(int ik=0; ik<4;ik++){
282 tdcData[ij][ik] = 9999.;
283 tdcCorr[ij][ik] = -9999./0.025;
284 }
fb8c9f86 285 }
131ddcfa 286 Float_t tdcC=-9999./0.025, tdcA=-9999./0.025, tdcGate=-9999./0.025, tdcL0=-9999./0.025;
287 Float_t tdcDiff=-9999./0.025, tdcSum=-9999./0.025;
288 Float_t tdcZPC=-9999./0.025, tdcZPA=-9999./0.025;
289 Float_t tdcZEM1=-9999./0.025, tdcZEM2=-9999./0.025;
290 Float_t tdcZNCcorr=-9999./0.025, tdcZNAcorr=-9999./0.025;
291 //
292 for(Int_t itdc=0; itdc<21; itdc++){
fb8c9f86 293 for(Int_t j=0; j<4; j++){
131ddcfa 294
295 tdcData[itdc][j] = esdZDC->GetZDCTDCData(itdc, j);
296 if(tdcData[itdc][j] == 0.) continue; //change in 9999
297
298 //printf(" TDC ch.%d hit %d: %f ns\n",itdc,j,0.025*esdZDC->GetZDCTDCData(itdc, j));
299 tdcCorr[itdc][j] = esdZDC->GetZDCTDCCorrected(itdc, j);
300 //printf(" %f ns\n",esdZDC->GetZDCTDCCorrected(itdc, j));
301 if(itdc==12 && j==0 && (tdcData[10][0]!=0. && tdcData[12][0]!=0.)){ //change in 9999!!!
302 tdcDiff = esdZDC->GetZDCTimeDiff();
303 tdcSum = esdZDC->GetZDCTimeSum();
304 }
305
306 if(itdc==8 && tdcData[itdc][j]!=0.){
307 tdcZEM1 = 0.025*(tdcData[itdc][j]);
308 }
309 else if(itdc==9 && tdcData[itdc][j]!=0.){
310 tdcZEM2 = 0.025*(tdcData[itdc][j]);
311 }
312 else if(itdc==10 && tdcData[itdc][j]!=0.){
313 tdcC = 0.025*(tdcData[itdc][j]);
314 tdcZNCcorr = tdcCorr[itdc][j];
315 hTDCcorr[0]->Fill(tdcZNCcorr);
316 }
317 else if(itdc==11 && tdcData[itdc][j]!=0.){
318 tdcZPC = 0.025*(tdcData[itdc][j]);
319 }
320 else if(itdc==12 && tdcData[itdc][j]!=0.){
321 tdcA = 0.025*(tdcData[itdc][j]);
322 tdcZNAcorr = tdcCorr[itdc][j];
323 hTDCcorr[1]->Fill(tdcZNAcorr);
324 }
325 else if(itdc==13 && tdcData[itdc][j]!=0.){
326 tdcZPA = 0.025*(tdcData[itdc][j]);
327 }
328 else if(itdc==14 && tdcData[itdc][j]!=0.){
329 tdcGate = 0.025*tdcData[itdc][j];
330 hTDC[3]->Fill(tdcGate);
331 }
332 else if(itdc==15 && tdcData[itdc][j]!=0.){
333 tdcL0 = 0.025*tdcData[itdc][j];
334 hTDC[2]->Fill(tdcL0);
335 //
336 if(tdcC!=-9999./0.025) hTDC[0]->Fill(tdcC-tdcL0);
337 if(tdcA!=-9999./0.025) hTDC[1]->Fill(tdcA-tdcL0);
338 if(tdcZPC!=-9999./0.025) hTDC[6]->Fill(tdcZPC-tdcL0);
339 if(tdcZPA!=-9999./0.025) hTDC[7]->Fill(tdcZPA-tdcL0);
340 if(tdcZEM1!=-9999./0.025) hTDC[8]->Fill(tdcZEM1-tdcL0);
341 if(tdcZEM2!=-9999./0.025) hTDC[9]->Fill(tdcZEM2-tdcL0);
342 if(tdcC!=-9999./0.025 && tdcA!=-9999./0.025 && tdcL0!=-9999./0.025){
343 tdcC = tdcC-tdcL0;
344 tdcA = tdcA-tdcL0;
345 hTDC[4]->Fill(tdcC+tdcA);
346 hTDC[5]->Fill(tdcC-tdcA);
347 //printf(" TDCdata: sum %f diff %f ", tdcC+tdcA, tdcC-tdcA);
348 //hDebunch->Fill(tdcC-tdcA+2.1, tdcC+tdcA+65.5);
349 }
350 if(tdcZNAcorr!=-9999./0.025 && tdcZNCcorr!=-9999./0.025 && tdcL0!=-9999./0.025){
351 hTDCcorr[2]->Fill(tdcZNCcorr-tdcZNAcorr);
352 hTDCcorr[3]->Fill(tdcZNCcorr+tdcZNAcorr);
353 hDebunch->Fill(tdcDiff, tdcSum);
354 //printf(" TDCcorr: sum %f diff %f (ns) \n", tdcSum, tdcDiff);
355 }
356 }
357 else if(itdc==18 && tdcData[itdc][j]!=0.){
358 hTDC[10]->Fill(0.025*tdcData[itdc][j]-tdcL0);
359 }
fb8c9f86 360 }
131ddcfa 361 }//tdc scan
362
363
364 }//physics event
fb8c9f86 365
9577d217 366
131ddcfa 367 }//event loop
9577d217 368
369 nAnalyzedFiles++;
370 esdFile->Close();
371 }//if(nAnalyzedFiles<=nMaxFiles)
372 else{
131ddcfa 373 printf("\t %d files analyzed\n\n",nMaxFiles);
374 break;
9577d217 375 }
376 } // while closing
377
131ddcfa 378/* printf(" No. of events over threshold: ZNA: %d ZPA: %d ZEM1: %d "
13727fd4 379 " ZEM2: %d ZNC: %d ZPC: %d\n\n",
131ddcfa 380 nevZNA, nevZPA, nevZEM1, nevZEM2, nevZNC, nevZPC);*/
381
382 TFile * fileout = new TFile("ESDhistos.root","recreate");
383 fileout->cd();
384 centroidZNsideC->Write();
385 centroidZNsideA->Write();
386 enZNC->Write();
387 enZNA->Write();
388 enZPC->Write();
389 enZPA->Write();
390 enZEM1->Write();
391 enZEM2->Write();
392 for(Int_t jj=0; jj<5; jj++){
393 hZNCTow[jj]->Write();
394 hZPCTow[jj]->Write();
395 hZNATow[jj]->Write();
396 hZPATow[jj]->Write();
397 }
398 /*hSumQZNC->Write();
399 hSumQZPC->Write();
400 hSumQZNA->Write();
401 hSumQZPA->Write();*/
402 //
403 hESDword->Write();
404 for(Int_t jj=0; jj<11; jj++) hTDC[jj]->Write();
405 for(Int_t jj=0; jj<4; jj++) hTDCcorr[jj]->Write();
406 //
407 fileout->Close();
13727fd4 408
9577d217 409 if(plot){
410 //***********************************************************
411 // #### ROOT initialization
412 gROOT->Reset();
413 gStyle->SetCanvasColor(10);
414 gStyle->SetFrameFillColor(10);
415 gStyle->SetOptTitle(1);
416 if(esdWordCut) gStyle->SetOptStat(1111111);
13727fd4 417 else gStyle->SetOptStat(1111);
9577d217 418 gStyle->SetOptFit(0);
419 gStyle->SetTitleTextColor(4);
420 gStyle->SetStatTextColor(4);
421 gStyle->SetStatX(0.92);
422 gStyle->SetStatY(0.92);
423 gStyle->SetLineColor(1);
424 gStyle->SetPalette(1);
425 gStyle->SetPadTopMargin(0.04);
426 gStyle->SetPadRightMargin(0.04);
427 gStyle->SetPadBottomMargin(0.14);
428 gStyle->SetPadLeftMargin(0.16);
429
430
431 //-------------------------------------------------
13727fd4 432 TCanvas *c1 = new TCanvas("c1","ZDCs + ZEMs signals",400,0,500,800);
9577d217 433 c1->Divide(2,3);
434 c1->cd(1);
13727fd4 435 gPad->SetLogy(1);
436 enZNC->Draw("");
437 enZNC->SetLineColor(kBlue);
438 enZNC->SetFillColor(kBlue);
9577d217 439 c1->cd(2);
13727fd4 440 gPad->SetLogy(1);
441 enZPC->Draw("");
442 enZPC->SetLineColor(kBlue+3);
443 enZPC->SetFillColor(kBlue+3);
9577d217 444 c1->cd(3);
13727fd4 445 gPad->SetLogy(1);
9577d217 446 enZEM1->SetLineColor(kRed);
447 enZEM1->SetFillColor(kRed);
448 enZEM1->Draw("");
449 c1->cd(4);
13727fd4 450 gPad->SetLogy(1);
9577d217 451 enZEM2->SetLineColor(kRed);
452 enZEM2->SetFillColor(kRed);
453 enZEM2->Draw("");
454 c1->cd(5);
13727fd4 455 gPad->SetLogy(1);
9577d217 456 enZNA->Draw("");
457 enZNA->SetLineColor(kRed);
458 enZNA->SetFillColor(kRed);
13727fd4 459 c1->cd(6);
460 gPad->SetLogy(1);
9577d217 461 enZPA->Draw("");
462 enZPA->SetLineColor(kRed+1);
13727fd4 463 enZPA->SetFillColor(kRed+1);
9577d217 464
465 //-------------------------------------------------
466 TCanvas *c3 = new TCanvas("c3","Side C ZDCs",0,0,800,400);
467 c3->Divide(5,2);
468 c3->cd(1);
13727fd4 469 gPad->SetLogy(1);
9577d217 470 hZNCTow[0]->SetLineColor(kBlue);
471 hZNCTow[0]->SetFillColor(kBlue);
472 hZNCTow[0]->Draw("");
473 c3->cd(2);
474 gPad->SetLogy(1);
475 hZNCTow[1]->SetLineColor(kBlue);
476 hZNCTow[1]->SetFillColor(kBlue);
477 hZNCTow[1]->Draw("");
478 c3->cd(3);
13727fd4 479 gPad->SetLogy(1);
9577d217 480 hZNCTow[2]->SetLineColor(kBlue);
481 hZNCTow[2]->SetFillColor(kBlue);
482 hZNCTow[2]->Draw("");
483 c3->cd(4);
13727fd4 484 gPad->SetLogy(1);
9577d217 485 hZNCTow[3]->SetLineColor(kBlue);
486 hZNCTow[3]->SetFillColor(kBlue);
487 hZNCTow[3]->Draw("");
488 c3->cd(5);
13727fd4 489 gPad->SetLogy(1);
9577d217 490 hZNCTow[4]->SetLineColor(kBlue);
491 hZNCTow[4]->SetFillColor(kBlue);
492 hZNCTow[4]->Draw("");
493 //
494 c3->cd(6);
13727fd4 495 gPad->SetLogy(1);
9577d217 496 hZPCTow[0]->SetLineColor(kBlue+3);
497 hZPCTow[0]->SetFillColor(kBlue+3);
498 hZPCTow[0]->Draw("");
499 c3->cd(7);
13727fd4 500 gPad->SetLogy(1);
9577d217 501 hZPCTow[1]->SetLineColor(kBlue+3);
502 hZPCTow[1]->SetFillColor(kBlue+3);
503 hZPCTow[1]->Draw("");
504 c3->cd(8);
13727fd4 505 gPad->SetLogy(1);
9577d217 506 hZPCTow[2]->SetLineColor(kBlue+3);
507 hZPCTow[2]->SetFillColor(kBlue+3);
508 hZPCTow[2]->Draw("");
509 c3->cd(9);
13727fd4 510 gPad->SetLogy(1);
9577d217 511 hZPCTow[3]->SetLineColor(kBlue+3);
512 hZPCTow[3]->SetFillColor(kBlue+3);
513 hZPCTow[3]->Draw("");
514 c3->cd(10);
13727fd4 515 gPad->SetLogy(1);
9577d217 516 hZPCTow[4]->SetLineColor(kBlue+3);
517 hZPCTow[4]->SetFillColor(kBlue+3);
518 hZPCTow[4]->Draw("");
519
520
521 //-------------------------------------------------
522 TCanvas *c32 = new TCanvas("c32","side A ZDCs",700,0,800,400);
523 c32->Divide(5,2);
524 c32->cd(1);
13727fd4 525 gPad->SetLogy(1);
9577d217 526 hZNATow[0]->SetLineColor(kRed);
527 hZNATow[0]->SetFillColor(kRed);
528 hZNATow[0]->Draw("");
529 c32->cd(2);
530 gPad->SetLogy(1);
531 hZNATow[1]->SetLineColor(kRed);
532 hZNATow[1]->SetFillColor(kRed);
533 hZNATow[1]->Draw("");
534 c32->cd(3);
13727fd4 535 gPad->SetLogy(1);
9577d217 536 hZNATow[2]->SetLineColor(kRed);
537 hZNATow[2]->SetFillColor(kRed);
538 hZNATow[2]->Draw("");
539 c32->cd(4);
13727fd4 540 gPad->SetLogy(1);
9577d217 541 hZNATow[3]->SetLineColor(kRed);
542 hZNATow[3]->SetFillColor(kRed);
543 hZNATow[3]->Draw("");
544 c32->cd(5);
13727fd4 545 gPad->SetLogy(1);
9577d217 546 hZNATow[4]->SetLineColor(kRed);
547 hZNATow[4]->SetFillColor(kRed);
548 hZNATow[4]->Draw("");
549 //
550 c32->cd(6);
13727fd4 551 gPad->SetLogy(1);
9577d217 552 hZPATow[0]->SetLineColor(kRed+1);
553 hZPATow[0]->SetFillColor(kRed+1);
554 hZPATow[0]->Draw("");
555 c32->cd(7);
13727fd4 556 gPad->SetLogy(1);
9577d217 557 hZPATow[1]->SetLineColor(kRed+1);
558 hZPATow[1]->SetFillColor(kRed+1);
559 hZPATow[1]->Draw("");
560 c32->cd(8);
13727fd4 561 gPad->SetLogy(1);
9577d217 562 hZPATow[2]->SetLineColor(kRed+1);
563 hZPATow[2]->SetFillColor(kRed+1);
564 hZPATow[2]->Draw("");
565 c32->cd(9);
13727fd4 566 gPad->SetLogy(1);
9577d217 567 hZPATow[3]->SetLineColor(kRed+1);
568 hZPATow[3]->SetFillColor(kRed+1);
569 hZPATow[3]->Draw("");
570 c32->cd(10);
13727fd4 571 gPad->SetLogy(1);
9577d217 572 hZPATow[4]->SetLineColor(kRed+1);
573 hZPATow[4]->SetFillColor(kRed+1);
574 hZPATow[4]->Draw("");
fb8c9f86 575
576 //-------------------------------------------------
577 TCanvas *c4 = new TCanvas("c4","TDCs",400,0,700,500);
578 c4->Divide(3,2);
579 c4->cd(1);
580 hTDC[1]->SetFillColor(kPink); hTDC[1]->SetLineColor(kPink);
581 hTDC[1]->Draw("");
582 c4->cd(2);
583 hTDC[3]->SetFillColor(kPink+4); hTDC[3]->SetLineColor(kPink+4);
584 hTDC[3]->Draw("");
585 c4->cd(3);
586 hTDC[5]->SetFillColor(kGreen); hTDC[5]->SetLineColor(kGreen);
587 hTDC[5]->Draw("");
588 c4->cd(4);
589 hTDC[7]->SetFillColor(kGreen+2); hTDC[7]->SetLineColor(kGreen+2);
590 hTDC[7]->Draw("");
591 c4->cd(5);
592 hTDC[8]->SetFillColor(kAzure); hTDC[8]->SetLineColor(kAzure);
593 hTDC[8]->Draw("");
594 c4->cd(6);
595 hTDC[9]->SetFillColor(kAzure+5); hTDC[9]->SetLineColor(kAzure+5);
596 hTDC[9]->Draw("");
9577d217 597 }
9577d217 598
599}