ClassImp(AliZDCQAChecker)
//____________________________________________________________________________
-Double_t * AliZDCQAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list,
- AliDetectorRecoParam * /*recoParam*/)
+void AliZDCQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t index, TObjArray ** list,
+ const AliDetectorRecoParam * /*recoParam*/)
{
// Checks the QA histograms on the input list:
//
- Double_t * test = new Double_t[AliRecoParam::kNSpecies] ;
- Int_t * ntests = new Int_t[AliRecoParam::kNSpecies] ;
const char* taskName = AliQAv1::GetAliTaskName(index);
printf("\n\tAliZDCQAChecker -> checking QA histos for task %s\n",taskName);
//
for(Int_t specie = 0; specie<AliRecoParam::kNSpecies; specie++){
- test[specie] = 1.0;
- ntests[specie] = 0;
- printf("\tAliZDCQAChecker -> specie %d\n\n",specie);
+ Int_t count = 0;
+ //printf("\tAliZDCQAChecker -> specie %d\n\n",specie);
if(!AliQAv1::Instance()->IsEventSpecieSet(specie)) continue;
// ====================================================================
if(specie == AliRecoParam::kLowMult){
if(list[specie]->GetEntries()==0){
AliWarning("\t The list to be checked is empty!"); // nothing to check
- return test;
+ return ;
}
//AliDebug(AliQAv1::GetQADebugLevel(), Form("\n\tAliZDCQAChecker-> checking QA histograms for task %s\n\n",taskName));
TIter next(list[specie]);
- ntests[specie] = 0;
+ count = 0;
TH1 * hdata;
Float_t res=0., percentageDiff=0.15;
while((hdata = dynamic_cast<TH1 *>(next()))){
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumZNA!=0){
if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
else percentageDiff=
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumZPC!=0){
if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumZPA!=0){
if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
ihitHisto++;
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZNA!=0){
if((TMath::Abs(adcQZNA-adcCZNA)/adcCZNA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPC!=0){
if((TMath::Abs(adcQZPC-adcCZPC)/adcCZPC)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPA!=0){
if((TMath::Abs(adcQZPA-adcCZPA)/adcCZPA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
idigHisto++;
else if(irawHisto==1) sumADCZNA = hdata->GetMean();
else if(irawHisto==2) sumADCZPC = hdata->GetMean();
else if(irawHisto==3) sumADCZPA = hdata->GetMean();
- else if(irawHisto==4) adcQZNC = hdata->GetMean();
- else if(irawHisto==5) adcQZNA = hdata->GetMean();
- else if(irawHisto==6) adcQZPC = hdata->GetMean();
- else if(irawHisto==7) adcQZPA = hdata->GetMean();
- else if(irawHisto==8) adcCZNC = hdata->GetMean();
- else if(irawHisto==9) adcCZNA = hdata->GetMean();
- else if(irawHisto==10) adcCZPC = hdata->GetMean();
- else if(irawHisto==11) adcCZPA = hdata->GetMean();
+ else if(irawHisto==6) adcQZNC = hdata->GetMean();
+ else if(irawHisto==7) adcQZNA = hdata->GetMean();
+ else if(irawHisto==8) adcQZPC = hdata->GetMean();
+ else if(irawHisto==9) adcQZPA = hdata->GetMean();
+ else if(irawHisto==10) adcCZNC = hdata->GetMean();
+ else if(irawHisto==11) adcCZNA = hdata->GetMean();
+ else if(irawHisto==12) adcCZPC = hdata->GetMean();
+ else if(irawHisto==13) adcCZPA = hdata->GetMean();
}
//
// --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZNA!=0){
if((TMath::Abs(adcQZNA-adcCZNA)/adcCZNA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPC!=0){
if((TMath::Abs(adcQZPC-adcCZPC)/adcCZPC)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPA!=0){
if((TMath::Abs(adcQZPA-adcCZPA)/adcCZPA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
irawHisto++;
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumZNA!=0){
if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumZPC!=0){
if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumZPA!=0){
if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
irecHisto++;
else if(esdInd==3) sumADCZNA = hdata->GetMean();
else if(esdInd==4) sumADCZPC = hdata->GetMean();
else if(esdInd==5) sumADCZPA = hdata->GetMean();
- else if(esdInd==6) pmQZNC = hdata->GetMean();
- else if(esdInd==7) pmQZNA = hdata->GetMean();
- else if(esdInd==8) pmQZPC = hdata->GetMean();
- else if(esdInd==9) pmQZPA = hdata->GetMean();
- else if(esdInd==10) pmCZNC = hdata->GetMean();
- else if(esdInd==11) pmCZNA = hdata->GetMean();
- else if(esdInd==12) pmCZPC = hdata->GetMean();
- else if(esdInd==13) pmCZPA = hdata->GetMean();
+ else if(esdInd==8) pmQZNC = hdata->GetMean();
+ else if(esdInd==9) pmQZNA = hdata->GetMean();
+ else if(esdInd==10) pmQZPC = hdata->GetMean();
+ else if(esdInd==11) pmQZPA = hdata->GetMean();
+ else if(esdInd==12) pmCZNC = hdata->GetMean();
+ else if(esdInd==13) pmCZNA = hdata->GetMean();
+ else if(esdInd==14) pmCZPC = hdata->GetMean();
+ else if(esdInd==15) pmCZPA = hdata->GetMean();
}
//
// --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZNA!=0){
if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPC!=0){
if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPA!=0){
if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
esdInd++;
}
else {
AliWarning(Form("\n\t No ZDC QA for %s task\n",taskName));
- return NULL;
+ return ;
}
}//if(hdata)
else AliError("AliZDCQAChecker-> No histos!!!\n");
else if (specie == AliRecoParam::kHighMult) {
if(list[specie]->GetEntries()==0){
AliWarning("\t The list to be checked is empty!");
- return test;
+ return ;
}
//AliDebug(AliQAv1::GetQADebugLevel(), Form("\n\tAliZDCQAChecker-> checking QA histograms for task %s\n\n",taskName));
//
TIter next(list[specie]);
- ntests[specie] = 0;
+ count = 0;
TH1 * hdata;
Float_t res=0., percentageDiff=0.10;
while((hdata = dynamic_cast<TH1 *>(next()))){
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(meanZPC!=0 && meanZPA!=0){
if((TMath::Abs(meanZPC-meanZPA)/(meanZPA+meanZPC))<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
// --- Check whether (mean PMQi - PMC)/PMC < percentageDiff
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(meanZNA!=0){
if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(meanZPC!=0){
if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(meanZPA!=0){
if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
hitInd++;
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPC!=0 && sumADCZPA!=0){
if((TMath::Abs(sumADCZPC-sumADCZPA)/(sumADCZPA+sumADCZPC))<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
// --- Check whether (sumADC PMQi - PMC)/PMC < percentageDiff
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZNA!=0){
if((TMath::Abs(adcQZNA-adcCZNA)/adcCZNA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPC!=0){
if((TMath::Abs(adcQZPC-adcCZPC)/adcCZPC)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPA!=0){
if((TMath::Abs(adcQZPA-adcCZPA)/adcCZPA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
digInd++;
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPC!=0 && sumADCZPA!=0){
if((TMath::Abs(sumADCZPC-sumADCZPA)/(sumADCZPA+sumADCZPC))<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
// --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZNA!=0){
if((TMath::Abs(adcQZNA-adcCZNA)/adcCZNA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPC!=0){
if((TMath::Abs(adcQZPC-adcCZPC)/adcCZPC)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPA!=0){
if((TMath::Abs(adcQZPA-adcCZPA)/adcCZPA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
rawInd++;
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumZPC!=0 && sumZPA!=0){
if((TMath::Abs(sumZPC-sumZPA)/(sumZPA+sumZPC))<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
// --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumZNA!=0){
if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumZPC!=0){
if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumZPA!=0){
if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
recInd++;
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPC!=0 && sumADCZPA!=0){
if((TMath::Abs(sumADCZPC-sumADCZPA)/(sumADCZPA+sumADCZPC))<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
// --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZNA!=0){
if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPC!=0){
if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
if(sumADCZPA!=0){
if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff)
else
res=.5;
test[specie] += res;
- ntests[specie]++;
+ count++;
}
}
esdInd++;
}
else {
AliWarning(Form("\n\t No ZDC QA for %s task\n",taskName));
- return NULL;
+ return ;
}
}//if(hdata)
else AliError("\t No histos found for ZDC!!!\n");
// ====================================================================
else if (specie == AliRecoParam::kCalib) {
AliWarning(Form("\n\t No check implemented in ZDC QA for %s task\n",taskName));
- return test;
+ return ;
} // Calibration
// ====================================================================
// Checks for cosmic events
// ====================================================================
else if (specie == AliRecoParam::kCosmic) {
AliWarning(Form("\n\t No check implemented in ZDC QA for %s task\n",taskName));
- return test;
+ return ;
} // Cosmic
- } // Loop on species
-
- for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- if(ntests[specie]!=0) test[specie] = test[specie]/ntests[specie];
+ if(count!=0) test[specie] = test[specie]/count;
AliDebug(AliQAv1::GetQADebugLevel(), Form("\n\t ZDC QA check result = %1.2f\n",test[specie]));
- }
- delete [] ntests ;
- return test;
+ } // Loop on species
}
-