Saving some QA histograms for future corrections (Yves)
[u/mrichter/AliRoot.git] / ITS / AliITSQASPDDataMakerRec.cxx
1 /**************************************************************************
2  * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15 /* $Id$  */
16 //  *************************************************************
17 //  Checks the quality assurance 
18 //  by comparing with reference data
19 //  contained in a DB
20 //  -------------------------------------------------------------
21 //  W. Ferrarese + P. Cerello Feb 2008
22 //  INFN Torino
23 //  M. Nicassio D. Elia INFN Bari March 2008
24 //  maria.nicassio@ba.infn.it
25     
26
27 // --- ROOT system ---
28 #include <TTree.h>
29 #include <TH1.h>
30 #include <TH2.h>
31 #include <TMath.h>
32 // --- Standard library ---
33
34 // --- AliRoot header files ---
35 #include "AliITSQADataMakerRec.h"
36 #include "AliITSQASPDDataMakerRec.h"
37 #include "AliLog.h"
38 #include "AliQA.h"
39 #include "AliRawReader.h"
40 #include "AliITSRawStreamSPD.h"
41 #include "AliITSRawStreamSPDErrorLog.h"
42 #include "AliITSRecPoint.h"
43
44 ClassImp(AliITSQASPDDataMakerRec)
45
46 //____________________________________________________________________________
47 AliITSQASPDDataMakerRec::AliITSQASPDDataMakerRec(AliITSQADataMakerRec *aliITSQADataMakerRec, Bool_t kMode, Short_t ldc, AliITSRawStreamSPDErrorLog *aliITSRawStreamSPDErrorLog) :
48 TObject(),
49 fAliITSQADataMakerRec(aliITSQADataMakerRec),
50 fkOnline(kMode),
51 fLDC(ldc),
52 fSPDhTask(0),
53 fGenOffset(0),
54 fAdvLogger(aliITSRawStreamSPDErrorLog) 
55 {
56   //ctor used to discriminate OnLine-Offline analysis  
57 }
58
59 //____________________________________________________________________________ 
60 AliITSQASPDDataMakerRec::AliITSQASPDDataMakerRec(const AliITSQASPDDataMakerRec& qadm) :
61 TObject(),
62 fAliITSQADataMakerRec(qadm.fAliITSQADataMakerRec),
63 fkOnline(qadm.fkOnline),
64 fLDC(qadm.fLDC),
65 fSPDhTask(qadm.fSPDhTask),
66 fGenOffset(qadm.fGenOffset),
67 fAdvLogger(qadm.fAdvLogger)
68 {
69   //copy ctor 
70   fAliITSQADataMakerRec->SetName((const char*)qadm.fAliITSQADataMakerRec->GetName()) ; 
71   fAliITSQADataMakerRec->SetTitle((const char*)qadm.fAliITSQADataMakerRec->GetTitle());
72   }
73
74 //__________________________________________________________________
75 AliITSQASPDDataMakerRec::~AliITSQASPDDataMakerRec(){
76   // destructor
77 //  delete fAdvLogger;
78 }
79 //__________________________________________________________________
80
81 AliITSQASPDDataMakerRec& AliITSQASPDDataMakerRec::operator = (const AliITSQASPDDataMakerRec& qac )
82 {
83   // Equal operator.
84   this->~AliITSQASPDDataMakerRec();
85   new(this) AliITSQASPDDataMakerRec(qac);
86   return *this;
87 }
88
89 //____________________________________________________________________________ 
90 void AliITSQASPDDataMakerRec::StartOfDetectorCycle()
91 {
92   //Detector specific actions at start of cycle
93   AliDebug(1,"AliITSQADM::Start of SPD Cycle\n");
94 }
95
96 //____________________________________________________________________________ 
97 void AliITSQASPDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TObjArray* /*list*/)
98 {
99   // launch the QA checking
100   AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n"); 
101   
102   //AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
103 }
104
105 //____________________________________________________________________________ 
106 void AliITSQASPDDataMakerRec::InitRaws()
107
108   // Initialization for RAW data - SPD -
109   fGenOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
110
111   AliInfo("Book Offline Histograms for SPD\n ");
112
113   Char_t name[50];
114   Char_t title[50];
115
116   TH1F *hlayer = new TH1F("LayPattern_SPD","Layer map - SPD",6,0.,6.);
117   hlayer->GetXaxis()->SetTitle("Layer number");
118   hlayer->GetYaxis()->SetTitle("Entries");
119   fAliITSQADataMakerRec->Add2RawsList(hlayer,0+fGenOffset);
120   fSPDhTask++;
121
122   TH1F **hmod = new TH1F*[2];
123   TH2F **hhitMap = new TH2F*[20];
124   TH1F **herrors = new TH1F*[20];
125   for (Int_t iLay=0; iLay<2; iLay++) {
126     sprintf(name,"ModPattern_SPD%d",iLay+1);
127     sprintf(title,"Module map - SPD Layer %d",iLay+1);
128     hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules);
129     hmod[iLay]->GetXaxis()->SetTitle("Module number");
130     hmod[iLay]->GetYaxis()->SetTitle("Entries");
131     fAliITSQADataMakerRec->Add2RawsList(hmod[iLay], 1+iLay+fGenOffset);
132     fSPDhTask++;
133   }
134   fAdvLogger = new AliITSRawStreamSPDErrorLog();  
135   for (Int_t iDDL=0; iDDL<20; iDDL++) {
136     sprintf(name,"HitMap_SPD_DDL%d",iDDL+1);
137     sprintf(title,"Hit map - SPD DDL %d",iDDL+1);
138     hhitMap[iDDL]=new TH2F(name,title,320,0,10*32,1536,0,6*256);
139     hhitMap[iDDL]->GetXaxis()->SetTitle("Column");
140     hhitMap[iDDL]->GetYaxis()->SetTitle("Row");
141     fAliITSQADataMakerRec->Add2RawsList(hhitMap[iDDL], 3+(2*iDDL)+fGenOffset);
142     fSPDhTask++;
143     sprintf(name,"Errors_SPD_DDL%d",iDDL+1);
144     sprintf(title,"Error codes - SPD DDL %d",iDDL+1);
145     herrors[iDDL] = new TH1F (name,title,15,0,15);
146     herrors[iDDL]->SetXTitle("Error Code");
147     herrors[iDDL]->SetYTitle("Nr of errors");
148     fAliITSQADataMakerRec->Add2RawsList(herrors[iDDL], 4+(2*iDDL)+fGenOffset);
149     fSPDhTask++;
150   }
151
152   TH1F** hMultSPDhits = new TH1F*[2];
153   for (Int_t iLay=0; iLay<2; iLay++) {
154     sprintf(name,"HitsMultiplicity_SPD%d",iLay+1);
155     sprintf(title,"Hit multiplicity - SPD Layer %d",iLay+1);
156     hMultSPDhits[iLay]=new TH1F(name,title,200,0.,200.);
157     hMultSPDhits[iLay]->GetXaxis()->SetTitle("Hit multiplicity");
158     hMultSPDhits[iLay]->GetYaxis()->SetTitle("Entries");
159     fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits[iLay], 43+iLay+fGenOffset, kTRUE);
160     fSPDhTask++;
161   }
162
163   TH2F *hMultSPDhits2MultSPDhits1 = new TH2F("HitMultCorrelation_SPD","Hit multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
164   hMultSPDhits2MultSPDhits1->GetXaxis()->SetTitle("Hit multiplicity (Layer 1)");
165   hMultSPDhits2MultSPDhits1->GetYaxis()->SetTitle("Hit multiplicity (Layer 2)");
166   fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits2MultSPDhits1, 45+fGenOffset);
167   fSPDhTask++;
168  
169   AliDebug(1,Form("%d SPD Raws histograms booked\n",fSPDhTask));
170 }
171
172
173 //____________________________________________________________________________
174 void AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader)
175
176   // Fill QA for RAW - SPD -
177   rawReader->Reset();
178   AliITSRawStreamSPD *rawStreamSPD = new AliITSRawStreamSPD(rawReader);
179   rawStreamSPD->ActivateAdvancedErrorLog(kTRUE,fAdvLogger);
180
181   Int_t nDigitsL1 = 0;
182   Int_t nDigitsL2 = 0;
183   Int_t iEq;
184   Int_t iLayer;
185   Int_t iHalfStave, iChip;
186   Int_t col, row; 
187   UInt_t module, colM, rowM;
188   while(rawStreamSPD->Next()) {
189
190     iEq = rawReader->GetDDLID();
191     if (iEq>=0 && iEq<20) {
192       iHalfStave = rawStreamSPD->GetHalfStaveNr();
193       iChip = rawStreamSPD->GetChipAddr();
194       col  = rawStreamSPD->GetChipCol();
195       row  = rawStreamSPD->GetChipRow();
196
197       rawStreamSPD->OnlineToOffline(iEq, iHalfStave, iChip, col, row, module, colM, rowM);
198
199       if (iHalfStave>=0 && iHalfStave<2) iLayer=0;
200       else iLayer=1;
201       
202       fAliITSQADataMakerRec->GetRawsData(0+fGenOffset)->Fill(iLayer);
203       if (iLayer==0) {
204         fAliITSQADataMakerRec->GetRawsData(1+fGenOffset)->Fill(module);
205         nDigitsL1++;
206       } else {
207         fAliITSQADataMakerRec->GetRawsData(2+fGenOffset)->Fill(module);
208         nDigitsL2++;
209       }
210       
211       fAliITSQADataMakerRec->GetRawsData((2*iEq)+3+fGenOffset)->Fill(colM+(module%2)*160,rowM+iHalfStave*256);
212     }
213
214   }
215   for (Int_t ieq=0; ieq<20; ieq++)
216     for (UInt_t ierr=0; ierr<fAdvLogger->GetNrErrorCodes(); ierr++)
217       fAliITSQADataMakerRec->GetRawsData((2*ieq)+4+fGenOffset)->Fill(ierr,fAdvLogger->GetNrErrors(ierr,ieq));
218
219   fAdvLogger->Reset();
220  
221   fAliITSQADataMakerRec->GetRawsData(43+fGenOffset)->Fill(nDigitsL1);
222   fAliITSQADataMakerRec->GetRawsData(44+fGenOffset)->Fill(nDigitsL2);
223   fAliITSQADataMakerRec->GetRawsData(45+fGenOffset)->Fill(nDigitsL1,nDigitsL2);
224   
225   delete rawStreamSPD;  
226   AliDebug(1,Form("Event completed, %d raw digits read",nDigitsL1+nDigitsL2));
227 }
228
229 //____________________________________________________________________________ 
230 void AliITSQASPDDataMakerRec::InitRecPoints()
231 {
232   // Initialization for RECPOINTS - SPD -
233   fGenOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
234
235   TH1F* hlayer= new TH1F("LayPattern_SPD","Layer map - SPD",6,0.,6.);
236   hlayer->GetXaxis()->SetTitle("Layer number");
237   hlayer->GetYaxis()->SetTitle("Entries");
238   fAliITSQADataMakerRec->Add2RecPointsList(hlayer, 0+fGenOffset); 
239   fSPDhTask++;
240
241   TH1F** hmod = new TH1F*[2];
242   TH1F** hxl  = new TH1F*[2];
243   TH1F** hzl  = new TH1F*[2];
244   TH1F** hxg  = new TH1F*[2];
245   TH1F** hyg  = new TH1F*[2];
246   TH1F** hzg  = new TH1F*[2];
247   TH1F** hr   = new TH1F*[2];
248   TH1F** hphi = new TH1F*[2];
249   TH1F** hMultSPDcl = new TH1F*[2];
250   TH2F** hNyNz = new TH2F*[2];  // y and z cluster length
251   TH2F** hPhiZ = new TH2F*[2];
252
253   Float_t xlim[2]={4.5,8.};
254   Float_t zlim[2]={15.,15.};
255
256   Char_t name[50];
257   Char_t title[50];
258   for (Int_t iLay=0;iLay<2;iLay++) {
259     sprintf(name,"ModPattern_SPD%d",iLay+1);
260     sprintf(title,"Module map - SPD Layer %d",iLay+1);
261     hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules);
262     hmod[iLay]->GetXaxis()->SetTitle("Module number");
263     hmod[iLay]->GetYaxis()->SetTitle("Entries");
264     fAliITSQADataMakerRec->Add2RecPointsList(hmod[iLay], 1+(10*iLay)+fGenOffset); 
265     fSPDhTask++;
266
267     sprintf(name,"xLoc_SPD%d",iLay+1);
268     sprintf(title,"Local x coordinate - SPD Layer %d",iLay+1);
269     hxl[iLay]=new TH1F(name,title,100,-4.,4.);
270     hxl[iLay]->GetXaxis()->SetTitle("Local x [cm]");
271     hxl[iLay]->GetYaxis()->SetTitle("Entries");
272     fAliITSQADataMakerRec->Add2RecPointsList(hxl[iLay], 2+(10*iLay)+fGenOffset);
273     fSPDhTask++;
274
275     sprintf(name,"zLoc_SPD%d",iLay+1);
276     sprintf(title,"Local z coordinate - SPD Layer %d",iLay+1);
277     hzl[iLay]=new TH1F(name,title,100,-4.,4.);
278     hzl[iLay]->GetXaxis()->SetTitle("Local z [cm]");
279     hzl[iLay]->GetYaxis()->SetTitle("Entries");
280     fAliITSQADataMakerRec->Add2RecPointsList(hzl[iLay], 3+(10*iLay)+fGenOffset); 
281     fSPDhTask++;
282
283     sprintf(name,"xGlob_SPD%d",iLay+1);
284     sprintf(title,"Global x coordinate - SPD Layer %d",iLay+1);
285     hxg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]);
286     hxg[iLay]->GetXaxis()->SetTitle("Global x [cm]");
287     hxg[iLay]->GetYaxis()->SetTitle("Entries");
288     fAliITSQADataMakerRec->Add2RecPointsList(hxg[iLay],4+(10*iLay)+fGenOffset);  
289     fSPDhTask++;
290
291     sprintf(name,"yGlob_SPD%d",iLay+1);
292     sprintf(title,"Global y coordinate - SPD Layer %d",iLay+1);
293     hyg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]);
294     hyg[iLay]->GetXaxis()->SetTitle("Global y [cm]");
295     hyg[iLay]->GetYaxis()->SetTitle("Entries");
296     fAliITSQADataMakerRec->Add2RecPointsList(hyg[iLay], 5+(10*iLay)+fGenOffset); 
297     fSPDhTask++;
298
299     sprintf(name,"zGlob_SPD%d",iLay+1);
300     sprintf(title,"Global z coordinate - SPD Layer %d",iLay+1);
301     hzg[iLay]=new TH1F(name,title,150,-zlim[iLay],zlim[iLay]);
302     hzg[iLay]->GetXaxis()->SetTitle("Global z [cm]");
303     hzg[iLay]->GetYaxis()->SetTitle("Entries");
304     fAliITSQADataMakerRec->Add2RecPointsList(hzg[iLay], 6+(10*iLay)+fGenOffset); 
305     fSPDhTask++;
306
307     sprintf(name,"r_SPD%d",iLay+1);
308     sprintf(title,"Radius - SPD Layer %d",iLay+1);
309     hr[iLay]=new TH1F(name,title,100,0.,10.);
310     hr[iLay]->GetXaxis()->SetTitle("r [cm]");
311     hr[iLay]->GetYaxis()->SetTitle("Entries");
312     fAliITSQADataMakerRec->Add2RecPointsList(hr[iLay], 7+(10*iLay)+fGenOffset);  
313     fSPDhTask++;
314
315     sprintf(name,"phi_SPD%d",iLay+1);
316     sprintf(title,"#varphi - SPD Layer %d",iLay+1);
317     hphi[iLay]=new TH1F(name,title,1000,0.,2*TMath::Pi());
318     hphi[iLay]->GetXaxis()->SetTitle("#varphi [rad]");
319     hphi[iLay]->GetYaxis()->SetTitle("Entries");
320     fAliITSQADataMakerRec->Add2RecPointsList(hphi[iLay], 8+(10*iLay)+fGenOffset);
321     fSPDhTask++;
322     
323     sprintf(name,"SizeYvsZ_SPD%d",iLay+1);
324     sprintf(title,"Cluster dimension - SPD Layer %d",iLay+1);
325     hNyNz[iLay]=new TH2F(name,title,100,0.,100.,100,0.,100.);
326     hNyNz[iLay]->GetXaxis()->SetTitle("z length");
327     hNyNz[iLay]->GetYaxis()->SetTitle("y length");
328     fAliITSQADataMakerRec->Add2RecPointsList(hNyNz[iLay], 9+(10*iLay)+fGenOffset); 
329     fSPDhTask++;
330
331     sprintf(name,"phi_z_SPD%d",iLay+1);
332     sprintf(title,"#varphi vs z - SPD Layer %d",iLay+1);
333     hPhiZ[iLay]=new TH2F(name,title,150,-zlim[iLay],zlim[iLay],200,0.,2*TMath::Pi());
334     hPhiZ[iLay]->GetXaxis()->SetTitle("Global z [cm]");
335     hPhiZ[iLay]->GetYaxis()->SetTitle("#varphi [rad]");
336     fAliITSQADataMakerRec->Add2RecPointsList(hPhiZ[iLay], 10+(10*iLay)+fGenOffset);
337     fSPDhTask++;
338
339   }
340
341   TH2F *hrPhi=new TH2F("r_phi_SPD","#varphi vs r - SPD",100,0.,10.,100,0.,2*TMath::Pi());
342   hrPhi->GetXaxis()->SetTitle("r [cm]");
343   hrPhi->GetYaxis()->SetTitle("#varphi [rad]");
344   fAliITSQADataMakerRec->Add2RecPointsList(hrPhi, 21+fGenOffset);
345   fSPDhTask++;
346
347   TH2F *hxy=new TH2F("x_y_SPD","Global y vs x - SPD",200,-10.,10.,200,-10.,10.);
348   hxy->GetXaxis()->SetTitle("Global x [cm]");
349   hxy->GetYaxis()->SetTitle("Global y [cm]");
350   fAliITSQADataMakerRec->Add2RecPointsList(hxy, 22+fGenOffset);
351   fSPDhTask++;
352
353   for (Int_t iLay=0;iLay<2;iLay++) {
354     sprintf(name,"Multiplicity_SPD%d",iLay+1);
355     sprintf(title,"Cluster multiplicity - SPD Layer %d",iLay+1);
356     hMultSPDcl[iLay]=new TH1F(name,title,200,0.,200.);
357     hMultSPDcl[iLay]->GetXaxis()->SetTitle("Cluster multiplicity");
358     hMultSPDcl[iLay]->GetYaxis()->SetTitle("Entries");
359     fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl[iLay], 23+fGenOffset);
360     fSPDhTask++;
361   } 
362
363   TH2F *hMultSPDcl2MultSPDcl1 =
364         new TH2F("MultCorrelation_SPD","Cluster multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
365   hMultSPDcl2MultSPDcl1->GetXaxis()->SetTitle("Clusters multiplicity (Layer 1)");
366   hMultSPDcl2MultSPDcl1->GetYaxis()->SetTitle("Clusters multiplicity (Layer 2)"); 
367   fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl2MultSPDcl1, 24+fGenOffset);
368   fSPDhTask++;
369
370   AliDebug(1,Form("%d SPD Recs histograms booked\n",fSPDhTask));
371
372
373 }
374
375 //____________________________________________________________________________ 
376 void AliITSQASPDDataMakerRec::MakeRecPoints(TTree * clusterTree)
377 {
378   // Fill QA for RecPoints - SPD -
379   static TClonesArray statITSCluster("AliITSRecPoint");
380   TClonesArray *ITSCluster = &statITSCluster;
381   TBranch* itsClusterBranch=clusterTree->GetBranch("ITSRecPoints");
382   if (!itsClusterBranch) {
383     AliError("can't get the branch with the ITS clusters !");
384     return;
385   }
386   itsClusterBranch->SetAddress(&ITSCluster);
387   Int_t nItsMods = (Int_t)clusterTree->GetEntries();
388   
389   Float_t cluGlo[3] = {0.,0.,0.};
390   Int_t nClusters[2] = {0,0};
391   
392   for (Int_t iIts=0; iIts < nItsMods; iIts++) {
393     
394     if (!clusterTree->GetEvent(iIts))    continue;
395     Int_t nCluster = ITSCluster->GetEntriesFast();
396     // loop over clusters
397     while(nCluster--) {
398       AliITSRecPoint* cluster = (AliITSRecPoint*)ITSCluster->UncheckedAt(nCluster);
399       
400       if (cluster->GetLayer()>1)        continue;
401       Int_t lay=cluster->GetLayer();
402       fAliITSQADataMakerRec->GetRecPointsData(0 +fGenOffset)->Fill(lay);
403       cluster->GetGlobalXYZ(cluGlo);
404       Float_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]);
405         Float_t phi= TMath::Pi() + TMath::ATan2(-cluGlo[1],-cluGlo[0]);
406         if (lay==0) {
407           fAliITSQADataMakerRec->GetRecPointsData(1 +fGenOffset)->Fill(iIts);
408           fAliITSQADataMakerRec->GetRecPointsData(2 +fGenOffset)->Fill(cluster->GetDetLocalX());
409           fAliITSQADataMakerRec->GetRecPointsData(3 +fGenOffset)->Fill(cluster->GetDetLocalZ());
410           fAliITSQADataMakerRec->GetRecPointsData(4 +fGenOffset)->Fill(cluGlo[0]);
411           fAliITSQADataMakerRec->GetRecPointsData(5 +fGenOffset)->Fill(cluGlo[1]);
412           fAliITSQADataMakerRec->GetRecPointsData(6 +fGenOffset)->Fill(cluGlo[2]);
413           fAliITSQADataMakerRec->GetRecPointsData(7 +fGenOffset)->Fill(rad);
414           fAliITSQADataMakerRec->GetRecPointsData(8 +fGenOffset)->Fill(phi);
415           fAliITSQADataMakerRec->GetRecPointsData(9 +fGenOffset)->Fill(cluster->GetNz(),cluster->GetNy());
416           fAliITSQADataMakerRec->GetRecPointsData(10 +fGenOffset)->Fill(cluGlo[2],phi);
417         } else  {
418           fAliITSQADataMakerRec->GetRecPointsData(11 +fGenOffset)->Fill(iIts);
419           fAliITSQADataMakerRec->GetRecPointsData(12 +fGenOffset)->Fill(cluster->GetDetLocalX());
420           fAliITSQADataMakerRec->GetRecPointsData(13 +fGenOffset)->Fill(cluster->GetDetLocalZ());
421           fAliITSQADataMakerRec->GetRecPointsData(14 +fGenOffset)->Fill(cluGlo[0]);
422           fAliITSQADataMakerRec->GetRecPointsData(15 +fGenOffset)->Fill(cluGlo[1]);
423           fAliITSQADataMakerRec->GetRecPointsData(16 +fGenOffset)->Fill(cluGlo[2]);
424           fAliITSQADataMakerRec->GetRecPointsData(17 +fGenOffset)->Fill(rad);
425           fAliITSQADataMakerRec->GetRecPointsData(18 +fGenOffset)->Fill(phi);
426           fAliITSQADataMakerRec->GetRecPointsData(19 +fGenOffset)->Fill(cluster->GetNz(),cluster->GetNy());
427           fAliITSQADataMakerRec->GetRecPointsData(20 +fGenOffset)->Fill(cluGlo[2],phi);
428         }
429         fAliITSQADataMakerRec->GetRecPointsData(21 +fGenOffset)->Fill(rad,phi);
430         fAliITSQADataMakerRec->GetRecPointsData(22 +fGenOffset)->Fill(cluGlo[0],cluGlo[1]);
431         
432         nClusters[lay]++; 
433     } // end of cluster loop
434   } // end of its "subdetector" loop
435   
436   for (Int_t iLay=0; iLay<2; iLay++)
437     fAliITSQADataMakerRec->GetRecPointsData(23+iLay +fGenOffset)->Fill(nClusters[iLay]);
438   
439   fAliITSQADataMakerRec->GetRecPointsData(25 +fGenOffset)->Fill(nClusters[0],nClusters[1]);
440   
441   statITSCluster.Clear();
442 }