]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
DQM histograms updated
authormrodrigu <mrodrigu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Mar 2012 10:25:42 +0000 (10:25 +0000)
committermrodrigu <mrodrigu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Mar 2012 10:25:42 +0000 (10:25 +0000)
ACORDE/AliACORDEQAChecker.cxx
ACORDE/AliACORDEQADataMakerRec.cxx

index ffff3baf5f963b4e2f129eb1dec273162d7c0bbb..3333119d1981ee82eff3ac9bbc6b02d8fd5ad719 100755 (executable)
@@ -54,8 +54,8 @@ ClassImp(AliACORDEQAChecker)
 
 AliACORDEQAChecker::AliACORDEQAChecker()  :
 AliQACheckerBase("ACORDE","ACORDE Quality Assurance Data Maker"),
-fTextDQMShifterInfo(new TPaveText(2.2,45,2.9,50,"T")),
-fMax(new TLine(1,30,3,30))
+fTextDQMShifterInfo(new TPaveText(2.2,0.90,2.9,0.99,"T")),
+fMax(new TLine(1,0.5,3,0.5))
 {
        // default constructor
        fMax->SetLineColor(kGreen);
@@ -71,7 +71,7 @@ AliACORDEQAChecker::~AliACORDEQAChecker()
 //____________________________________________________________________________
 AliACORDEQAChecker::AliACORDEQAChecker(const AliACORDEQAChecker& qac) :
 AliQACheckerBase(qac.GetName(), qac.GetTitle()),
-fTextDQMShifterInfo(new TPaveText(2.2,45,2.9,50,"T")),
+fTextDQMShifterInfo(new TPaveText(2.2,0.90,2.9,0.99,"T")),
 fMax(static_cast<TLine*>(qac.fMax->Clone()))
 {
        //
@@ -99,6 +99,7 @@ void AliACORDEQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t /*index*/, TO
   
   for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) 
   {
+       test[specie] = 1.0;
        if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) continue ; 
        if (list[specie]->GetEntries() == 0) test[specie] = 1.; // Nothing to check
        else 
@@ -107,91 +108,77 @@ void AliACORDEQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t /*index*/, TO
                TH1 * hdata ; // Data created by the AliACORDEQADataMakerXXX (Sim/Rec)
                while ( (hdata = dynamic_cast<TH1 *>(next())) ) 
                {
-                       if (hdata) 
+                       //if (hdata) 
+                       if (hdata->GetEntries()!=0)
                        { 
                                Double_t rv = 0.0 ; 
                                if(hdata->GetEntries()>0) rv=1; 
                                AliDebug(AliQAv1::GetQADebugLevel(), Form("%s -> %f", hdata->GetName(), rv)) ; 
                                TString hdataName = hdata->GetName();
                                //if (hdata->GetListOfFunctions()->GetEntries() == 0) continue;  
-                               if (hdataName.Contains("fhACORDEStatusAMU_DQM")){
+                                               
+                               if (hdataName.Contains("fhACORDEStatusAMU_DQM"))
+                               {
                                        if (!hdata->GetListOfFunctions()->Contains(fTextDQMShifterInfo))
-                                               hdata->GetListOfFunctions()->Add(fTextDQMShifterInfo);
+                                               hdata->GetListOfFunctions()->Add(fTextDQMShifterInfo);
                                        if (!hdata->GetListOfFunctions()->Contains(fMax))
-                                               hdata->GetListOfFunctions()->Add(fMax);
-
+                                               hdata->GetListOfFunctions()->Add(fMax);
                                }
-                               // Here we use the QAref ACORDE data from fRefOCDBSubDir
-                               
+                               // check with OCDB ref. data
                                if ( (fRefOCDBSubDir[specie]) && (hdataName.Contains("ACORDEBitPattern")) ) 
                                {
                                        TH1 * href = NULL;
                                        if (fRefSubDir) href = static_cast<TH1*>(fRefSubDir->Get(hdata->GetName()));
                                        else if (fRefOCDBSubDir[specie]) href = static_cast<TH1*>(fRefOCDBSubDir[specie]->FindObject(hdata->GetName()));
                                        test[specie] = CheckAcordeRefHits(href,hdata);
-                               }else if (hdataName.Contains("ACORDEBitPattern")||hdataName.Contains("fhACORDEStatusAMU_DQM"))
-                               // Here we use an inner QA Checher without the QAref data
+                               }else
                                {
-                                       Float_t acoDataMax = hdata->GetMaximum();
-                                       Int_t flagAcoQAChecker = 0;
-                                       if (acoDataMax == 0) continue;
-                                       for(Int_t i=0;i<60;i++)
+                                       if (hdataName.Contains("ACORDEBitPattern"))
+                                               // Here we use an inner QA Checher without the QAref data
                                        {
-                                               if ((hdata->GetBinContent(i)/acoDataMax) < 0.75) flagAcoQAChecker++; 
-                                       //      if (hdataName.Contains("fhACORDEStatusSL0_DQM")||hdataName.Contains("fhACORDEStatusAMU_DQM")){
-                                       //              if (hdata->GetBinContent(i)<0.29) flagAcoQA++;
-                                       //      }
-                                       }
-                                       if (hdataName.Contains("ACORDEBitPattern")){
+                                               Float_t acoDataMax = hdata->GetMaximum();
+                                               Int_t flagAcoQAChecker = 0;
+                                               if (acoDataMax == 0) continue;
+                                               for(Int_t i=0;i<60;i++)
+                                               {
+                                                       if ((hdata->GetBinContent(i)/acoDataMax) < 0.75) flagAcoQAChecker++; 
+                                               }
                                                Double_t simpleFlag = 1.-flagAcoQAChecker/60.;
                                                if ( (simpleFlag >= 0.90) && (simpleFlag <= 1.0) ) test[specie] = 0.75; // INFO
                                                if ( (simpleFlag >= 0.70) && (simpleFlag < 0.90) ) test[specie] = 0.50; // WARNING
                                                if ( (simpleFlag >= 0.25) && (simpleFlag < 0.70) ) test[specie] = 0.25; // ERROR
                                                if ( (simpleFlag >= 0.0) && (simpleFlag < 0.25) )  test[specie] = -1.0; // FATAL
+                                               if (test[specie]>0) rv = test[specie];
+                                               else rv = 1.0;
                                        }
-                                       /*if (hdataName.Contains("fhACORDEStatusSL0_DQM"))
-                                       {
-                                               if (hdata->GetBinContent(1) != 0) 
-                                               {
-                                                       if (hdata->GetBinContent(2) < 31)
-                                                       test[specie] = 0.75;
-                                                       else test[specie] = 0.3;
-                                               } else continue;
-                                       }*/
                                        if (hdataName.Contains("fhACORDEStatusAMU_DQM"))
                                        {
-                                               if (hdata->GetBinContent(1) != 0) 
-                                               {
-                                                       if (hdata->GetBinContent(2) < 31)
+                                               Float_t goodModules = hdata->GetBinContent(1);
+                                               Float_t badModules = hdata->GetBinContent(2);
+                                               if (goodModules >= badModules)
                                                        test[specie] = 0.75;
-                                                       else test[specie] = 0.3;
-                                               } else continue;
-                                       }
-
-                               }       
-
-                               // Setting Warning message for possible Empty Events with the ACORDE-Trigger
-                                       
-                               if (hdataName.Contains("ACORDEMultiplicity") && (hdata->GetBinContent(0)!=0)) AliWarning("Empty event registered with ACORDE Trigger !!!");
-                                       
-                               
-                       }else AliError("Data type cannot be processed") ;
-                       if (fTextDQMShifterInfo)
-                       {
-                               fTextDQMShifterInfo->Clear();
-                               if (test[specie] > 0.3){
-                                       fTextDQMShifterInfo->SetFillColor(kGreen);
-                                       fTextDQMShifterInfo->AddText("ACORDE: O.K.");
-                               }else{
-                                       fTextDQMShifterInfo->SetFillColor(kRed);
-                                       fTextDQMShifterInfo->AddText("ACORDE: Not, O.K.");
-                               }
-                       }
-                               
-               }
-       }
+                                               else test[specie] = 0.30;
+                                               
+                                       }        // check for DQM condition
+                                       rv = test[specie];
+                                       if (fTextDQMShifterInfo) // DQM-flag asignment
+                                       {
+                                               fTextDQMShifterInfo->Clear();
+                                               if (rv > 0.4){
+                                                       fTextDQMShifterInfo->SetFillColor(kGreen);
+                                                       fTextDQMShifterInfo->AddText("ACORDE: O.K.");
+                                               }else{
+                                                       fTextDQMShifterInfo->SetFillColor(kRed);
+                                                       fTextDQMShifterInfo->AddText("ACORDE: Not, O.K.");
+                                               }
+                                       } // end DQM flag asignment
+                               }// NO OCDB checking
+                       } // hdata with entries
+                       else AliError("Data type cannot be processed") ;
+               } // loop over histograms from QADataMaker
+       }  // end checker
     if ( (specie == AliRecoParam::kHighMult) || (specie == AliRecoParam::kLowMult) || (specie == AliRecoParam::kCalib) ) test[specie] = 0.75;
-  }
+  } // end of species
 }
 //____________________________________________________________________________
 Double_t AliACORDEQAChecker::CheckAcordeRefHits(const TH1 * href, const TH1 * hdata) const
index 684caba8cac09de0fb9e4c2c44e8d05945670eb3..4e4b12fe9045af1e88cd366b5100261a426c7643 100755 (executable)
@@ -134,36 +134,39 @@ void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObj
        \r
        Float_t meanHitsSL0 = 0.;\r
        Float_t meanHitsAMU = 0.;\r
-       if ((indexActiveModuleSL0==0) || (indexActiveModuleAMU == 0)) continue;\r
+       //if ((indexActiveModuleSL0==0) || (indexActiveModuleAMU == 0)) continue;\r
+       if ((indexActiveModuleAMU == 0)) continue;\r
 \r
        meanHitsSL0 = h0->Integral()/indexActiveModuleSL0;\r
        meanHitsAMU = h2->Integral()/indexActiveModuleAMU;\r
 \r
        TH1* h6 = (TH1*)harr[6];\r
-       TH1* h7 = (TH1*)harr[7];\r
+       //TH1* h7 = (TH1*)harr[7];\r
 \r
-       Int_t goodModulesSL0 = 0;\r
-       Int_t badModulesSL0 = 0;\r
+       //Int_t goodModulesSL0 = 0;\r
+       //Int_t badModulesSL0 = 0;\r
        Int_t goodModulesAMU = 0;\r
        Int_t badModulesAMU = 0;\r
 \r
        for (Int_t imod = 0; imod < 60; imod++)\r
        {\r
-               if (TMath::Abs(h0->GetBinContent(imod)/meanHitsSL0-1) < 0.65) goodModulesSL0++;\r
-               else badModulesSL0++;\r
-               if (TMath::Abs(h2->GetBinContent(imod)/meanHitsAMU-1) < 0.65) goodModulesAMU++;\r
-               else badModulesAMU++;\r
+               //if (TMath::Abs(h0->GetBinContent(imod)/meanHitsSL0-1) < 0.65) goodModulesSL0++;\r
+               //else badModulesSL0++;\r
+               if (meanHitsAMU!=0)\r
+               {\r
+                       if (TMath::Abs(h2->GetBinContent(imod)/meanHitsAMU-1) <= 0.90) goodModulesAMU++;\r
+                       else badModulesAMU++;\r
+               }\r
 \r
        }\r
-       h6->SetMaximum(60);\r
-       h6->SetMinimum(0);\r
-       h6->Fill(1,goodModulesSL0);\r
-       h6->Fill(2,badModulesSL0);\r
+       h6->Fill(1,goodModulesAMU);\r
+       h6->Fill(2,badModulesAMU);\r
 \r
-       h7->SetMaximum(60);\r
-       h7->SetMinimum(0);\r
-       h7->Fill(1,goodModulesAMU);\r
-       h7->Fill(2,badModulesAMU);\r
+       Float_t maxMod = 1*h6->GetMaximum();\r
+       Float_t scaleMaxMod = 0;\r
+       if (maxMod!=0) scaleMaxMod = 1./maxMod;\r
+       else scaleMaxMod = 0;\r
+       h6->Scale(scaleMaxMod);\r
 \r
         TH1* h4 = (TH1*)harr[4];\r
         TH1* h5 = (TH1*)harr[5];\r
@@ -209,20 +212,15 @@ void AliACORDEQADataMakerRec::InitRaws()
 \r
 \r
 \r
-       TH1F * fhACORDEStatusSL0_DQM = new TH1F("fhACORDEStatusSL0_DQM","Status of rate for ACORDE's modules (SL0 mode)",2,1,3);\r
        TH1F * fhACORDEStatusAMU_DQM = new TH1F("fhACORDEStatusAMU_DQM","Status of rate for ACORDE's modules (AMU mode)",2,1,3);\r
        for (Int_t i=0;i<2;i++) \r
        {\r
-               fhACORDEStatusSL0_DQM->GetXaxis()->SetBinLabel(i+1,acoStatus[i]); \r
                fhACORDEStatusAMU_DQM->GetXaxis()->SetBinLabel(i+1,acoStatus[i]); \r
        }\r
-       fhACORDEStatusSL0_DQM->SetYTitle("No. of modules");\r
-       fhACORDEStatusAMU_DQM->SetYTitle("No. of modules");\r
+       fhACORDEStatusAMU_DQM->SetYTitle("No. of modules (Norm.)");\r
 \r
-       Add2RawsList(fhACORDEStatusSL0_DQM,6,expert,image,!saveCorr);\r
-       Add2RawsList(fhACORDEStatusAMU_DQM,7,!expert,image,!saveCorr);\r
+       Add2RawsList(fhACORDEStatusAMU_DQM,6,!expert,image,!saveCorr);\r
 \r
-       fhACORDEStatusSL0_DQM->SetFillColor(kAzure-5);\r
        fhACORDEStatusAMU_DQM->SetFillColor(kAzure-7);\r
 \r
 \r