Update of DQM histograms for shifter and expert
authormrodrigu <mrodrigu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 30 May 2011 04:14:09 +0000 (04:14 +0000)
committermrodrigu <mrodrigu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 30 May 2011 04:14:09 +0000 (04:14 +0000)
ACORDE/AliACORDEQADataMakerRec.cxx
ACORDE/AliACORDEQADataMakerRec.h

index 0a38b5f..ce89d11 100755 (executable)
@@ -25,6 +25,7 @@
 //\r
 //  Created: June 13th 2008\r
 //---\r
+// Last update: May 5th. 2011 (by Mario RC: mrodrigu@mail.cern.ch) -->Creates QA expert histograms and QA-shifter histograms also with threshold lines and visual alarm\r
 // Last Update: Aug. 27th 2008 --> Implementation to declare QA expert histogram\r
 //  Last update: Nov. 14t 2009 --> MRC <mrodrigu@mail.cern.ch> (FCFM-BUAP) \r
 //                     |--> Change in Multiplicity histogram for AMORE (to detect empty triggers events of ACORDE)\r
@@ -36,6 +37,8 @@
 #include <TFile.h> \r
 #include <TH1F.h> \r
 #include <TDirectory.h>\r
+#include <TLine.h>\r
+#include <TPaveText.h>\r
 // --- Standard library ---\r
 \r
 // --- AliRoot header files ---\r
 ClassImp(AliACORDEQADataMakerRec)\r
            \r
 //____________________________________________________________________________ \r
-AliACORDEQADataMakerRec::AliACORDEQADataMakerRec():AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kACORDE), "ACORDE Quality Assurance Data Maker")\r
+AliACORDEQADataMakerRec::AliACORDEQADataMakerRec():AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kACORDE), "ACORDE Quality Assurance Data Maker"),\r
+fhACOMean(new TLine(0.,4.,60.,4.)),\r
+fhACOMin(new TLine(0.,4.,60.,4.)),\r
+fhACOMax(new TLine(0.,4.,60.,4.)),\r
+fhACOMulti(new TLine(0.,4.,60.,4.)),\r
+fhACOMeanAMU(new TLine(0.,4.,60.,4.)),\r
+fhACOMinAMU(new TLine(0.,4.,60.,4.)),\r
+fhACOMaxAMU(new TLine(0.,4.,60.,4.)),\r
+fhACOMultiAMU(new TLine(0.,4.,60.,4.)),\r
+fhACOTriggerCheck(new TLine(0.,4.,60.,4.))\r
 {\r
 \r
 }\r
 //____________________________________________________________________________ \r
-AliACORDEQADataMakerRec::AliACORDEQADataMakerRec(const AliACORDEQADataMakerRec& qadm):AliQADataMakerRec() \r
+AliACORDEQADataMakerRec::AliACORDEQADataMakerRec(const AliACORDEQADataMakerRec& qadm):AliQADataMakerRec(),\r
+fhACOMean(qadm.fhACOMean),\r
+fhACOMin(qadm.fhACOMin),\r
+fhACOMax(qadm.fhACOMax),\r
+fhACOMulti(qadm.fhACOMulti),\r
+fhACOMeanAMU(qadm.fhACOMeanAMU),\r
+fhACOMinAMU(qadm.fhACOMinAMU),\r
+fhACOMaxAMU(qadm.fhACOMaxAMU),\r
+fhACOMultiAMU(qadm.fhACOMultiAMU),\r
+fhACOTriggerCheck(qadm.fhACOTriggerCheck)\r
 {\r
   SetName((const char*)qadm.GetName()) ; \r
   SetTitle((const char*)qadm.GetTitle()); \r
 }\r
 //__________________________________________________________________\r
+AliACORDEQADataMakerRec::~AliACORDEQADataMakerRec()\r
+{\r
+       delete fhACOMean;\r
+       delete fhACOMin;\r
+       delete fhACOMax;\r
+       delete fhACOMulti;\r
+       delete fhACOTriggerCheck;\r
+}\r
+\r
+//__________________________________________________________________\r
 AliACORDEQADataMakerRec& AliACORDEQADataMakerRec::operator = (const AliACORDEQADataMakerRec& qadm )\r
 {\r
   // Equal operator.\r
@@ -73,6 +104,338 @@ void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObj
 {\r
   //Detector specific actions at end of cycle\r
   // do the QA checking\r
+       // Update for DQM GUI\r
+       for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) \r
+       {\r
+               if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) \r
+                       continue ; \r
+               if (!GetRawsData(0)||!GetRawsData(1)) continue;\r
+               Double_t integral = GetRawsData(0)->Integral();\r
+               if (integral==0) \r
+               {\r
+                       printf("No entries in ACORDE Hits histograms --> fatal error, please check !!!\n");\r
+                       TPaveText *acoBoxFatal=new TPaveText(35,0.5,55,1,"b");  \r
+                       acoBoxFatal->SetFillColor(kRed);\r
+                       acoBoxFatal->SetLineColor(kRed);\r
+                       acoBoxFatal->SetLineWidth(2);\r
+                       //acoBox2->SetTextSize(3);\r
+                       //acoBox2->SetTextColor(kBlack);\r
+                       acoBoxFatal->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");\r
+                       acoBoxFatal->AddText("Blue line: mean of hits");\r
+                       acoBoxFatal->AddText("Between GREEN lines: ACO. O.K.");\r
+                       GetRawsData(0)->GetListOfFunctions()->Add(acoBoxFatal);\r
+\r
+                       TPaveText *acoMultiBoxFatal = new TPaveText(20,0.5,40,1,"b");\r
+                       acoMultiBoxFatal->SetFillColor(kRed);\r
+                       acoMultiBoxFatal->SetLineColor(kRed);\r
+                       acoMultiBoxFatal->SetLineWidth(2);\r
+                       acoMultiBoxFatal->AddText("ACO. Not O.K., Call the experts");\r
+                       GetRawsData(1)->GetListOfFunctions()->Add(acoMultiBoxFatal);\r
+                       \r
+                       continue;\r
+               }\r
+               Double_t mean = integral/60;\r
+               fhACOMean->SetY1(mean);\r
+               fhACOMean->SetY2(mean);\r
+               fhACOMin->SetY1(0.05*mean);\r
+               fhACOMin->SetY2(0.05*mean);\r
+               fhACOMax->SetY1(2.25*mean);\r
+               fhACOMax->SetY2(2.25*mean);\r
+               \r
+               // alarms\r
+               Double_t max = GetRawsData(0)->GetMaximum();\r
+               if (max == 0)\r
+               {\r
+                       printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");\r
+                       continue;\r
+               }\r
+               // Multiplicity histogram threshold\r
+               Double_t maxMulti = GetRawsData(1)->GetMaximum();\r
+               if (maxMulti == 0)\r
+               {\r
+                       printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");\r
+                       continue;\r
+               }\r
+               fhACOMulti->SetX1(1);\r
+               fhACOMulti->SetY1(1);\r
+               fhACOMulti->SetX2(1);\r
+               fhACOMulti->SetY2(maxMulti);\r
+               TPaveText *acoBox=new TPaveText(35,max-0.20*max,55,max,"b");    \r
+               //acoBox->SetFillStyle(0);\r
+               TPaveText *acoBox1=new TPaveText(35,max-0.20*max,55,max,"b");   \r
+               //acoBox1->SetFillStyle(0);\r
+               TPaveText *acoBox2=new TPaveText(35,max-0.20*max,55,max,"b");   \r
+               //acoBox2->SetFillStyle(0);\r
+               Int_t flagACO_DQM = 0;\r
+               Bool_t isACOOk = kTRUE;\r
+               Bool_t isACOWarning = kFALSE;\r
+               for(Int_t iModule=0;iModule<60;iModule++)\r
+               {\r
+                       if ((GetRawsData(0)->GetBinContent(iModule))/max < 0.5) flagACO_DQM++;\r
+               }\r
+               if (flagACO_DQM < 15)\r
+               {\r
+                       acoBox->SetFillColor(kGreen);\r
+                       acoBox->SetLineColor(kGreen);\r
+                       acoBox->SetLineWidth(2);\r
+                       //acoBox->SetTextSize(3);\r
+                       //acoBox->SetTextColor(kBlack);\r
+                       acoBox->AddText("FLAG MESSAGE: O.K. !!!");\r
+                       acoBox->AddText("Blue line: mean of hits");\r
+                       acoBox->AddText("Between GREEN lines: ACO. O.K.");\r
+                       GetRawsData(0)->GetListOfFunctions()->Add(acoBox);\r
+\r
+                       \r
+               }else if (flagACO_DQM > 15 && flagACO_DQM<30)\r
+               {\r
+                       acoBox1->SetFillColor(kYellow);\r
+                       acoBox1->SetLineColor(kYellow);\r
+                       acoBox1->SetLineWidth(2);\r
+                       //acoBox1->SetTextSize(3);\r
+                       //acoBox1->SetTextColor(kBlack);\r
+                       acoBox1->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");\r
+                       acoBox1->AddText("Blue line: mean of hits");\r
+                       acoBox1->AddText("Between GREEN lines: ACO. O.K.");\r
+                       GetRawsData(0)->GetListOfFunctions()->Add(acoBox1);\r
+                       isACOWarning=kTRUE;\r
+\r
+               }else if (flagACO_DQM > 30)\r
+               {\r
+                       acoBox2->SetFillColor(kRed);\r
+                       acoBox2->SetLineColor(kRed);\r
+                       acoBox2->SetLineWidth(2);\r
+                       //acoBox2->SetTextSize(3);\r
+                       //acoBox2->SetTextColor(kBlack);\r
+                       acoBox2->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");\r
+                       acoBox2->AddText("Blue line: mean of hits");\r
+                       acoBox2->AddText("Between GREEN lines: ACO. O.K.");\r
+                       GetRawsData(0)->GetListOfFunctions()->Add(acoBox2);\r
+                       isACOOk=kFALSE;\r
+\r
+               }\r
+               \r
+               \r
+               TPaveText *acoMultiBox = new TPaveText(20,maxMulti-0.20*maxMulti,40,maxMulti,"b");\r
+               if (GetRawsData(1)->Integral()==0 || isACOOk==kFALSE)\r
+               {\r
+                       acoMultiBox->SetFillColor(kRed);\r
+                       acoMultiBox->SetLineColor(kRed);\r
+                       acoMultiBox->SetLineWidth(2);\r
+                       acoMultiBox->AddText("ACO. Not O.K., Call the experts");\r
+                       GetRawsData(1)->GetListOfFunctions()->Add(acoMultiBox);\r
+               }\r
+/*             if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){\r
+                       acoMultiBox->SetFillColor(kYellow);\r
+                       acoMultiBox->SetLineColor(kYellow);\r
+                       acoMultiBox->SetLineWidth(2);\r
+                       acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");\r
+                       GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);\r
+               }\r
+*/\r
+               if (isACOOk==kTRUE)\r
+               {\r
+                       acoMultiBox->SetFillColor(kGreen);\r
+                       acoMultiBox->SetLineColor(kGreen);\r
+                       acoMultiBox->SetLineWidth(2);\r
+                       acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K.");\r
+                       //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");\r
+                       GetRawsData(1)->GetListOfFunctions()->Add(acoMultiBox);\r
+               }\r
+               if (isACOWarning==kTRUE)\r
+               {\r
+                       acoMultiBox->SetFillColor(kYellow);\r
+                       acoMultiBox->SetLineColor(kYellow);\r
+                       acoMultiBox->SetLineWidth(2);\r
+                       acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");\r
+                       //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");\r
+                       GetRawsData(1)->GetListOfFunctions()->Add(acoMultiBox);\r
+               }\r
+\r
+               // for AMU ACORDE trigger option\r
+               \r
+               if (!GetRawsData(2)||!GetRawsData(3)) continue;\r
+               Double_t integral1 = GetRawsData(2)->Integral();\r
+               if (integral1==0) \r
+               {\r
+                       printf("No entries in ACORDE Hits histograms --> fatal error, please check !!!\n");\r
+                       TPaveText *acoBoxFatalAMU=new TPaveText(35,0.5,55,1,"b");       \r
+                       acoBoxFatalAMU->SetFillColor(kRed);\r
+                       acoBoxFatalAMU->SetLineColor(kRed);\r
+                       acoBoxFatalAMU->SetLineWidth(2);\r
+                       //acoBox2->SetTextSize(3);\r
+                       //acoBox2->SetTextColor(kBlack);\r
+                       acoBoxFatalAMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");\r
+                       acoBoxFatalAMU->AddText("Blue line: mean of hits");\r
+                       acoBoxFatalAMU->AddText("Between GREEN lines: ACO. O.K.");\r
+                       GetRawsData(2)->GetListOfFunctions()->Add(acoBoxFatalAMU);\r
+\r
+                       TPaveText *acoMultiBoxFatalAMU = new TPaveText(20,0.5,40,1,"b");\r
+                       acoMultiBoxFatalAMU->SetFillColor(kRed);\r
+                       acoMultiBoxFatalAMU->SetLineColor(kRed);\r
+                       acoMultiBoxFatalAMU->SetLineWidth(2);\r
+                       acoMultiBoxFatalAMU->AddText("ACO. Not O.K., Call the experts");\r
+                       GetRawsData(3)->GetListOfFunctions()->Add(acoMultiBoxFatalAMU);\r
+                       \r
+                       continue;\r
+               }\r
+               Double_t mean1 = integral1/60;\r
+               fhACOMeanAMU->SetY1(mean1);\r
+               fhACOMeanAMU->SetY2(mean1);\r
+               fhACOMinAMU->SetY1(0.05*mean1);\r
+               fhACOMinAMU->SetY2(0.05*mean1);\r
+               fhACOMaxAMU->SetY1(2.25*mean1);\r
+               fhACOMaxAMU->SetY2(2.25*mean1);\r
+               \r
+               // alarms\r
+               Double_t max1 = GetRawsData(2)->GetMaximum();\r
+               if (max1 == 0)\r
+               {\r
+                       printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");\r
+                       continue;\r
+               }\r
+               // Multiplicity histogram threshold\r
+               Double_t maxMulti1 = GetRawsData(3)->GetMaximum();\r
+               if (maxMulti1 == 0)\r
+               {\r
+                       printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");\r
+                       continue;\r
+               }\r
+               fhACOMultiAMU->SetX1(1);\r
+               fhACOMultiAMU->SetY1(1);\r
+               fhACOMultiAMU->SetX2(1);\r
+               fhACOMultiAMU->SetY2(maxMulti1);\r
+               TPaveText *acoBoxAMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");      \r
+               //acoBox->SetFillStyle(0);\r
+               TPaveText *acoBox1AMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");     \r
+               //acoBox1->SetFillStyle(0);\r
+               TPaveText *acoBox2AMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");     \r
+               //acoBox2->SetFillStyle(0);\r
+               Int_t flagACO_DQMAMU = 0;\r
+               Bool_t isACOOkAMU = kTRUE;\r
+               Bool_t isACOWarningAMU = kFALSE;\r
+               for(Int_t iModule=0;iModule<60;iModule++)\r
+               {\r
+                       if ((GetRawsData(2)->GetBinContent(iModule))/max1 < 0.5) flagACO_DQMAMU++;\r
+               }\r
+               if (flagACO_DQMAMU < 15)\r
+               {\r
+                       acoBoxAMU->SetFillColor(kGreen);\r
+                       acoBoxAMU->SetLineColor(kGreen);\r
+                       acoBoxAMU->SetLineWidth(2);\r
+                       //acoBox->SetTextSize(3);\r
+                       //acoBox->SetTextColor(kBlack);\r
+                       acoBoxAMU->AddText("FLAG MESSAGE: O.K. !!!");\r
+                       acoBoxAMU->AddText("Blue line: mean of hits");\r
+                       acoBoxAMU->AddText("Between GREEN lines: ACO. O.K.");\r
+                       GetRawsData(2)->GetListOfFunctions()->Add(acoBoxAMU);\r
+\r
+                       \r
+               }else if (flagACO_DQMAMU > 15 && flagACO_DQMAMU<30)\r
+               {\r
+                       acoBox1AMU->SetFillColor(kYellow);\r
+                       acoBox1AMU->SetLineColor(kYellow);\r
+                       acoBox1AMU->SetLineWidth(2);\r
+                       //acoBox1->SetTextSize(3);\r
+                       //acoBox1->SetTextColor(kBlack);\r
+                       acoBox1AMU->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");\r
+                       acoBox1AMU->AddText("Blue line: mean of hits");\r
+                       acoBox1AMU->AddText("Between GREEN lines: ACO. O.K.");\r
+                       GetRawsData(2)->GetListOfFunctions()->Add(acoBox1AMU);\r
+                       isACOWarningAMU=kTRUE;\r
+\r
+               }else if (flagACO_DQMAMU > 30)\r
+               {\r
+                       acoBox2AMU->SetFillColor(kRed);\r
+                       acoBox2AMU->SetLineColor(kRed);\r
+                       acoBox2AMU->SetLineWidth(2);\r
+                       //acoBox2->SetTextSize(3);\r
+                       //acoBox2->SetTextColor(kBlack);\r
+                       acoBox2AMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");\r
+                       acoBox2AMU->AddText("Blue line: mean of hits");\r
+                       acoBox2AMU->AddText("Between GREEN lines: ACO. O.K.");\r
+                       GetRawsData(2)->GetListOfFunctions()->Add(acoBox2AMU);\r
+                       isACOOkAMU=kFALSE;\r
+\r
+               }\r
+               \r
+               \r
+               TPaveText *acoMultiBoxAMU = new TPaveText(20,maxMulti1-0.20*maxMulti1,40,maxMulti1,"b");\r
+               if (GetRawsData(3)->Integral()==0 || isACOOkAMU==kFALSE)\r
+               {\r
+                       acoMultiBoxAMU->SetFillColor(kRed);\r
+                       acoMultiBoxAMU->SetLineColor(kRed);\r
+                       acoMultiBoxAMU->SetLineWidth(2);\r
+                       acoMultiBoxAMU->AddText("ACO. Not O.K., Call the experts");\r
+                       GetRawsData(3)->GetListOfFunctions()->Add(acoMultiBoxAMU);\r
+               }\r
+/*             if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){\r
+                       acoMultiBox->SetFillColor(kYellow);\r
+                       acoMultiBox->SetLineColor(kYellow);\r
+                       acoMultiBox->SetLineWidth(2);\r
+                       acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");\r
+                       GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);\r
+               }\r
+*/\r
+               if (isACOOkAMU==kTRUE)\r
+               {\r
+                       acoMultiBoxAMU->SetFillColor(kGreen);\r
+                       acoMultiBoxAMU->SetLineColor(kGreen);\r
+                       acoMultiBoxAMU->SetLineWidth(2);\r
+                       acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K.");\r
+                       //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");\r
+                       GetRawsData(3)->GetListOfFunctions()->Add(acoMultiBoxAMU);\r
+               }\r
+               if (isACOWarningAMU==kTRUE)\r
+               {\r
+                       acoMultiBoxAMU->SetFillColor(kYellow);\r
+                       acoMultiBoxAMU->SetLineColor(kYellow);\r
+                       acoMultiBoxAMU->SetLineWidth(2);\r
+                       acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");\r
+                       //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");\r
+                       GetRawsData(3)->GetListOfFunctions()->Add(acoMultiBoxAMU);\r
+               }\r
+\r
+               // Checks if hits distribution from SL0 and AMU are equal\r
+               Float_t eff = 0.0;\r
+               Int_t effFlag = 0;\r
+               for (Int_t iModule = 0; iModule < 60; iModule++)\r
+               {\r
+                       if (GetRawsData(2)->GetBinContent(iModule)==0) \r
+                       {\r
+                               eff = 0.0;\r
+                               continue;\r
+                       }else\r
+                       {\r
+                               eff = GetRawsData(0)->GetBinContent(iModule)/GetRawsData(2)->GetBinContent(iModule);\r
+                               GetRawsData(4)->Fill(iModule,eff);\r
+                               if (eff!=1) effFlag++;\r
+                       }\r
+               }\r
+               \r
+               if (effFlag == 0)\r
+               {\r
+                       TPaveText *checkTriggerBox = new TPaveText(20,0.6,40,0.8,"b");\r
+                       checkTriggerBox->SetFillColor(kGreen);\r
+                       checkTriggerBox->SetLineColor(kGreen);\r
+                       checkTriggerBox->SetLineWidth(2);\r
+                       checkTriggerBox->AddText("FLAG MESSAGE: ACO. trigger O.K.");\r
+                       GetRawsData(4)->GetListOfFunctions()->Add(checkTriggerBox);\r
+               }else\r
+               {\r
+                       TPaveText *checkTriggerBox1 = new TPaveText(20,0.6,40,0.8,"b");\r
+                       checkTriggerBox1->SetFillColor(kYellow);\r
+                       checkTriggerBox1->SetLineColor(kYellow);\r
+                       checkTriggerBox1->SetLineWidth(2);\r
+                       checkTriggerBox1->AddText("FLAG MESSAGE: Warning, please check the ACO trigger configuration");\r
+                       GetRawsData(4)->GetListOfFunctions()->Add(checkTriggerBox1);\r
+\r
+               }\r
+\r
+               \r
+\r
+       } // end specie loop\r
+       \r
+       // QA Checker standar (to be updated)\r
   AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ;\r
 }\r
 \r
@@ -91,28 +454,98 @@ void AliACORDEQADataMakerRec::InitRaws()
   const Bool_t expert   = kTRUE ; \r
   const Bool_t saveCorr = kTRUE ; \r
   const Bool_t image    = kTRUE ; \r
-  const char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9",\r
+/*  const char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9",\r
                         "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",\r
                         "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",\r
                         "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",\r
                         "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",\r
                         "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};\r
-\r
-\r
-  TH1F *fhACORDEBitPattern[4];\r
-  fhACORDEBitPattern[0] = new TH1F("ACORDEBitPatternfromRAWSingle","Distribution of ACORDE fired modules from RAW-Single;Modules;Counts",60,-0.5,59.5);//AcordeSingleMuon BitPattern\r
-  fhACORDEBitPattern[1] = new TH1F("ACORDEBitPatternfromRAWMulti","Distribution of ACORDE fired modules from RAW-Multi;Modules;Counts",60,-0.5,59.5);//AcordeMultiMuon BitPattern\r
-  fhACORDEBitPattern[2] = new TH1F("ACORDEMultiplicityfromRAWSingle","Number of fired ACORDE modules;No. of fired ACORDE modules;No. of events in ACORDE",60,-0.5,60);//AcordeSingleMuon Multiplicity\r
-  fhACORDEBitPattern[3] = new TH1F("ACORDEMultiplicityfromRAWMulti","Number of fired ACORDE modules; No. of fired ACORDE modules;No. of events in ACORDE",60,-0.5,60);//AcordeMultiMuon Multiplicity\r
-  for(Int_t i=0;i<4;i++) \r
-    Add2RawsList(fhACORDEBitPattern[i],i,!expert, image, !saveCorr);\r
-  \r
+*/\r
+\r
+ // TH1F *fhACORDEBitPattern[4];\r
+       //TH1F *fhACORDEBitPatternDQM;\r
+//  fhACORDEBitPattern[0] = new TH1F("ACORDEBitPatternfromRAWSingle","Distribution of ACORDE fired modules from RAW-Single;Modules;Counts",60,-0.5,59.5);//AcordeSingleMuon BitPattern\r
+//  fhACORDEBitPattern[1] = new TH1F("ACORDEBitPatternfromRAWMulti","Distribution of ACORDE fired modules from RAW-Multi;Modules;Counts",60,-0.5,59.5);//AcordeMultiMuon BitPattern\r
+//  fhACORDEBitPattern[2] = new TH1F("ACORDEMultiplicityfromRAWSingle","Number of fired ACORDE modules;No. of fired ACORDE modules;No. of events in ACORDE",61,-1,60);//AcordeSingleMuon Multiplicity\r
+//  fhACORDEBitPattern[3] = new TH1F("ACORDEMultiplicityfromRAWMulti","Number of fired ACORDE modules; No. of fired ACORDE modules;No. of events in ACORDE",61,-1,60);//AcordeMultiMuon Multiplicity\r
+       TH1F * fhACORDEBitPatternDQM = new TH1F("ACOHitsSL0_DQM_Shifter","Distribution of ACORDE fired modules for DQM shifter; No. of module; Counts",60,-0.5,59.5);// Hits histogram for QA-shifter ACO-SL0 trigger mode\r
+       TH1F * fhACORDEMultiplicitySL0DQM = new TH1F("ACOMultiSL0_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 * fhACORDEBitPatternAMUDQM = new TH1F("ACOHitsAMU_DQM_Shifter","Distribution of ACORDE fired modules for DQM shifter; No. of module; Counts",60,-0.5,59.5);// Hits histogram for QA-shifter ACO-SL0 trigger mode\r
+       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 * fhACORDEBitPatternCheckDQM = new TH1F("ACOHitsTriggerCheck_DQMExpert","Check distribution for ACORDE trigger configuration; No. of module; Trigger hits difference",60,-0.5,59.5); // Check the trigger status of ACORDE (SL0 vs AMU)\r
+       // Expert histograms\r
+//     for(Int_t i=0;i<4;i++) \r
+//    Add2RawsList(fhACORDEBitPattern[i],i,expert, !image, !saveCorr);\r
+       // Check the hits multiplicity from trigger configuration\r
+       Add2RawsList(fhACORDEBitPatternCheckDQM,4,expert,image,!saveCorr);\r
+       fhACORDEBitPatternCheckDQM->SetFillColor(kOrange);\r
+       // AMORE diplay settings for shifter on GUI\r
+       \r
+       // For SL0 ACO trigger mode\r
+       \r
+       Add2RawsList(fhACORDEBitPatternDQM,0,!expert,image,!saveCorr);\r
+       Add2RawsList(fhACORDEMultiplicitySL0DQM,1,!expert,image,!saveCorr);\r
+       \r
+       // For Hits distribution on ACORDE\r
+       \r
+       fhACORDEBitPatternDQM->SetFillColor(kCyan-7);\r
+       fhACOMean->SetLineColor(kBlue);\r
+       fhACOMean->SetLineStyle(2);\r
+       fhACOMean->SetLineWidth(4);\r
+       fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMean);\r
+       fhACOMin->SetLineColor(kGreen);\r
+       fhACOMin->SetLineStyle(2);\r
+       fhACOMin->SetLineWidth(4);\r
+       fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMin);\r
+       fhACOMax->SetLineColor(kGreen);\r
+       fhACOMax->SetLineStyle(2);\r
+       fhACOMax->SetLineWidth(4);\r
+       fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMax);\r
+       \r
+       // For ACORDE Multiplicity distribution of fired modules\r
+       \r
+       fhACORDEMultiplicitySL0DQM->SetFillColor(kBlue+1);\r
+       fhACOMulti->SetLineColor(kMagenta);\r
+       fhACOMulti->SetLineStyle(2);\r
+       fhACOMulti->SetLineWidth(4);\r
+       fhACORDEMultiplicitySL0DQM->GetListOfFunctions()->Add(fhACOMulti);\r
+       \r
+       // For AMU ACO trigger mode\r
+       \r
+       Add2RawsList(fhACORDEBitPatternAMUDQM,2,!expert,image,!saveCorr);\r
+       Add2RawsList(fhACORDEMultiplicityAMUDQM,3,!expert,image,!saveCorr);\r
+       \r
+       // For Hits distribution on ACORDE\r
+       \r
+       fhACORDEBitPatternAMUDQM->SetFillColor(kCyan-7);\r
+       fhACOMeanAMU->SetLineColor(kBlue);\r
+       fhACOMeanAMU->SetLineStyle(2);\r
+       fhACOMeanAMU->SetLineWidth(4);\r
+       fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMeanAMU);\r
+       fhACOMinAMU->SetLineColor(kGreen);\r
+       fhACOMinAMU->SetLineStyle(2);\r
+       fhACOMinAMU->SetLineWidth(4);\r
+       fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMinAMU);\r
+       fhACOMaxAMU->SetLineColor(kGreen);\r
+       fhACOMaxAMU->SetLineStyle(2);\r
+       fhACOMaxAMU->SetLineWidth(4);\r
+       fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMaxAMU);\r
+       \r
+       // For ACORDE Multiplicity distribution of fired modules\r
+       \r
+       fhACORDEMultiplicityAMUDQM->SetFillColor(kBlue+1);\r
+       fhACOMultiAMU->SetLineColor(kMagenta);\r
+       fhACOMultiAMU->SetLineStyle(2);\r
+       fhACOMultiAMU->SetLineWidth(4);\r
+       fhACORDEMultiplicityAMUDQM->GetListOfFunctions()->Add(fhACOMultiAMU);\r
+               \r
+  /*\r
   for (Int_t iModule = 0; iModule<60; iModule++)\r
   {\r
        fhACORDEBitPattern[0]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);\r
        fhACORDEBitPattern[1]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);\r
   }\r
-\r
+*/\r
 }\r
 //____________________________________________________________________________ \r
 void AliACORDEQADataMakerRec::InitDigits()\r
@@ -225,21 +658,26 @@ if(rawStream.Next())
                 tmpDy>>=1;\r
         }\r
         contSingle=0;\r
-       contMulti=0;\r
+       for(Int_t r=0;r<60;r++)\r
+               {\r
+                               if(kroSingle[r]==1)\r
+                               {\r
+                                       GetRawsData(0)->Fill(r);\r
+                                       //GetRawsData(4)->Fill(r);\r
+                                       contSingle++;\r
+                               }\r
+               }GetRawsData(1)->Fill(contSingle);//GetRawsData(5)->Fill(contSingle);\r
+               contMulti=0;\r
         for(Int_t r=0;r<60;r++)\r
         {\r
-                       if(kroSingle[r]==1)\r
-                       {\r
-                               GetRawsData(0)->Fill(r+1);\r
-                               contSingle=contSingle+1;\r
-                       }\r
                        if(kroMulti[r]==1)\r
                        {\r
-                               GetRawsData(1)->Fill(r+1);\r
+                               GetRawsData(2)->Fill(r);\r
+                               //GetRawsData(6)->Fill(r);\r
                                contMulti++;\r
                        }\r
 \r
-        }GetRawsData(2)->Fill(contSingle);GetRawsData(3)->Fill(contMulti);\r
+        }GetRawsData(3)->Fill(contMulti);//GetRawsData(7)->Fill(contMulti);\r
 }\r
 }\r
 //____________________________________________________________________________\r
index 40673b0..2f8e633 100755 (executable)
 // --- AliRoot header files ---
 
 #include "AliQADataMakerRec.h"
-
+#include <TLine.h>
 class AliACORDEQADataMakerRec: public AliQADataMakerRec {
 
 public:
   AliACORDEQADataMakerRec() ;          // constructor
   AliACORDEQADataMakerRec(const AliACORDEQADataMakerRec& qadm) ;   
   AliACORDEQADataMakerRec& operator = (const AliACORDEQADataMakerRec& qadm) ;
-  virtual ~AliACORDEQADataMakerRec() {;} // destructor
+       virtual ~AliACORDEQADataMakerRec();// destructor
 
 private:
   virtual void   InitRaws() ;    //book Digit QA histo
@@ -47,6 +47,21 @@ private:
   virtual void   MakeESDs(AliESDEvent * esd) ;         //Fill hit QA histo
   virtual void   EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ;
   virtual void   StartOfDetectorCycle() ;
+       
+       //For DQM shifter histogram
+       // SL0 ACO trigger mode
+       TLine* fhACOMean; 
+       TLine* fhACOMin; 
+       TLine* fhACOMax; 
+       TLine* fhACOMulti;
+       // AMU trigger mode
+       TLine* fhACOMeanAMU; 
+       TLine* fhACOMinAMU; 
+       TLine* fhACOMaxAMU; 
+       TLine* fhACOMultiAMU;
+       // Trigger check (4 words from hits multiplicity)
+       TLine* fhACOTriggerCheck;
+
   ClassDef(AliACORDEQADataMakerRec,1)  // description 
 
 };