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 **************************************************************************/
17 // --- ROOT system ---
19 #include <TIterator.h>
22 // --- Standard library ---
24 // --- AliRoot header files ---
26 #include "AliZDCQAChecker.h"
28 ClassImp(AliZDCQAChecker)
30 //____________________________________________________________________________
31 void AliZDCQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t index, TObjArray ** list,
32 const AliDetectorRecoParam * /*recoParam*/)
34 // Checks the QA histograms on the input list:
36 const char* taskName = AliQAv1::GetAliTaskName(index);
37 //printf("\n\tAliZDCQAChecker -> checking QA histos for task %s\n",taskName);
39 Int_t ihitHisto=0, idigHisto=0;
40 Int_t irecHisto=0, irawHisto=0, esdInd=0;
42 for(Int_t specie = 0; specie<AliRecoParam::kNSpecies; specie++){
44 if(!AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)))
46 //printf("\tAliZDCQAChecker -> specie %d, AliRecoParam::ConvertIndex(specie) %d, AliRecoParam::kLowMult %d, IsEventSpecieSet(specie) %d\n",
47 // specie, AliRecoParam::ConvertIndex(specie) ,AliRecoParam::kLowMult,
48 // AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)));
50 // ====================================================================
51 // Checks for p-p events
52 // ====================================================================
53 if(AliRecoParam::ConvertIndex(specie) == AliRecoParam::kLowMult){
54 if(list[specie]->GetEntries()==0){
55 AliWarning("\t The list to be checked is empty!"); // nothing to check
58 //AliDebug(AliQAv1::GetQADebugLevel(), Form("\n\tAliZDCQAChecker-> checking QA histograms for task %s\n\n",taskName));
59 TIter next(list[specie]);
63 Float_t res=0., percentageDiff=0.30;
64 Float_t meanZNA=0., meanZNC=0., meanZPA=0., meanZPC=0.;
65 Float_t pmCZNA=0., pmCZNC=0., pmCZPA=0., pmCZPC=0.;
66 Float_t pmQZNA=0., pmQZNC=0., pmQZPA=0., pmQZPC=0.;
67 Float_t sumADCZNA=0., sumADCZNC=0., sumADCZPA=0., sumADCZPC=0.;
68 Float_t adcCZNA=0., adcCZNC=0., adcCZPA=0., adcCZPC=0.;
69 Float_t adcQZNA=0., adcQZNC=0., adcQZPA=0., adcQZPC=0.;
71 while((hdata = dynamic_cast<TH1 *>(next()))){
73 // -------------------------------------------------------------------
74 if(index == AliQAv1::kSIM){
75 //AliDebug(AliQAv1::GetQADebugLevel(), Form("\tAliZDCQAChecker-> checking histo %s",hdata->GetName()));
78 if(!(strncmp(hdata->GetName(),"hHits",5))){
79 if(hdata->GetEntries()>0){
80 if(ihitHisto==0) meanZNC = hdata->GetMean();
81 else if(ihitHisto==1) meanZNA = hdata->GetMean();
82 else if(ihitHisto==2) meanZPC = hdata->GetMean();
83 else if(ihitHisto==3) meanZPA = hdata->GetMean();
84 else if(ihitHisto==4) pmQZNC = hdata->GetMean();
85 else if(ihitHisto==5) pmQZNA = hdata->GetMean();
86 else if(ihitHisto==6) pmQZPC = hdata->GetMean();
87 else if(ihitHisto==7) pmQZPA = hdata->GetMean();
88 else if(ihitHisto==8) pmCZNC = hdata->GetMean();
89 else if(ihitHisto==9) pmCZNA = hdata->GetMean();
90 else if(ihitHisto==10) pmCZPC = hdata->GetMean();
91 else if(ihitHisto==11) pmCZPA = hdata->GetMean();
94 // --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
96 if(TMath::Abs(meanZNC)>1.e-10){
97 if((TMath::Abs(pmQZNC-pmCZNC)/pmCZNC)<percentageDiff)
104 if(TMath::Abs(meanZNA)>1.e-10){
105 if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
112 if(TMath::Abs(meanZPC)>1.e-10){
113 if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
120 if(TMath::Abs(meanZPA)>1.e-10){
121 if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
131 // Check DIGIT HIGH GAIN CHAIN histos
132 else if(!(strncmp(hdata->GetName(),"hDig",4))){
133 if(hdata->GetEntries()>0){
134 if(idigHisto==0) sumADCZNC = hdata->GetMean();
135 else if(idigHisto==1) sumADCZNA = hdata->GetMean();
136 else if(idigHisto==2) sumADCZPC = hdata->GetMean();
137 else if(idigHisto==3) sumADCZPA = hdata->GetMean();
138 else if(idigHisto==4) pmQZNC = hdata->GetMean();
139 else if(idigHisto==5) pmQZNA = hdata->GetMean();
140 else if(idigHisto==6) pmQZPC = hdata->GetMean();
141 else if(idigHisto==7) pmQZPA = hdata->GetMean();
142 else if(idigHisto==8) pmCZNC = hdata->GetMean();
143 else if(idigHisto==9) pmCZNA = hdata->GetMean();
144 else if(idigHisto==10) pmCZPC = hdata->GetMean();
145 else if(idigHisto==11) pmCZPA = hdata->GetMean();
148 // --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
150 if(TMath::Abs(sumADCZNC)>1.e-10){
151 if((TMath::Abs(adcQZNC-adcCZNC)/adcCZNC)<percentageDiff)
158 if(TMath::Abs(sumADCZNA)>1.e-10){
159 if((TMath::Abs(adcQZNA-adcCZNA)/adcCZNA)<percentageDiff)
166 if(TMath::Abs(sumADCZPC)>1.e-10){
167 if((TMath::Abs(adcQZPC-adcCZPC)/adcCZPC)<percentageDiff)
174 if(TMath::Abs(sumADCZPA)>1.e-10){
175 if((TMath::Abs(adcQZPA-adcCZPA)/adcCZPA)<percentageDiff)
186 // -------------------------------------------------------------------
187 else if(index == AliQAv1::kRAW) {
189 // Check RAW HIGH GAIN CHAIN histos
190 if(hdata->GetEntries()>0){
191 if(irawHisto==0) sumADCZNC = hdata->GetMean();
192 else if(irawHisto==1) sumADCZNA = hdata->GetMean();
193 else if(irawHisto==2) sumADCZPC = hdata->GetMean();
194 else if(irawHisto==3) sumADCZPA = hdata->GetMean();
195 else if(irawHisto==6) adcQZNC = hdata->GetMean();
196 else if(irawHisto==7) adcQZNA = hdata->GetMean();
197 else if(irawHisto==8) adcQZPC = hdata->GetMean();
198 else if(irawHisto==9) adcQZPA = hdata->GetMean();
199 else if(irawHisto==10) adcCZNC = hdata->GetMean();
200 else if(irawHisto==11) adcCZNA = hdata->GetMean();
201 else if(irawHisto==12) adcCZPC = hdata->GetMean();
202 else if(irawHisto==13) adcCZPA = hdata->GetMean();
205 // --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
207 if(TMath::Abs(sumADCZNC)>1.e-10){
208 if((TMath::Abs(adcQZNC-adcCZNC)/adcCZNC)<percentageDiff)
215 if(TMath::Abs(sumADCZNA)>1.e-10){
216 if((TMath::Abs(adcQZNA-adcCZNA)/adcCZNA)<percentageDiff)
223 if(TMath::Abs(sumADCZPC)>1.e-10){
224 if((TMath::Abs(adcQZPC-adcCZPC)/adcCZPC)<percentageDiff)
231 if(TMath::Abs(sumADCZPA)>1.e-10){
232 if((TMath::Abs(adcQZPA-adcCZPA)/adcCZPA)<percentageDiff)
242 // -------------------------------------------------------------------
243 else if(index == AliQAv1::kREC) {
245 // Check REC HIGH GAIN CHAIN histos
246 if(hdata->GetEntries()>0){
247 if(irecHisto==0) meanZNC = hdata->GetMean();
248 else if(irecHisto==1) meanZNA = hdata->GetMean();
249 else if(irecHisto==2) meanZPC = hdata->GetMean();
250 else if(irecHisto==3) meanZPA = hdata->GetMean();
251 else if(irecHisto==4) pmQZNC = hdata->GetMean();
252 else if(irecHisto==5) pmQZNA = hdata->GetMean();
253 else if(irecHisto==6) pmQZPC = hdata->GetMean();
254 else if(irecHisto==7) pmQZPA = hdata->GetMean();
255 else if(irecHisto==8) pmCZNC = hdata->GetMean();
256 else if(irecHisto==9) pmCZNA = hdata->GetMean();
257 else if(irecHisto==10) pmCZPC = hdata->GetMean();
258 else if(irecHisto==11) pmCZPA = hdata->GetMean();
261 // --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
263 if(TMath::Abs(meanZNC)>1.e-10){
264 if((TMath::Abs(pmQZNC-pmCZNC)/pmCZNC)<percentageDiff)
271 if(TMath::Abs(meanZNA)>1.e-10){
272 if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
279 if(TMath::Abs(meanZPC)>1.e-10){
280 if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
287 if(TMath::Abs(meanZPA)>1.e-10){
288 if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
298 // -------------------------------------------------------------------
299 else if(index == AliQAv1::kESD) {
301 // Check ESD HIGH GAIN CHAIN histos
302 if(hdata->GetEntries()>0){
303 if(esdInd==2) sumADCZNC = hdata->GetMean();
304 else if(esdInd==3) sumADCZNA = hdata->GetMean();
305 else if(esdInd==4) sumADCZPC = hdata->GetMean();
306 else if(esdInd==5) sumADCZPA = hdata->GetMean();
307 else if(esdInd==8) pmQZNC = hdata->GetMean();
308 else if(esdInd==9) pmQZNA = hdata->GetMean();
309 else if(esdInd==10) pmQZPC = hdata->GetMean();
310 else if(esdInd==11) pmQZPA = hdata->GetMean();
311 else if(esdInd==12) pmCZNC = hdata->GetMean();
312 else if(esdInd==13) pmCZNA = hdata->GetMean();
313 else if(esdInd==14) pmCZPC = hdata->GetMean();
314 else if(esdInd==15) pmCZPA = hdata->GetMean();
317 // --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
319 if(TMath::Abs(sumADCZNC)>1.e-10){
320 if((TMath::Abs(pmQZNC-pmCZNC)/pmCZNC)<percentageDiff)
327 if(TMath::Abs(sumADCZNA)>1.e-10){
328 if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
335 if(TMath::Abs(sumADCZPC)>1.e-10){
336 if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
343 if(TMath::Abs(sumADCZPA)>1.e-10){
344 if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
355 AliWarning(Form("\n\t No ZDC QA for %s task\n",taskName));
359 else AliError("AliZDCQAChecker-> No histos!!!\n");
362 // ====================================================================
363 // Checks for A-A events
364 // ====================================================================
365 else if (AliRecoParam::ConvertIndex(specie) == AliRecoParam::kHighMult) {
366 if(list[specie]->GetEntries()==0){
367 AliWarning("\t The list to be checked is empty!");
370 //AliDebug(AliQAv1::GetQADebugLevel(), Form("\n\tAliZDCQAChecker-> checking QA histograms for task %s\n\n",taskName));
372 TIter next(list[specie]);
376 Float_t res=0., percentageDiff=0.10;
377 Float_t meanZNA=0., meanZNC=0., meanZPA=0., meanZPC=0.;
378 Float_t pmCZNA=0., pmCZNC=0., pmCZPA=0., pmCZPC=0.;
379 Float_t pmQZNA=0., pmQZNC=0., pmQZPA=0., pmQZPC=0.;
380 Float_t sumADCZNA=0., sumADCZNC=0., sumADCZPA=0., sumADCZPC=0.;
381 Float_t adcCZNA=0., adcCZNC=0., adcCZPA=0., adcCZPC=0.;
382 Float_t adcQZNA=0., adcQZNC=0., adcQZPA=0., adcQZPC=0.;
384 while((hdata = dynamic_cast<TH1 *>(next()))){
386 //AliDebug(AliQAv1::GetQADebugLevel(), Form("\tAliZDCQAChecker-> checking histo %s",hdata->GetName()));
387 // -------------------------------------------------------------------
388 if(index == AliQAv1::kSIM){
390 if (!(strncmp(hdata->GetName(),"hHits",5))){
391 if(hdata->GetEntries()>0){
392 if(ihitHisto==0) meanZNC = hdata->GetMean();
393 else if(ihitHisto==1) meanZNA = hdata->GetMean();
394 else if(ihitHisto==2) meanZPC = hdata->GetMean();
395 else if(ihitHisto==3) meanZPA = hdata->GetMean();
396 else if(ihitHisto==4) pmQZNC = hdata->GetMean();
397 else if(ihitHisto==5) pmQZNA = hdata->GetMean();
398 else if(ihitHisto==6) pmQZPC = hdata->GetMean();
399 else if(ihitHisto==7) pmQZPA = hdata->GetMean();
400 else if(ihitHisto==8) pmCZNC = hdata->GetMean();
401 else if(ihitHisto==9) pmCZNA = hdata->GetMean();
402 else if(ihitHisto==10) pmCZPC = hdata->GetMean();
403 else if(ihitHisto==11) pmCZPA = hdata->GetMean();
406 // --- Check whether 2*|Mean ZNA - Mean ZNC|/(Mean ZNA + Mean ZNC) < percentageDiff
407 // --- and 2*|Mean ZPA - Mean ZPC|/(Mean ZPA + Mean ZPC) < 2*percentageDiff
409 if(TMath::Abs(meanZNC)>1.e-10 && TMath::Abs(meanZNA)>1.e-10){
410 if((2*TMath::Abs(meanZNC-meanZNA)/(meanZNA+meanZNC))<percentageDiff)
417 if(TMath::Abs(meanZPC)>1.e-10 && TMath::Abs(meanZPA)>1.e-10){
418 if((TMath::Abs(meanZPC-meanZPA)/(meanZPA+meanZPC))<percentageDiff)
426 // --- Check whether (mean PMQi - PMC)/PMC < percentageDiff
428 if(TMath::Abs(meanZNC)>1.e-10){
429 if((TMath::Abs(pmQZNC-pmCZNC)/pmCZNC)<percentageDiff)
436 if(TMath::Abs(meanZNA)>1.e-10){
437 if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
444 if(TMath::Abs(meanZPC)>1.e-10){
445 if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
452 if(TMath::Abs(meanZPA)>1.e-10){
453 if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
463 // Check DIGITS histos
464 else if (!(strncmp(hdata->GetName(),"hDig",4))){
465 if(hdata->GetEntries()>0){
466 if(idigHisto==0) sumADCZNC = hdata->GetMean();
467 else if(idigHisto==1) sumADCZNA = hdata->GetMean();
468 else if(idigHisto==2) sumADCZPC = hdata->GetMean();
469 else if(idigHisto==3) sumADCZPA = hdata->GetMean();
470 else if(idigHisto==4) adcQZNC = hdata->GetMean();
471 else if(idigHisto==5) adcQZNA = hdata->GetMean();
472 else if(idigHisto==6) adcQZPC = hdata->GetMean();
473 else if(idigHisto==7) adcQZPA = hdata->GetMean();
474 else if(idigHisto==8) adcCZNC = hdata->GetMean();
475 else if(idigHisto==9) adcCZNA = hdata->GetMean();
476 else if(idigHisto==10) adcCZPC = hdata->GetMean();
477 else if(idigHisto==11) adcCZPA = hdata->GetMean();
480 // --- Check whether 2*|Mean ZNA - Mean ZNC|/(Mean ZNA + Mean ZNC) < percentageDiff
481 // --- and 2*|Mean ZPA - Mean ZPC|/(Mean ZPA + Mean ZPC) < 2*percentageDiff
483 if(TMath::Abs(sumADCZNC)>1.e-10 && TMath::Abs(sumADCZNA)>1.e-10){
484 if((2*TMath::Abs(sumADCZNC-sumADCZNA)/(sumADCZNA+sumADCZNC))<percentageDiff)
491 if(TMath::Abs(sumADCZPC)>1.e-10 && TMath::Abs(sumADCZPA)>1.e-10){
492 if((TMath::Abs(sumADCZPC-sumADCZPA)/(sumADCZPA+sumADCZPC))<percentageDiff)
500 // --- Check whether (sumADC PMQi - PMC)/PMC < percentageDiff
502 if(TMath::Abs(sumADCZNC)>1.e-10){
503 if((TMath::Abs(adcQZNC-adcCZNC)/adcCZNC)<percentageDiff)
510 if(TMath::Abs(sumADCZNA)>1.e-10){
511 if((TMath::Abs(adcQZNA-adcCZNA)/adcCZNA)<percentageDiff)
518 if(TMath::Abs(sumADCZPC)>1.e-10){
519 if((TMath::Abs(adcQZPC-adcCZPC)/adcCZPC)<percentageDiff)
526 if(TMath::Abs(sumADCZPA)>1.e-10){
527 if((TMath::Abs(adcQZPA-adcCZPA)/adcCZPA)<percentageDiff)
538 // -------------------------------------------------------------------
539 else if(index == AliQAv1::kRAW){
541 // Check RAW HIGH GAIN CHAIN histos
542 if(hdata->GetEntries()>0){
543 if(irawHisto==0) sumADCZNC = hdata->GetMean();
544 else if(irawHisto==1) sumADCZNA = hdata->GetMean();
545 else if(irawHisto==2) sumADCZPC = hdata->GetMean();
546 else if(irawHisto==3) sumADCZPA = hdata->GetMean();
547 else if(irawHisto==6) adcQZNC = hdata->GetMean();
548 else if(irawHisto==7) adcQZNA = hdata->GetMean();
549 else if(irawHisto==8) adcQZPC = hdata->GetMean();
550 else if(irawHisto==9) adcQZPA = hdata->GetMean();
551 else if(irawHisto==10) adcCZNC = hdata->GetMean();
552 else if(irawHisto==11) adcCZNA = hdata->GetMean();
553 else if(irawHisto==12) adcCZPC = hdata->GetMean();
554 else if(irawHisto==13) adcCZPA = hdata->GetMean();
557 // --- Check whether 2*|Mean ZNA - Mean ZNC|/(Mean ZNA + Mean ZNC) < percentageDiff
558 // --- and 2*|Mean ZPA - Mean ZPC|/(Mean ZPA + Mean ZPC) < 2*percentageDiff
560 if(TMath::Abs(sumADCZNC)>1.e-10 && TMath::Abs(sumADCZNA)>1.e-10){
561 if((2*TMath::Abs(sumADCZNC-sumADCZNA)/(sumADCZNA+sumADCZNC))<percentageDiff)
568 if(TMath::Abs(sumADCZPC)>1.e-10 && TMath::Abs(sumADCZPA)>1.e-10){
569 if((TMath::Abs(sumADCZPC-sumADCZPA)/(sumADCZPA+sumADCZPC))<percentageDiff)
577 // --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
579 if(TMath::Abs(sumADCZNC)>1.e-10){
580 if((TMath::Abs(adcQZNC-adcCZNC)/adcCZNC)<percentageDiff)
587 if(TMath::Abs(sumADCZNA)>1.e-10){
588 if((TMath::Abs(adcQZNA-adcCZNA)/adcCZNA)<percentageDiff)
595 if(TMath::Abs(sumADCZPC)>1.e-10){
596 if((TMath::Abs(adcQZPC-adcCZPC)/adcCZPC)<percentageDiff)
603 if(TMath::Abs(sumADCZPA)>1.e-10){
604 if((TMath::Abs(adcQZPA-adcCZPA)/adcCZPA)<percentageDiff)
614 // -------------------------------------------------------------------
615 else if(index == AliQAv1::kREC){
617 // Check RAW HIGH GAIN CHAIN histos
618 if(hdata->GetEntries()>0){
619 if(irecHisto==0) meanZNC = hdata->GetMean();
620 else if(irecHisto==1) meanZNA = hdata->GetMean();
621 else if(irecHisto==2) meanZPC = hdata->GetMean();
622 else if(irecHisto==3) meanZPA = hdata->GetMean();
623 else if(irecHisto==4) pmQZNC = hdata->GetMean();
624 else if(irecHisto==5) pmQZNA = hdata->GetMean();
625 else if(irecHisto==6) pmQZPC = hdata->GetMean();
626 else if(irecHisto==7) pmQZPA = hdata->GetMean();
627 else if(irecHisto==8) pmCZNC = hdata->GetMean();
628 else if(irecHisto==9) pmCZNA = hdata->GetMean();
629 else if(irecHisto==10) pmCZPC = hdata->GetMean();
630 else if(irecHisto==11) pmCZPA = hdata->GetMean();
633 // --- Check whether 2*|Mean ZNA - Mean ZNC|/(Mean ZNA + Mean ZNC) < percentageDiff
634 // --- and 2*|Mean ZPA - Mean ZPC|/(Mean ZPA + Mean ZPC) < 2*percentageDiff
636 if(TMath::Abs(meanZNC)>1.e-10 && TMath::Abs(meanZNA)>1.e-10){
637 if((2*TMath::Abs(meanZNC-meanZNA)/(meanZNA+meanZNC))<percentageDiff)
644 if(TMath::Abs(meanZPC)>1.e-10 && TMath::Abs(meanZPA)>1.e-10){
645 if((TMath::Abs(meanZPC-meanZPA)/(meanZPA+meanZPC))<percentageDiff)
653 // --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
655 if(TMath::Abs(meanZNC)>1.e-10){
656 if((TMath::Abs(pmQZNC-pmCZNC)/pmCZNC)<percentageDiff)
663 if(TMath::Abs(meanZNA)>1.e-10){
664 if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
671 if(TMath::Abs(meanZPC)>1.e-10){
672 if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
679 if(TMath::Abs(meanZPA)>1.e-10){
680 if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
690 // -------------------------------------------------------------------
691 else if(index == AliQAv1::kESD){
693 // Check ESD HIGH GAIN CHAIN histos
694 if(hdata->GetEntries()>0){
695 if(esdInd==2) sumADCZNC = hdata->GetMean();
696 else if(esdInd==3) sumADCZNA = hdata->GetMean();
697 else if(esdInd==4) sumADCZPC = hdata->GetMean();
698 else if(esdInd==5) sumADCZPA = hdata->GetMean();
699 else if(esdInd==8) pmQZNC = hdata->GetMean();
700 else if(esdInd==9) pmQZNA = hdata->GetMean();
701 else if(esdInd==10) pmQZPC = hdata->GetMean();
702 else if(esdInd==11) pmQZPA = hdata->GetMean();
703 else if(esdInd==12) pmCZNC = hdata->GetMean();
704 else if(esdInd==13) pmCZNA = hdata->GetMean();
705 else if(esdInd==14) pmCZPC = hdata->GetMean();
706 else if(esdInd==15) pmCZPA = hdata->GetMean();
709 // --- Check whether 2*|Mean ZNA - Mean ZNC|/(Mean ZNA + Mean ZNC) < percentageDiff
710 // --- and 2*|Mean ZPA - Mean ZPC|/(Mean ZPA + Mean ZPC) < 2*percentageDiff
712 if(TMath::Abs(sumADCZNC)>1.e-10 && TMath::Abs(sumADCZNA)>1.e-10){
713 if((2*TMath::Abs(sumADCZNC-sumADCZNA)/(sumADCZNA+sumADCZNC))<percentageDiff)
720 if(TMath::Abs(sumADCZPC)>1.e-10 && TMath::Abs(sumADCZPA)>1.e-10){
721 if((TMath::Abs(sumADCZPC-sumADCZPA)/(sumADCZPA+sumADCZPC))<percentageDiff)
729 // --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
731 if(TMath::Abs(sumADCZNC)>1.e-10){
732 if((TMath::Abs(pmQZNC-pmCZNC)/pmCZNC)<percentageDiff)
739 if(TMath::Abs(sumADCZNA)>1.e-10){
740 if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
747 if(TMath::Abs(sumADCZPC)>1.e-10){
748 if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
755 if(TMath::Abs(sumADCZPA)>1.e-10){
756 if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
767 AliWarning(Form("\n\t No ZDC QA for %s task\n",taskName));
771 else AliError("\t No histos found for ZDC!!!\n");
773 } // HighMult (Pb-Pb)
774 // ====================================================================
775 // Checks for Calibration events
776 // ====================================================================
777 else if (AliRecoParam::ConvertIndex(specie) == AliRecoParam::kCalib) {
778 AliWarning(Form("\n\t No check implemented in ZDC QA for %s task\n",taskName));
781 // ====================================================================
782 // Checks for cosmic events
783 // ====================================================================
784 else if (AliRecoParam::ConvertIndex(specie) == AliRecoParam::kCosmic) {
785 AliWarning(Form("\n\t No check implemented in ZDC QA for %s task\n",taskName));
788 if(TMath::Abs(count)>1.e-10) test[specie] = test[specie]/count;
789 AliDebug(AliQAv1::GetQADebugLevel(), Form("\n\t ZDC QA check result = %1.2f\n",test[specie]));