]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ZDC/AliZDCQAChecker.cxx
Added new class needed for refactoring of the
[u/mrichter/AliRoot.git] / ZDC / AliZDCQAChecker.cxx
index e7e64e0363fa7535cbcb0f1ab025853d67a92c36..430ab49c95cb32acc21c3a03f8f0839b81d57ec4 100644 (file)
@@ -227,32 +227,29 @@ void AliZDCQAChecker::Check(Double_t *  test, AliQAv1::ALITASK_t index, TObjArra
              SetupHisto(messages, *hdata, rv);
            }
            else if(irawHisto==23){
-             Double_t refTDCs = -319.5;
+             // Reference values from RUN 145456
+             Double_t refTDCs[6] = {-322.5,-319.1,-320.9,-319.2,-319.7,-319.2};
              Float_t resTDC=0.;
-             for(int ibin=5; ibin<=6; ibin++){
-                if(TMath::Abs((hdata->GetBinContent(ibin))-refTDCs)<2.){
+             for(int ibin=1; ibin<=hdata->GetNbinsX(); ibin++){
+                if(TMath::Abs((hdata->GetBinContent(ibin))-refTDCs[ibin-1])<3.){
                   res=1.;
                 }
-                else if((TMath::Abs((hdata->GetBinContent(ibin))-refTDCs)>=2.) &&
-                        (TMath::Abs((hdata->GetBinContent(ibin))-refTDCs)<=3.)){
-                  res=0.9;
-                }
-                else{
-                  res=0.5;
+                else if(TMath::Abs((hdata->GetBinContent(ibin))-refTDCs[ibin-1])<5.){
+                  res=0.8;
                 }
+                else res=0.5;
                 //
                 resTDC += res;
                 test[specie] += res;
                 count++;
              }
              Float_t rv=1.;
-             if(hdata->GetNbinsX() != 0) rv = resTDC/2;
+             if(hdata->GetNbinsX() != 0) rv = resTDC/hdata->GetNbinsX();
              if(rv == 1.) messages.Add(new TObjString("TDCs are OK!")); 
-             else if(rv<1 && rv>=0.9) messages.Add(new TObjString("Minor problem with TDCs"));
+             else if(rv<1. && rv>0.75) messages.Add(new TObjString("Minor problem with TDCs"));
              else{
                messages.Add(new TObjString("Serious problem in ZDC timing"));
                 messages.Add(new TObjString("IF THIS IS NOT A TECHNICAL RUN"));
-                messages.Add(new TObjString("OR A STANDALONE_PEDESTAL RUN"));
              }
              SetupHisto(messages, *hdata, rv);
            }
@@ -591,7 +588,7 @@ void AliZDCQAChecker::Check(Double_t *  test, AliQAv1::ALITASK_t index, TObjArra
              SetupHisto(messages, *hdata, rv);
            }
            else if(irawHisto==23){
-             Double_t refTDCs[6] = {-83.0,-78.1,-80.2,-79.3,-81.0,-80.9};
+             Double_t refTDCs[6] = {-322.5,-319.1,-320.9,-319.2,-319.7,-319.2};
              Float_t resTDC=0.;
              for(int ibin=1; ibin<=hdata->GetNbinsX(); ibin++){
                 if(TMath::Abs((hdata->GetBinContent(ibin))-refTDCs[ibin-1])<4.){
@@ -675,7 +672,7 @@ void AliZDCQAChecker::Check(Double_t *  test, AliQAv1::ALITASK_t index, TObjArra
             }
            // --- Check whether (sum PMQi - PMC)/PMC < percentageDiff
            if(irecHisto==11){
-             if(TMath::Abs(meanZNC)>1.e-10){
+             if((TMath::Abs(meanZNC)>1.e-10) && (pmCZNC>1.e-10)){
                if((TMath::Abs(pmQZNC-pmCZNC)/pmCZNC)<percentageDiff) 
                  res=1.;
                else 
@@ -683,7 +680,7 @@ void AliZDCQAChecker::Check(Double_t *  test, AliQAv1::ALITASK_t index, TObjArra
                test[specie] += res;
                count++;
              }
-             if(TMath::Abs(meanZNA)>1.e-10){
+             if((TMath::Abs(meanZNA)>1.e-10) && (pmCZNA>1.e-10)){
                if((TMath::Abs(pmQZNA-pmCZNA)/pmCZNA)<percentageDiff) 
                  res=1.;
                else 
@@ -691,7 +688,7 @@ void AliZDCQAChecker::Check(Double_t *  test, AliQAv1::ALITASK_t index, TObjArra
                test[specie] += res;
                count++;
              }
-             if(TMath::Abs(meanZPC)>1.e-10){
+             if((TMath::Abs(meanZPC)>1.e-10) && (pmCZPC>1.e-10)){
                if((TMath::Abs(pmQZPC-pmCZPC)/pmCZPC)<percentageDiff) 
                  res=1.;
                else 
@@ -699,7 +696,7 @@ void AliZDCQAChecker::Check(Double_t *  test, AliQAv1::ALITASK_t index, TObjArra
                test[specie] += res;
                count++;
              }
-             if(TMath::Abs(meanZPA)>1.e-10){
+             if((TMath::Abs(meanZPA)>1.e-10) && (pmCZPA>1.e-10)){
                if((TMath::Abs(pmQZPA-pmCZPA)/pmCZPA)<percentageDiff) 
                  res=1.;
                else