Update of DQM-plots
authormrodrigu <mrodrigu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 27 Feb 2012 17:59:55 +0000 (17:59 +0000)
committermrodrigu <mrodrigu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 27 Feb 2012 17:59:55 +0000 (17:59 +0000)
ACORDE/AliACORDEQAChecker.cxx
ACORDE/AliACORDEQAChecker.h
ACORDE/AliACORDEQADataMakerRec.cxx

index 71479a4..f9513e0 100755 (executable)
@@ -54,15 +54,12 @@ ClassImp(AliACORDEQAChecker)
 
 AliACORDEQAChecker::AliACORDEQAChecker()  :
 AliQACheckerBase("ACORDE","ACORDE Quality Assurance Data Maker"),
-fTextDQMShifterInfo(new TPaveText(35,0.5,55,0.7,"T")),
-fMax(new TLine(0,0.9,60,0.9)),
-fMin(new TLine(0,0.3,60,0.3))
+fTextDQMShifterInfo(new TPaveText(2.2,45,2.9,50,"T")),
+fMax(new TLine(1,30,3,30))
 {
        // default constructor
        fMax->SetLineColor(kGreen);
        fMax->SetLineWidth(3);
-       fMin->SetLineColor(kGreen);
-       fMax->SetLineWidth(3);
 }
 //____________________________________________________________________________
 AliACORDEQAChecker::~AliACORDEQAChecker()
@@ -70,14 +67,12 @@ AliACORDEQAChecker::~AliACORDEQAChecker()
        // destructor
        delete fTextDQMShifterInfo;
        delete fMax;
-       delete fMin;
 }
 //____________________________________________________________________________
 AliACORDEQAChecker::AliACORDEQAChecker(const AliACORDEQAChecker& qac) :
 AliQACheckerBase(qac.GetName(), qac.GetTitle()),
-fTextDQMShifterInfo(new TPaveText(35,0.5,55,0.7,"T")),
-fMax(static_cast<TLine*>(qac.fMax->Clone())),
-fMin(static_cast<TLine*>(qac.fMin->Clone()))
+fTextDQMShifterInfo(new TPaveText(2.2,45,2.9,50,"T")),
+fMax(static_cast<TLine*>(qac.fMax->Clone()))
 {
        //
 }
@@ -118,10 +113,10 @@ void AliACORDEQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t /*index*/, TO
                                if(hdata->GetEntries()>0) rv=1; 
                                AliDebug(AliQAv1::GetQADebugLevel(), Form("%s -> %f", hdata->GetName(), rv)) ; 
                                TString hdataName = hdata->GetName();
-                               if (hdata->GetListOfFunctions()->GetEntries() == 0  && (hdataName.Contains("HitsSL0_DQM")||(hdataName.Contains("HitsAMU_DQM")))){
+                               //if (hdata->GetListOfFunctions()->GetEntries() == 0) continue;  
+                               if (hdataName.Contains("fhACORDEStatusAMU_DQM")){
                                        hdata->GetListOfFunctions()->Add(fTextDQMShifterInfo);
                                         hdata->GetListOfFunctions()->Add(fMax);
-                                        hdata->GetListOfFunctions()->Add(fMin);
 
                                }
                                // Here we use the QAref ACORDE data from fRefOCDBSubDir
@@ -132,19 +127,18 @@ void AliACORDEQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t /*index*/, TO
                                        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("HitsSL0_DQM")||hdataName.Contains("HitsAMU_DQM"))
+                               }else if (hdataName.Contains("ACORDEBitPattern")||hdataName.Contains("fhACORDEStatusAMU_DQM"))
                                // Here we use an inner QA Checher without the QAref data
                                {
                                        Float_t acoDataMax = hdata->GetMaximum();
                                        Int_t flagAcoQAChecker = 0;
-                                       Int_t flagAcoQA = 0;
                                        if (acoDataMax == 0) continue;
                                        for(Int_t i=0;i<60;i++)
                                        {
                                                if ((hdata->GetBinContent(i)/acoDataMax) < 0.75) flagAcoQAChecker++; 
-                                               if (hdataName.Contains("HitsSL0_DQM")||hdataName.Contains("HitsAMU_DQM")){
-                                                       if (hdata->GetBinContent(i)<0.29) flagAcoQA++;
-                                               }
+                                       //      if (hdataName.Contains("fhACORDEStatusSL0_DQM")||hdataName.Contains("fhACORDEStatusAMU_DQM")){
+                                       //              if (hdata->GetBinContent(i)<0.29) flagAcoQA++;
+                                       //      }
                                        }
                                        if (hdataName.Contains("ACORDEBitPattern")){
                                                Double_t simpleFlag = 1.-flagAcoQAChecker/60.;
@@ -152,11 +146,25 @@ void AliACORDEQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t /*index*/, TO
                                                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
-                                       } else if (hdataName.Contains("HitsSL0_DQM")||hdataName.Contains("HitsAMU_DQM")){
-                                               if (flagAcoQA < 100) test[specie] = 0.75;
-                                               else test[specie] = 0.3;
                                        }
-
+                                       /*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)
+                                                       test[specie] = 0.75;
+                                                       else test[specie] = 0.3;
+                                               } else continue;
+                                       }
 
                                }       
 
@@ -175,7 +183,6 @@ void AliACORDEQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t /*index*/, TO
                                }else{
                                        fTextDQMShifterInfo->SetFillColor(kRed);
                                        fTextDQMShifterInfo->AddText("ACORDE: Not, O.K.");
-                                       fTextDQMShifterInfo->AddText("CALL THE EXPERTS");
                                }
                        }
                                
index 47f7ccd..0cb34b0 100755 (executable)
@@ -45,7 +45,6 @@ private:
 
   TPaveText * fTextDQMShifterInfo; //! Pave text for alarm in DQM plots
   TLine * fMax; //! Maximum hits allowed per module (normalized data)
-  TLine * fMin; //! Minimum hits allowed per module (normalized data)
   
   ClassDef(AliACORDEQAChecker,1)  // description 
 
index ed9957d..684caba 100755 (executable)
@@ -111,16 +111,16 @@ void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObj
 \r
        if ((itc==-1) && ( (integralAMU=h2->Integral()==0) || (integralSL0=h0->Integral()==0) ) ) continue;\r
 \r
-       Float_t maxSL0 = 1.1*h0->GetMaximum();\r
+       Float_t maxSL0 = 1*h0->GetMaximum();\r
        Float_t scaleSL0 = 0.;\r
-       if (maxSL0!=0) scaleSL0 = 1./maxSL0;\r
+       if (maxSL0!=0) scaleSL0 = 1/maxSL0;\r
        else scaleSL0 = 1.;\r
        h0->Scale(scaleSL0);\r
 \r
 \r
-       Float_t maxAMU = 1.1*h2->GetMaximum();\r
+       Float_t maxAMU = 1*h2->GetMaximum();\r
        Float_t scaleAMU = 0.;\r
-       if (maxAMU!=0) scaleAMU = 1./maxAMU;\r
+       if (maxAMU!=0) scaleAMU = 1/maxAMU;\r
        else scaleAMU = 1.;\r
        h2->Scale(scaleAMU);\r
       \r
@@ -139,6 +139,32 @@ void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObj
        meanHitsSL0 = h0->Integral()/indexActiveModuleSL0;\r
        meanHitsAMU = h2->Integral()/indexActiveModuleAMU;\r
 \r
+       TH1* h6 = (TH1*)harr[6];\r
+       TH1* h7 = (TH1*)harr[7];\r
+\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
+\r
+       }\r
+       h6->SetMaximum(60);\r
+       h6->SetMinimum(0);\r
+       h6->Fill(1,goodModulesSL0);\r
+       h6->Fill(2,badModulesSL0);\r
+\r
+       h7->SetMaximum(60);\r
+       h7->SetMinimum(0);\r
+       h7->Fill(1,goodModulesAMU);\r
+       h7->Fill(2,badModulesAMU);\r
+\r
         TH1* h4 = (TH1*)harr[4];\r
         TH1* h5 = (TH1*)harr[5];\r
 \r
@@ -177,6 +203,29 @@ void AliACORDEQADataMakerRec::InitRaws()
         TH1F * fhACORDEMultiplicityAMUDQM = new TH1F("ACOMultiAMU_DQM_Shifter","Multiplicity of ACORDE fired modules for DQM shifter; No. of fired modules; No. of events",62,-1,60); // Multiplicity histo. for QA-shifter ACO-SL0 trigger mode\r
         TH1F * fhACORDEBitPatternCheckDQMSL0 = new TH1F("ACOHitsTriggerCheck_DQMExpertSL0","Check the activity of ACORDE's modules; Hits per module/mean of Hits; Counts",100,-3,5); // Check the trigger status of ACORDE (SL0 vs AMU)\r
         TH1F * fhACORDEBitPatternCheckDQMAMU = new TH1F("ACOHitsTriggerCheck_DQMExpertAMU","Check the activity of ACORDE's modules; Hits per module/mean of Hits; Counts",100,-3,5); // Check the trigger status of ACORDE (SL0 vs AMU)\r
+\r
+  //const char *acoStatus[4]={"O.K.","High","Low","Not O.K."};\r
+  const char *acoStatus[2]={"STABLE RATE","FLUCTUATING RATE"};\r
+\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
+\r
+       Add2RawsList(fhACORDEStatusSL0_DQM,6,expert,image,!saveCorr);\r
+       Add2RawsList(fhACORDEStatusAMU_DQM,7,!expert,image,!saveCorr);\r
+\r
+       fhACORDEStatusSL0_DQM->SetFillColor(kAzure-5);\r
+       fhACORDEStatusAMU_DQM->SetFillColor(kAzure-7);\r
+\r
+\r
          // Expert histograms\r
          // Check the hits multiplicity from trigger configuration\r
          Add2RawsList(fhACORDEBitPatternCheckDQMSL0,4,expert,image,!saveCorr);\r
@@ -189,9 +238,9 @@ void AliACORDEQADataMakerRec::InitRaws()
  \r
         // For SL0 ACO trigger mode\r
  \r
-         Add2RawsList(fhACORDEBitPatternDQM,0,!expert,image,!saveCorr);\r
+         Add2RawsList(fhACORDEBitPatternDQM,0,expert,image,!saveCorr);\r
         ForbidCloning(fhACORDEBitPatternDQM);\r
-         Add2RawsList(fhACORDEMultiplicitySL0DQM,1,!expert,image,!saveCorr);\r
+         Add2RawsList(fhACORDEMultiplicitySL0DQM,1,expert,image,!saveCorr);\r
         ForbidCloning(fhACORDEMultiplicitySL0DQM);\r
 \r
          // For Hits distribution on ACORDE\r
@@ -204,8 +253,8 @@ void AliACORDEQADataMakerRec::InitRaws()
  \r
          // For AMU ACO trigger mode\r
  \r
-         Add2RawsList(fhACORDEBitPatternAMUDQM,2,!expert,image,!saveCorr);\r
-         Add2RawsList(fhACORDEMultiplicityAMUDQM,3,!expert,image,!saveCorr);\r
+         Add2RawsList(fhACORDEBitPatternAMUDQM,2,expert,image,!saveCorr);\r
+         Add2RawsList(fhACORDEMultiplicityAMUDQM,3,expert,image,!saveCorr);\r
  \r
          // For Hits distribution on ACORDE\r
  \r