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 **************************************************************************/
16 // Checks the quality assurance.
17 // By comparing with reference data
19 //---------------------------------------------
20 //checkig without reference data:
21 //for RAW QA all histograms should have approximatly the same
22 //number of entries as RefPoint
23 //for Rec Points checks
24 // - amplitude measured by 2 methos
25 // - online and offline T0 measurements
26 // for ESD quality of reconstruction ( and measurements):
27 // RMS of vertex and T0 less than 75ps
29 // Alla.Maevskaya@cern.ch
32 // --- ROOT system ---
33 #include <Riostream.h>
37 #include <TIterator.h>
43 // --- Standard library ---
45 // --- AliRoot header files ---
48 #include "AliQAChecker.h"
49 #include "AliT0QAChecker.h"
51 ClassImp(AliT0QAChecker)
54 //__________________________________________________________________
55 Double_t AliT0QAChecker::Check(AliQA::ALITASK_t index,TObjArray * list)
58 // Super-basic check on the QA histograms on the input list:
59 // look whether they are empty!
62 Double_t test = 10.0 ;
67 memset(nent,0,250*sizeof(Double_t));
69 memset(w,1,250*sizeof(Double_t));
74 // TString dataType = AliQA::GetAliTaskName(index);
76 if (list->GetEntries() == 0){
77 test = 1. ; // nothing to check
85 // printf(" data type %i %s nentries %i\n",
86 // index,dataType.Data(),list->GetEntries());
88 for (Int_t ir=0; ir<list->GetEntries(); ir++)
94 hdata = (TH1*) list->UncheckedAt(ir);
96 cname = hdata->GetName();
98 AliDebug(10,Form("count %i %s \n",ir, hname[ir].Data())) ;
104 h = (TH2*) list->UncheckedAt(ir);
105 printf(" index %i ir %i \n", index,ir);
107 cname = h->GetName();
109 AliDebug(1,Form("count %i %s \n",ir, hname[ir].Data())) ;
117 h = (TH2*) list->UncheckedAt(ir);
120 cname = h->GetName();
122 AliDebug(1,Form("count %i %s \n",ir, hname[ir].Data())) ;
128 cout<<" ir "<<ir<<endl;
129 hdata = (TH1*) list->UncheckedAt(ir);
132 AliDebug(1,Form("count %i %s ",ir, hname[ir].Data()) );
141 for (Int_t icase=205; icase<207; icase++) {
142 for (Int_t idet=0; idet<24; idet++) {
143 Double_t mean = fhRawEff[icase]->
144 ProjectionY(Form("%s_py_%i_%i",
145 fhRawEff[icase]->GetName(), idet,icase),
146 idet,idet+1)->GetMean();
147 Double_t rms= fhRawEff[icase]->
148 ProjectionY(Form("%s_py%i_%i",
149 fhRawEff[icase]->GetName(), idet,icase),
150 idet,idet+1)->GetRMS();
151 printf("name %s icase %i idet %i mean %f, rms %f\n",
152 fhRawEff[icase]->GetName(), icase, idet, mean,rms);
154 if (mean<1.2 && mean> 0.8 ) {
156 AliDebug(1,Form("All channels works meane efficieny %f with rms %f test %f", mean, rms, test)) ;
158 if (mean<=0.8 && mean>= 0.5 ){
160 AliDebug(1,Form("%s problem in channel %i efficieny %f test %f",
161 fhRawEff[icase]->GetName(), idet, mean, test)) ;
165 AliDebug(1,Form("%s big problem in channel %i efficieny %f test %f",
166 fhRawEff[icase]->GetName(), idet, mean, test)) ;
176 for (Int_t icase=0; icase<2; icase++) {
177 for (Int_t idet=0; idet<24; idet++) {
178 Double_t mean = fhRecDiff[icase]->
179 ProjectionY(Form("%s_py", fhRecDiff[icase]->GetName()),
180 idet,idet+1)->GetMean();
181 Double_t rms= fhRecDiff[icase]->
182 ProjectionY(Form("%s_py", fhRecDiff[icase]->GetName()),
183 idet,idet+1)->GetRMS();
184 printf("name %s icase %i idet %i mean %f, rms %f\n",
185 fhRecDiff[icase]->GetName(), icase, idet, mean,rms);
187 if(TMath::Abs(mean) >1.5 || rms >1){
188 AliDebug(1,Form(" calibration is nor perfect; test=%f", test)) ;
191 if(mean>3 || rms >5) {
193 AliDebug(1,Form(" wrong calibration test=%f", test)) ;
202 for (Int_t icase=0; icase<2; icase++) {
203 Double_t rmsVertex = fhESD[icase]->GetRMS();
204 Double_t meanVertex = fhESD[icase]->GetMean();
207 cout<<"numentries "<< fhESD[icase]->GetEntries()<<" meanVertex "<<meanVertex<<" rmsVertex "<<rmsVertex<<endl;
208 if (TMath::Abs(rmsVertex)>3) {
210 AliDebug(1,Form("Vertex position resolution not good , rms= %f test=%f",
213 if (TMath::Abs(meanVertex)>3) {
215 AliDebug(1,Form("Vertex position bad calibrated , Mean= %f test=%f",
222 } // if (list->GetEntries() != 0
224 AliInfo(Form("Test Result = %f", test)) ;