]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSQAChecker.cxx
fHits size reduced to previous assignment
[u/mrichter/AliRoot.git] / ITS / AliITSQAChecker.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
16 /* $Id$ */
17
18 // *****************************************
19 //  Checks the quality assurance 
20 //  by comparing with reference data
21 //  W.Ferrarese  P.Cerello  Mag 2008
22 //  INFN Torino
23
24 // --- ROOT system ---
25 #include "TH1.h"
26 #include <Riostream.h>
27 #include "TStyle.h"
28
29 // --- AliRoot header files ---
30 #include "AliITSQAChecker.h"
31 #include "AliITSQASPDChecker.h"
32 #include "AliITSQASDDChecker.h"
33 #include "AliITSQASSDChecker.h"
34 #include "AliITSQADataMakerRec.h"
35
36 ClassImp(AliITSQAChecker)
37
38 //____________________________________________________________________________
39 AliITSQAChecker::AliITSQAChecker(Bool_t kMode, Short_t subDet, Short_t ldc) :
40 AliQACheckerBase("ITS","SDD Quality Assurance Checker"),
41 fkOnline(0),
42 fDet(0),  
43 fLDC(0),
44 fSPDOffset(0), 
45 fSDDOffset(0), 
46 fSSDOffset(0),
47 fSPDHisto(0),
48 fSDDHisto(0),
49 fSSDHisto(0),
50 fSPDChecker(0),  // SPD Checker
51 fSDDChecker(0),  // SDD Checker
52 fSSDChecker(0)  // SSD Checker
53
54 {
55   // Standard constructor
56   fkOnline = kMode; fDet = subDet; fLDC = ldc;
57   if(fDet == 0 || fDet == 1) {
58     AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQAChecker::Create SPD Checker\n");
59     fSPDChecker = new AliITSQASPDChecker();
60   }
61   if(fDet == 0 || fDet == 2) {
62     AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQAChecker::Create SDD Checker\n");
63     fSDDChecker = new AliITSQASDDChecker();
64   }
65   if(fDet == 0 || fDet == 3) {
66     AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQAChecker::Create SSD Checker\n");
67     fSSDChecker = new AliITSQASSDChecker();
68   }
69   InitQACheckerLimits();
70 }
71
72 //____________________________________________________________________________
73 AliITSQAChecker::AliITSQAChecker(const AliITSQAChecker& qac):
74 AliQACheckerBase(qac.GetName(), qac.GetTitle()), 
75 fkOnline(qac.fkOnline), 
76 fDet(qac.fDet), 
77 fLDC(qac.fLDC), 
78 fSPDOffset(qac.fSPDOffset), 
79 fSDDOffset(qac.fSDDOffset), 
80 fSSDOffset(qac.fSSDOffset), 
81 fSPDHisto(qac.fSPDHisto),
82 fSDDHisto(qac.fSDDHisto),
83 fSSDHisto(qac.fSSDHisto),
84 fSPDChecker(qac.fSPDChecker), 
85 fSDDChecker(qac.fSDDChecker), 
86 fSSDChecker(qac.fSSDChecker)
87 {
88   // copy constructor
89   AliError("Copy should not be used with this class\n");
90 }
91 //____________________________________________________________________________
92 AliITSQAChecker& AliITSQAChecker::operator=(const AliITSQAChecker& qac){
93   // assignment operator
94   this->~AliITSQAChecker();
95   new(this)AliITSQAChecker(qac);
96   return *this;
97 }
98
99
100 //____________________________________________________________________________
101 AliITSQAChecker::~AliITSQAChecker(){
102   // destructor
103   if(fSPDChecker)delete fSPDChecker;
104   if(fSDDChecker)delete fSDDChecker;
105   if(fSSDChecker)delete fSSDChecker;
106
107 }
108 //____________________________________________________________________________
109 void AliITSQAChecker::Check(Double_t * rv, AliQAv1::ALITASK_t index, TObjArray ** list, const AliDetectorRecoParam * recoParam)
110 {
111
112
113   // basic checks on the QA histograms on the input list
114   //for the ITS subdetectorQA (Raws Digits Hits RecPoints SDigits) return the worst value of the three result
115   if(index == AliQAv1::kESD){
116     
117     for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
118       rv[specie] = 0.0 ; 
119       if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) 
120         continue ; 
121       AliDebug(AliQAv1::GetQADebugLevel(),"Checker for ESD");
122       Int_t tested = 0;
123       Int_t empty = 0;
124       // The following flags are set to kTRUE if the corresponding
125       // QA histograms exceed a given quality threshold
126       Bool_t cluMapSA = kFALSE;
127       Bool_t cluMapMI = kFALSE;
128       Bool_t cluMI = kFALSE;
129       Bool_t cluSA = kFALSE;
130       Bool_t verSPDZ = kFALSE;
131       if (list[specie]->GetEntries() == 0) {
132         rv[specie] = 0.; // nothing to check
133       }
134       else {
135         Double_t stepbit[AliQAv1::kNBIT];
136         Double_t histonumb= list[specie]->GetEntries();
137         CreateStepForBit(histonumb,stepbit); 
138         TIter next1(list[specie]);
139         TH1 * hdata;
140         Int_t nskipped=0;
141         Bool_t skipped[6]={kFALSE,kFALSE,kFALSE,kFALSE,kFALSE,kFALSE};
142         // look for layers that we wanted to skip
143         while ( (hdata = dynamic_cast<TH1 *>(next1())) ) {
144           if(hdata){
145             TString hname = hdata->GetName();
146             if(!hname.Contains("hESDSkippedLayers")) continue;
147             for(Int_t k=1; k<7; k++) {
148               if(hdata->GetBinContent(k)>0) { 
149                 nskipped++; 
150                 skipped[k-1]=kTRUE; 
151               } 
152             } 
153           }
154         }
155         TIter next(list[specie]);
156         while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
157           if(hdata){
158             TString hname = hdata->GetName();
159             Double_t entries = hdata->GetEntries();
160             ++tested;
161             if(!(entries>0.))++empty;
162             AliDebug(AliQAv1::GetQADebugLevel(),Form("ESD hist name %s - entries %12.1g",hname.Data(),entries));
163             if(hname.Contains("hESDClusterMapSA") && entries>0.){
164               cluMapSA = kTRUE;
165               AliDebug(AliQAv1::GetQADebugLevel(),Form("Processing histogram %s",hname.Data()));
166               // Check if there are layers with anomalously low 
167               // contributing points to SA reconstructed tracks
168               for(Int_t k=1;k<7;k++){
169                 // check if the layer was skipped
170                 if(skipped[k-1]) continue;
171                 if(hdata->GetBinContent(k)<0.5*(entries/6.)){
172                   cluMapSA = kFALSE;
173                   AliDebug(AliQAv1::GetQADebugLevel(),Form("SA tracks have few points on layer %d - look at histogram hESDClustersSA",k));
174                 }
175               }  
176             }//end clustermapsa 
177             
178             else if(hname.Contains("hESDClusterMapMI") && entries>0.){
179               // Check if there are layers with anomalously low 
180               // contributing points to MI reconstructed tracks
181               AliDebug(AliQAv1::GetQADebugLevel(),Form("Processing histogram %s",hname.Data()));
182               cluMapMI = kTRUE;
183               for(Int_t k=1;k<7;k++){
184                 // check if the layer was skipped
185                 if(skipped[k-1]) continue;
186                 if(hdata->GetBinContent(k)<0.5*(entries/6.)){
187                   cluMapMI = kFALSE;
188                   AliDebug(AliQAv1::GetQADebugLevel(),Form("MI tracks have few points on layer %d - look at histogram hESDClustersMI",k));
189                 }
190               }  
191             }//end clustermapmi
192             
193             else if(hname.Contains("hESDClustersMI") && entries>0.){
194               // Check if 6 clusters MI tracks are the majority
195               AliDebug(AliQAv1::GetQADebugLevel(),Form("Processing histogram %s",hname.Data()));
196               cluMI = kTRUE;
197               Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
198               for(Int_t k=2; k<7-nskipped; k++){
199                 if(hdata->GetBinContent(k)>maxlaytracks){
200                   cluMI = kFALSE;
201                   AliDebug(AliQAv1::GetQADebugLevel(),Form("MI Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersMI",k-1,6-nskipped));
202                 }
203               }
204             }//end clustersmi
205             
206             else if(hname.Contains("hESDClustersSA") && entries>0.){
207               // Check if 6 clusters SA tracks are the majority
208               AliDebug(AliQAv1::GetQADebugLevel(),Form("Processing histogram %s",hname.Data()));
209               cluSA = kTRUE;
210               Double_t maxlaytracks = hdata->GetBinContent(7-nskipped);
211               for(Int_t k=2; k<7-nskipped; k++){
212                 if(hdata->GetBinContent(k)>maxlaytracks){
213                   cluSA = kFALSE;
214                   AliDebug(AliQAv1::GetQADebugLevel(), Form("SA Tracks with %d clusters are more than tracks with %d clusters. Look at histogram hESDClustersSA",k-1,6-nskipped));
215                 }
216               }
217             }//end clusterssa
218             
219             else if(hname.Contains("hSPDVertexZ") && entries>0.){
220               // Check if average Z vertex coordinate is -5 < z < 5 cm
221               AliDebug(AliQAv1::GetQADebugLevel(),Form("Processing histogram %s",hname.Data()));
222               verSPDZ = kTRUE;
223               if(hdata->GetMean()<-5. && hdata->GetMean()>5.){
224                 verSPDZ = kFALSE;
225                 AliDebug(AliQAv1::GetQADebugLevel(),Form("Average z vertex coordinate is at z= %10.4g cm",hdata->GetMean()));
226               }
227             }//end spdvertexz
228             
229             else{ AliError("ESD Checker - invalid data type");}//end else
230             
231             rv[specie] = 0.;
232             if(tested>0){
233               if(tested == empty){
234                 rv[specie] = 2500.; // set to error
235                 AliWarning(Form("All ESD histograms are empty - specie=%d",specie));
236               }
237               else {
238                 rv[specie] = 2500.-1500.*(static_cast<Double_t>(tested-empty)/static_cast<Double_t>(tested)); // INFO if all histos are filled
239                 if(cluMapSA)rv[specie]-=200.;
240                 if(cluMapMI)rv[specie]-=200.;
241                 if(cluMI)rv[specie]-=200.;
242                 if(cluSA)rv[specie]-=200.;
243                 if(verSPDZ)rv[specie]-=199.;  // down to 1 if everything is OK
244               }
245             }//end tested
246           }//end hdata
247         }//end while
248         //     AliDebug(AliQAv1::GetQADebugLevel(), Form("ESD - Tested %d histograms, Return value %f \n",tested,rv[specie]));
249         AliInfo(Form("ESD - Tested %d histograms, Return value %f \n",tested,rv[specie]));
250       }
251     }
252   } // end of ESD QA
253   else{
254     
255     //____________________________________________________________________________
256
257     Double_t spdCheck[AliRecoParam::kNSpecies] ;
258     Double_t sddCheck[AliRecoParam::kNSpecies] ;
259     Double_t ssdCheck[AliRecoParam::kNSpecies] ;
260
261
262
263     for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
264       if ( !AliQAv1::Instance()->IsEventSpecieSet(specie)) continue; 
265       if ( AliQAv1::Instance()->IsEventSpecieSet(specie) ) {
266         Double_t histotot=list[specie]->GetEntries();
267         if(histotot!=0)
268           {
269             spdCheck[specie]=0.;
270             sddCheck[specie]=0.;
271             ssdCheck[specie]=0.;
272             rv[specie] = 0.0 ;// 
273             //pixel
274             if(fDet == 0 || fDet == 1) {
275               fSPDChecker->SetTaskOffset(fSPDOffset);
276               //printf("spdoffset = %i \n",fSPDOffset );
277               Double_t histoSPD=double(GetSPDHisto());
278               if(AliITSQADataMakerRec::AreEqual(histoSPD,0)==kFALSE){
279                 Double_t *stepSPD=new Double_t[AliQAv1::kNBIT];
280                 CreateStepForBit(histoSPD,stepSPD);
281                 fSPDChecker->SetStepBit(stepSPD);
282                 spdCheck[specie] = fSPDChecker->Check(index, list[specie], recoParam);
283                 if(spdCheck[specie]>fUpTestValue[AliQAv1::kFATAL]||spdCheck[specie]<0.)
284                   {
285                     AliInfo(Form("SPD check result for %s  is out of range (%f)!!! Retval of specie %s is sit to -1\n ",AliQAv1::GetAliTaskName(index),spdCheck[specie],AliRecoParam::GetEventSpecieName(specie)));
286                     spdCheck[specie]=fUpTestValue[AliQAv1::kFATAL];
287                   }
288                 delete []stepSPD;
289               }//end check SPD entries
290               else{spdCheck[specie]=fUpTestValue[AliQAv1::kFATAL];}
291               rv[specie]=spdCheck[specie];
292             }//end SPD check
293             //drift
294             if(fDet == 0 || fDet == 2) {
295               fSDDChecker->SetTaskOffset(fSDDOffset);
296               Double_t histoSDD=double(GetSDDHisto());
297               if(AliITSQADataMakerRec::AreEqual(histoSDD,0)==kFALSE){
298                 Double_t *stepSDD=new Double_t[AliQAv1::kNBIT];
299                 CreateStepForBit(histoSDD,stepSDD);
300                 fSDDChecker->SetStepBit(stepSDD);
301                 sddCheck[specie] = fSDDChecker->Check(index, list[specie], recoParam);  
302                 if(sddCheck[specie]>fUpTestValue[AliQAv1::kFATAL]||sddCheck[specie]<0.)
303                   {
304                     AliInfo(Form("SDD check result for %s  is out of range (%f)!!! Retval of specie %s is sit to -1\n ",AliQAv1::GetAliTaskName(index),sddCheck[specie],AliRecoParam::GetEventSpecieName(specie)));
305                     sddCheck[specie]=fUpTestValue[AliQAv1::kFATAL];
306                   }
307                 delete []stepSDD;
308               }//end check SDD entries
309               else{ssdCheck[specie]=fUpTestValue[AliQAv1::kFATAL];}
310               if(sddCheck[specie]>rv[specie])rv[specie]=sddCheck[specie];  
311             }//end SDD
312             //strip
313             if(fDet == 0 || fDet == 3) {
314               fSSDChecker->SetTaskOffset(fSSDOffset);
315               Double_t histoSSD=double(GetSSDHisto());
316               if(AliITSQADataMakerRec::AreEqual(histoSSD,0)==kFALSE){
317               Double_t *stepSSD=new Double_t[AliQAv1::kNBIT];
318               CreateStepForBit(histoSSD,stepSSD);
319               fSSDChecker->SetStepBit(stepSSD);
320               ssdCheck[specie] = fSSDChecker->Check(index, list[specie], recoParam);
321               if(ssdCheck[specie]>fUpTestValue[AliQAv1::kFATAL]||ssdCheck[specie]<0.)
322                 {
323                   AliInfo(Form("SSD check result for %s is out of range (%f)!!! Retval of specie %s is sit to -1\n ",AliQAv1::GetAliTaskName(index),ssdCheck[specie],AliRecoParam::GetEventSpecieName(specie)));
324                   ssdCheck[specie]=fUpTestValue[AliQAv1::kFATAL];
325                 }
326               delete [] stepSSD;
327               }//end check SSD entries
328               else{ssdCheck[specie]=fUpTestValue[AliQAv1::kFATAL];}
329               if(ssdCheck[specie]>rv[specie])rv[specie]=ssdCheck[specie];
330             }//end SSD
331             
332             AliInfo(Form("Check result for %s: \n\t  SPD %f \n\t  SDD %f \n\t  SSD %f \n Check result %f \n ",AliQAv1::GetAliTaskName(index),spdCheck[specie],sddCheck[specie],ssdCheck[specie],rv[specie]));
333             // here merging part for common ITS QA result
334             // 
335           }//end entries
336       }//end if event specie
337     }//end for
338   }
339 }
340
341 //____________________________________________________________________________
342 void AliITSQAChecker::SetTaskOffset(Int_t SPDOffset, Int_t SDDOffset, Int_t SSDOffset)
343 {
344   //Setting the 3 offsets for each task called
345   fSPDOffset = SPDOffset;
346   fSDDOffset = SDDOffset;
347   fSSDOffset = SSDOffset;
348 }
349
350 //____________________________________________________________________________
351 void AliITSQAChecker::SetHisto(Int_t SPDhisto, Int_t SDDhisto, Int_t SSDhisto)
352 {
353   //Setting the 3 offsets for each task called
354   fSPDHisto = SPDhisto;
355   fSDDHisto = SDDhisto;
356   fSSDHisto = SSDhisto;
357 }
358
359  //____________________________________________________________________________
360  void AliITSQAChecker::SetDetTaskOffset(Int_t subdet,Int_t offset)
361  {
362    //returns the offset for each task and for each subdetector
363    switch(subdet){
364    case 1:
365      SetSPDTaskOffset(offset);
366      break;
367    case 2:
368      SetSDDTaskOffset(offset);
369      break;
370    case 3:
371      SetSSDTaskOffset(offset);
372      break;
373    default:
374      AliWarning("No specific (SPD,SDD or SSD) subdetector correspond to to this number!!! all offsets set to zero for all the detectors\n");
375      SetTaskOffset(0, 0, 0);
376      break;
377    }
378  }
379
380  //____________________________________________________________________________
381  void AliITSQAChecker::SetDetHisto(Int_t subdet,Int_t histo)
382  {
383    //set the number od histograms for the subdetector
384    switch(subdet){
385    case 1:
386      SetSPDHisto(histo);
387      break;
388    case 2:
389      SetSDDHisto(histo);
390      break;
391    case 3:
392      SetSSDHisto(histo);
393      break;
394    default:
395      AliWarning("No specific (SPD,SDD or SSD) subdetector correspond to to this number!!! all offsets set to zero for all the detectors\n");
396      SetHisto(0, 0, 0);
397      break;
398    }
399  }
400
401 //_____________________________________________________________________________
402
403 void AliITSQAChecker::InitQACheckerLimits()
404 {
405   //init the tolerance range for each QA bit 
406   AliInfo("Setting of tolerance values\n");
407
408   Float_t lowtolerancevalue[AliQAv1::kNBIT];
409
410   Float_t hightolerancevalue[AliQAv1::kNBIT];
411   for(Int_t bit=0;bit<AliQAv1::kNBIT;bit++)
412     {
413       lowtolerancevalue[bit]=(bit*1000.);
414       hightolerancevalue[bit]=((bit+1.)*1000.);
415     }
416   SetHiLo(hightolerancevalue,lowtolerancevalue);
417   //  AliInfo(Form("Range Value  \n INFO    -> %f <  value <  %f \n WARNING -> %f <  value <= %f \n ERROR   -> %f <  value <= %f \n FATAL   -> %f <= value <  %f \n", fLowTestValue[AliQAv1::kINFO], fUpTestValue[AliQAv1::kINFO], fLowTestValue[AliQAv1::kWARNING], fUpTestValue[AliQAv1::kWARNING], fLowTestValue[AliQAv1::kERROR], fUpTestValue[AliQAv1::kERROR], fLowTestValue[AliQAv1::kFATAL], fUpTestValue[AliQAv1::kFATAL]  ));
418
419   if(fDet == 0 || fDet == 1) {
420     fSPDChecker->SetSPDLimits( lowtolerancevalue,hightolerancevalue );
421   }
422   if(fDet == 0 || fDet == 2) {
423     fSDDChecker->SetSDDLimits( lowtolerancevalue,hightolerancevalue );
424   }
425   if(fDet == 0 || fDet == 3) {
426     fSSDChecker->SetSSDLimits( lowtolerancevalue,hightolerancevalue );
427   }
428
429
430   
431 }
432
433
434 //_____________________________________________________________________________
435
436 void AliITSQAChecker::CreateStepForBit(Double_t histonumb,Double_t *steprange)
437 {
438   //creation of the step bit for each QA bit 
439   for(Int_t bit=0;bit < AliQAv1::kNBIT; bit++)
440     {       
441       //printf("%i\t %f \t %f \t %f \n",bit, fUpTestValue[bit],fLowTestValue[AliQAv1::kINFO],histonumb);
442       steprange[bit]=double((fUpTestValue[bit] - fLowTestValue[AliQAv1::kINFO])/histonumb);
443       //printf("%i\t %f \t %f \t %f \t %f\n",bit, fUpTestValue[bit],fLowTestValue[AliQAv1::kINFO],histonumb,steprange[bit] );
444     }
445   //AliInfo(Form("StepBitValue:numner of histo %f\n\t INFO %f \t WARNING %f \t ERROR %f \t FATAL %f \n",histonumb, steprange[AliQAv1::kINFO],steprange[AliQAv1::kWARNING],steprange[AliQAv1::kERROR],steprange[AliQAv1::kFATAL]));
446 }
447
448
449 //_____________________________________________________________________________
450 void AliITSQAChecker::SetQA(AliQAv1::ALITASK_t index, Double_t * value) const
451 {
452   //Setting of the QA tolerance values
453   AliQAv1 * qa = AliQAv1::Instance(index) ;
454
455
456   for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
457
458     if (! qa->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)))
459       continue ;
460     if (  value == NULL ) { // No checker is implemented, set all QA to Fatal
461       qa->Set(AliQAv1::kFATAL, specie) ; 
462     } else {
463       if ( value[specie] > fLowTestValue[AliQAv1::kFATAL] && value[specie] <= fUpTestValue[AliQAv1::kFATAL] ) 
464         qa->Set(AliQAv1::kFATAL, AliRecoParam::ConvertIndex(specie)) ; 
465       else if ( value[specie] > fLowTestValue[AliQAv1::kERROR] && value[specie] <= fUpTestValue[AliQAv1::kERROR]  )
466         qa->Set(AliQAv1::kERROR, AliRecoParam::ConvertIndex(specie)) ; 
467       else if ( value[specie] > fLowTestValue[AliQAv1::kWARNING] && value[specie] <= fUpTestValue[AliQAv1::kWARNING]  )
468         qa->Set(AliQAv1::kWARNING, AliRecoParam::ConvertIndex(specie)) ;
469       else if ( value[specie] > fLowTestValue[AliQAv1::kINFO] && value[specie] <= fUpTestValue[AliQAv1::kINFO] ) 
470         qa->Set(AliQAv1::kINFO, AliRecoParam::ConvertIndex(specie)) ;   
471       //else if(value[specie]==0) qa->Set(AliQAv1::kFATAL, AliRecoParam::ConvertIndex(specie)) ; //no ckeck has been done
472     }
473     qa->ShowStatus(AliQAv1::kITS,index,AliRecoParam::ConvertIndex(specie));
474   }//end for
475
476 }
477
478
479 //__________________________________________________________________
480 void  AliITSQAChecker::MakeImage( TObjArray ** list, AliQAv1::TASKINDEX_t task, AliQAv1::MODE_t mode)
481 {
482   //make a summary image
483   //gStyle->SetPalette(1);
484
485   //Int_t nImages = 0 ;
486   //Int_t imageindex=0;
487   for (Int_t esIndex = 0 ; esIndex < AliRecoParam::kNSpecies ; esIndex++) {
488     if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(esIndex)) ) 
489       continue ;
490     //else imageindex=esIndex;
491
492     TIter next(list[esIndex]) ;  
493     TH1 * hdata = NULL ; 
494     while ( (hdata=static_cast<TH1 *>(next())) ) {
495       TString cln(hdata->ClassName()) ; 
496       if ( ! cln.Contains("TH") )
497         continue ; 
498       if(cln.Contains("TH2")) hdata->SetOption("colz");
499     }
500     break ; 
501   }
502
503   Bool_t retvalue=kFALSE;
504
505   if(GetSubDet()==0) MakeITSImage(list,task, mode);
506   else if(GetSubDet()==1) 
507     {
508       retvalue=fSPDChecker->MakeSPDImage(list,task, mode) ; 
509       if(retvalue==kFALSE)AliQACheckerBase::MakeImage(list,task, mode);
510     }
511   else if(GetSubDet()==2){ retvalue=fSDDChecker->MakeSDDImage(list,task, mode) ;if(retvalue==kFALSE)AliQACheckerBase::MakeImage(list,task,mode); }
512   else if(GetSubDet()==3) 
513     {
514       retvalue=fSSDChecker->MakeSSDImage(list,task, mode) ;
515       if(retvalue==kFALSE)AliQACheckerBase::MakeImage(list,task, mode); 
516     }
517
518 }
519