1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
20 // Checks the quality assurance.
21 // By comparing with reference data
23 //---------------------------------------------
24 //checkig without reference data:
25 //for RAW QA all histograms should have approximatly the same
26 //number of entries as RefPoint
27 //for Rec Points checks
28 // - amplitude measured by 2 methos
29 // - online and offline T0 measurements
30 // for ESD quality of reconstruction ( and measurements):
31 // RMS of vertex and T0 less than 75ps
33 // Alla.Maevskaya@cern.ch
36 // --- ROOT system ---
37 #include <Riostream.h>
41 #include <TIterator.h>
46 // --- Standard library ---
48 // --- AliRoot header files ---
51 #include "AliQAChecker.h"
52 #include "AliT0QAChecker.h"
54 ClassImp(AliT0QAChecker)
57 //__________________________________________________________________
58 const Double_t AliT0QAChecker::Check(AliQA::ALITASK_t index,TObjArray * list)
61 // Super-basic check on the QA histograms on the input list:
62 // look whether they are empty!
65 Double_t test = 10.0 ;
68 Double_t nent[200], nentraw[200];
71 memset(nent,0,200*sizeof(Double_t));
73 memset(w,1,200*sizeof(Double_t));
74 TH1 *fhRecLEDAmp[24]; TH1 * fhRecQTC[24];
75 TH1 *fhOnlineMean = 0x0;
76 TH1 * fhRecMean = 0x0;
78 TH1 *fhESDVertex = 0x0;
79 TString dataType = AliQA::GetAliTaskName(index);
81 if (list->GetEntries() == 0){
82 test = 1. ; // nothing to check
90 while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
92 nent[count] = hdata->GetEntries();
93 cname = hdata->GetName();
95 AliDebug(10,Form("count %i %s -> %f",count, hname[count].Data(),nent[count])) ;
97 if(count>23 && count<48)fhRecLEDAmp[count-24] = hdata;
98 if(count>47 && count<72)fhRecQTC[count-48] = hdata;
99 if(count == 72) fhOnlineMean = hdata;
100 if(count == 73) fhRecMean = hdata;
105 if(count==0) fhESDMean = hdata;
106 if(count==1) fhESDVertex = hdata;
108 AliWarning("Unknowm ESD QA histograms");
115 if(hdata->GetEntries()>0) rv = 1;
116 // AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
121 AliError("Data type cannot be processed") ;
128 AliWarning("Histograms are there, but they are all empty: setting flag to kWARNING");
129 test = 0.5; //upper limit value to set kWARNING flag for a task
134 if ( TMath::Abs(fhRecMean->GetMean() - fhOnlineMean->GetMean()) > 5)
135 AliWarning(Form("rec mean %f -> online mean %f",fhRecMean->GetMean(), fhOnlineMean->GetMean())) ;
136 Double_t meanLED, meanQTC;
137 for (Int_t idet=0; idet<24; idet++) {
138 meanLED = fhRecLEDAmp[idet]->GetMean();
139 meanQTC = fhRecQTC[idet]->GetMean();
140 if (TMath::Abs(meanLED-meanQTC)> 1.)
141 AliWarning(Form("Amplitude measurements are different in channel %i : Amp LED %f -> Amp QTC %f",idet,meanLED, meanQTC)) ;
148 Float_t realNumber = Float_t(nent[0]);
149 for (Int_t i=77; i<count; i++)
151 Double_t diff = TMath::Abs(nent[i]-realNumber);
152 if (diff > 0.1*realNumber )
153 AliWarning(Form("Problem in Number of entried in hist %s is %f number of RefPoints %f\n",hname[i].Data() , nent[i],realNumber )) ;
158 Double_t rmsMeanTime = fhESDMean->GetRMS();
160 AliWarning(Form("Mean time with bad resolution, RMS= %f",rmsMeanTime)) ;
161 Double_t rmsVertex = fhESDVertex->GetRMS();
163 AliWarning(Form("Vertex with bad resolution, RMS= %f",rmsVertex)) ;
171 } // if (list->GetEntries() != 0
173 AliInfo(Form("Test Result = %f", test)) ;