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*/)
57 Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
58 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
63 //__________________________________________________________________
64 Double_t * AliT0QAChecker::Check(AliQA::ALITASK_t index,TObjArray ** list)
67 // Super-basic check on the QA histograms on the input list:
68 // look whether they are empty!
70 Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
71 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
77 memset(nent,0,250*sizeof(Double_t));
79 memset(w,1,250*sizeof(Double_t));
84 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
85 // TString dataType = AliQA::GetAliTaskName(index);
86 if (list[specie]->GetEntries() == 0){
87 test[specie] = 1. ; // nothing to check
90 TIter next(list[specie]) ;
93 // AliInfo(Form(" data type %i %s nentries %i\n",
94 // index,dataType.Data(),list->GetEntries()));
95 for (Int_t ir=0; ir<list[specie]->GetEntries(); ir++) {
100 hdata = (TH1*) list[specie]->UncheckedAt(ir);
102 cname = hdata->GetName();
104 AliDebug(10,Form("count %i %s \n",ir, hname[ir].Data())) ;
110 h = (TH2*) list[specie]->UncheckedAt(ir);
111 AliInfo(Form(" index %i ir %i \n", index,ir));
113 cname = h->GetName();
115 AliDebug(1,Form("count %i %s \n",ir, hname[ir].Data())) ;
123 h = (TH2*) list[specie]->UncheckedAt(ir);
125 cname = h->GetName();
127 AliDebug(1,Form("count %i %s \n",ir, hname[ir].Data())) ;
133 cout<<" ir "<<ir<<endl;
134 hdata = (TH1*) list[specie]->UncheckedAt(ir);
137 AliDebug(1,Form("count %i %s ",ir, hname[ir].Data()) );
144 for (Int_t icase=205; icase<207; icase++) {
145 for (Int_t idet=0; idet<24; idet++) {
146 Double_t mean = fhRawEff[icase]->ProjectionY(Form("%s_py_%i_%i",
147 fhRawEff[icase]->GetName(), idet,icase),
148 idet,idet+1)->GetMean();
149 Double_t rms= fhRawEff[icase]->ProjectionY(Form("%s_py%i_%i",
150 fhRawEff[icase]->GetName(), idet,icase),
151 idet,idet+1)->GetRMS();
152 AliInfo(Form("name %s icase %i idet %i mean %f, rms %f\n",
153 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[specie])) ;
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[specie])) ;
165 AliDebug(1,Form("%s big problem in channel %i efficieny %f test %f",
166 fhRawEff[icase]->GetName(), idet, mean, test[specie])) ;
173 for (Int_t icase=0; icase<2; icase++) {
174 for (Int_t idet=0; idet<24; idet++) {
175 Double_t mean = fhRecDiff[icase]->
176 ProjectionY(Form("%s_py", fhRecDiff[icase]->GetName()),
177 idet,idet+1)->GetMean();
178 Double_t rms= fhRecDiff[icase]->
179 ProjectionY(Form("%s_py", fhRecDiff[icase]->GetName()),
180 idet,idet+1)->GetRMS();
181 AliInfo(Form("name %s icase %i idet %i mean %f, rms %f\n",
182 fhRecDiff[icase]->GetName(), icase, idet, mean,rms));
184 if(TMath::Abs(mean) >1.5 || rms >1){
185 AliDebug(1,Form(" calibration is nor perfect; test=%f", test)) ;
188 if(mean>3 || rms >5) {
190 AliDebug(1,Form(" wrong calibration test=%f", test[specie])) ;
197 for (Int_t icase=0; icase<2; icase++) {
198 Double_t rmsVertex = fhESD[icase]->GetRMS();
199 Double_t meanVertex = fhESD[icase]->GetMean();
201 AliInfo(Form("numentries %d meanVertex %f rmsVertex %f", fhESD[icase]->GetEntries(), meanVertex, rmsVertex));
202 if (TMath::Abs(rmsVertex)>3) {
204 AliDebug(1,Form("Vertex position resolution not good , rms= %f test=%f",
205 rmsVertex, test[specie])) ;
207 if (TMath::Abs(meanVertex)>3) {
209 AliDebug(1,Form("Vertex position bad calibrated , Mean= %f test=%f",
210 meanVertex, test[specie])) ;
214 } // if (list->GetEntries() != 0
215 AliInfo(Form("Test Result = %f", test[specie])) ;