1 /**************************************************************************
\r
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
\r
4 * Author: The ALICE Off-line Project. *
\r
5 * Contributors are mentioned in the code where appropriate. *
\r
7 * Permission to use, copy, modify and distribute this software and its *
\r
8 * documentation strictly for non-commercial purposes is hereby granted *
\r
9 * without fee, provided that the above copyright notice appears in all *
\r
10 * copies and that both the copyright notice and this permission notice *
\r
11 * appear in the supporting documentation. The authors make no claims *
\r
12 * about the suitability of this software for any purpose. It is *
\r
13 * provided "as is" without express or implied warranty. *
\r
14 **************************************************************************/
\r
16 // Produces the data needed to calculate the quality assurance.
\r
17 // All data must be mergeable objects.
\r
22 // Luciano Diaz Gonzalez <luciano.diaz@nucleares.unam.mx> (ICN-UNAM)
\r
23 // Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch> (FCFM-BUAP)
\r
24 // Arturo Fernandez Tellez <afernan@mail.cern.ch (FCFM-BUAP)
\r
26 // Created: June 13th 2008
\r
28 // Last update: May 5th. 2011 (by Mario RC: mrodrigu@mail.cern.ch) -->Creates QA expert histograms
\r
29 // and QA-shifter histograms also with threshold lines and visual alarm
\r
30 // Last Update: Aug. 27th 2008 --> Implementation to declare QA expert histogram
\r
31 // Last update: Nov. 14t 2009 --> MRC <mrodrigu@mail.cern.ch> (FCFM-BUAP)
\r
32 // |--> Change in Multiplicity histogram for AMORE (to detect empty triggers events of ACORDE)
\r
36 // --- ROOT system ---
\r
37 #include <TClonesArray.h>
\r
40 #include <TDirectory.h>
\r
41 #include <TPaveText.h>
\r
42 // --- Standard library ---
\r
44 // --- AliRoot header files ---
\r
45 #include "AliESDEvent.h"
\r
47 #include "AliACORDEdigit.h"
\r
48 #include "AliACORDEhit.h"
\r
49 #include "AliACORDEQADataMakerRec.h"
\r
50 #include "AliQAChecker.h"
\r
51 #include "AliACORDERawReader.h"
\r
52 #include "AliACORDERawStream.h"
\r
53 ClassImp(AliACORDEQADataMakerRec)
\r
55 //____________________________________________________________________________
\r
56 AliACORDEQADataMakerRec::AliACORDEQADataMakerRec():AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kACORDE), "ACORDE Quality Assurance Data Maker"),
\r
57 fhACOMean(new TLine(0.,4.,60.,4.)),
\r
58 fhACOMin(new TLine(0.,4.,60.,4.)),
\r
59 fhACOMax(new TLine(0.,4.,60.,4.)),
\r
60 fhACOMulti(new TLine(0.,4.,60.,4.)),
\r
61 fhACOMeanAMU(new TLine(0.,4.,60.,4.)),
\r
62 fhACOMinAMU(new TLine(0.,4.,60.,4.)),
\r
63 fhACOMaxAMU(new TLine(0.,4.,60.,4.)),
\r
64 fhACOMultiAMU(new TLine(0.,4.,60.,4.)),
\r
65 fhACOTriggerCheck(new TLine(0.,4.,60.,4.))
\r
69 //____________________________________________________________________________
\r
70 AliACORDEQADataMakerRec::AliACORDEQADataMakerRec(const AliACORDEQADataMakerRec& qadm):
\r
71 AliQADataMakerRec(),
\r
72 fhACOMean(qadm.fhACOMean),
\r
73 fhACOMin(qadm.fhACOMin),
\r
74 fhACOMax(qadm.fhACOMax),
\r
75 fhACOMulti(qadm.fhACOMulti),
\r
76 fhACOMeanAMU(qadm.fhACOMeanAMU),
\r
77 fhACOMinAMU(qadm.fhACOMinAMU),
\r
78 fhACOMaxAMU(qadm.fhACOMaxAMU),
\r
79 fhACOMultiAMU(qadm.fhACOMultiAMU),
\r
80 fhACOTriggerCheck(qadm.fhACOTriggerCheck)
\r
82 SetName((const char*)qadm.GetName()) ;
\r
83 SetTitle((const char*)qadm.GetTitle());
\r
86 //__________________________________________________________________
\r
87 AliACORDEQADataMakerRec::~AliACORDEQADataMakerRec()
\r
93 delete fhACOTriggerCheck;
\r
96 //__________________________________________________________________
\r
97 AliACORDEQADataMakerRec& AliACORDEQADataMakerRec::operator = (const AliACORDEQADataMakerRec& qadm )
\r
100 this->~AliACORDEQADataMakerRec();
\r
101 new(this) AliACORDEQADataMakerRec(qadm);
\r
104 //____________________________________________________________________________
\r
105 void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
\r
107 //Detector specific actions at end of cycle
\r
108 // do the QA checking
\r
109 ResetEventTrigClasses(); // reset triggers list to select all histos
\r
110 // Update for DQM GUI
\r
112 for (Int_t specie = 0; specie < AliRecoParam::kNSpecies ; specie++) {
\r
113 if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) continue ;
\r
115 // RS Set event specie
\r
116 SetEventSpecie(AliRecoParam::ConvertIndex(specie));
\r
118 for (int itc=-1;itc<GetNTrigClasses();itc++) { // RS Loop over the trigger classes
\r
120 TObjArray &harr = *GetRawsDataOfTrigClass(itc);
\r
122 TH1* h0 = (TH1*)harr[0];
\r
123 TH1* h1 = (TH1*)harr[1];
\r
124 if (!h0 || !h1) continue;
\r
125 double integral = 0;
\r
126 if (itc==-1 && !(integral=h0->Integral())) { // default clone
\r
127 printf("No entries in ACORDE Hits histograms for trigger class %d, fatal error, please check !!!\n",itc);
\r
128 TPaveText *acoBoxFatal=new TPaveText(35,0.5,55,1,"b");
\r
129 acoBoxFatal->SetFillColor(kRed);
\r
130 acoBoxFatal->SetLineColor(kRed);
\r
131 acoBoxFatal->SetLineWidth(2);
\r
132 //acoBox2->SetTextSize(3);
\r
133 //acoBox2->SetTextColor(kBlack);
\r
134 acoBoxFatal->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
135 acoBoxFatal->AddText("Blue line: mean of hits");
\r
136 acoBoxFatal->AddText("Between GREEN lines: ACO. O.K.");
\r
137 h0->GetListOfFunctions()->Add(acoBoxFatal);
\r
139 TPaveText *acoMultiBoxFatal = new TPaveText(20,0.5,40,1,"b");
\r
140 acoMultiBoxFatal->SetFillColor(kRed);
\r
141 acoMultiBoxFatal->SetLineColor(kRed);
\r
142 acoMultiBoxFatal->SetLineWidth(2);
\r
143 acoMultiBoxFatal->AddText("ACO. Not O.K., Call the experts");
\r
144 h1->GetListOfFunctions()->Add(acoMultiBoxFatal);
\r
147 Double_t mean = integral/60;
\r
148 fhACOMean->SetY1(mean);
\r
149 fhACOMean->SetY2(mean);
\r
150 fhACOMin->SetY1(0.05*mean);
\r
151 fhACOMin->SetY2(0.05*mean);
\r
152 fhACOMax->SetY1(2.25*mean);
\r
153 fhACOMax->SetY2(2.25*mean);
\r
156 Double_t max = h0->GetMaximum();
\r
158 printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");
\r
161 // Multiplicity histogram threshold
\r
162 Double_t maxMulti = h1->GetMaximum();
\r
163 if (maxMulti == 0) {
\r
164 printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");
\r
167 fhACOMulti->SetX1(1);
\r
168 fhACOMulti->SetY1(1);
\r
169 fhACOMulti->SetX2(1);
\r
170 fhACOMulti->SetY2(maxMulti);
\r
171 TPaveText *acoBox=new TPaveText(35,max-0.20*max,55,max,"b");
\r
172 //acoBox->SetFillStyle(0);
\r
173 TPaveText *acoBox1=new TPaveText(35,max-0.20*max,55,max,"b");
\r
174 //acoBox1->SetFillStyle(0);
\r
175 TPaveText *acoBox2=new TPaveText(35,max-0.20*max,55,max,"b");
\r
176 //acoBox2->SetFillStyle(0);
\r
177 Int_t flagACO_DQM = 0;
\r
178 Bool_t isACOOk = kTRUE;
\r
179 Bool_t isACOWarning = kFALSE;
\r
180 for(Int_t iModule=0;iModule<60;iModule++) {
\r
181 if ((h0->GetBinContent(iModule))/max < 0.5) flagACO_DQM++;
\r
183 if (flagACO_DQM < 15) {
\r
184 acoBox->SetFillColor(kGreen);
\r
185 acoBox->SetLineColor(kGreen);
\r
186 acoBox->SetLineWidth(2);
\r
187 //acoBox->SetTextSize(3);
\r
188 //acoBox->SetTextColor(kBlack);
\r
189 acoBox->AddText("FLAG MESSAGE: O.K. !!!");
\r
190 acoBox->AddText("Blue line: mean of hits");
\r
191 acoBox->AddText("Between GREEN lines: ACO. O.K.");
\r
192 h0->GetListOfFunctions()->Add(acoBox);
\r
195 else if (flagACO_DQM > 15 && flagACO_DQM<30) {
\r
196 acoBox1->SetFillColor(kYellow);
\r
197 acoBox1->SetLineColor(kYellow);
\r
198 acoBox1->SetLineWidth(2);
\r
199 //acoBox1->SetTextSize(3);
\r
200 //acoBox1->SetTextColor(kBlack);
\r
201 acoBox1->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");
\r
202 acoBox1->AddText("Blue line: mean of hits");
\r
203 acoBox1->AddText("Between GREEN lines: ACO. O.K.");
\r
204 h0->GetListOfFunctions()->Add(acoBox1);
\r
205 isACOWarning=kTRUE;
\r
207 else if (flagACO_DQM > 30) {
\r
208 acoBox2->SetFillColor(kRed);
\r
209 acoBox2->SetLineColor(kRed);
\r
210 acoBox2->SetLineWidth(2);
\r
211 //acoBox2->SetTextSize(3);
\r
212 //acoBox2->SetTextColor(kBlack);
\r
213 acoBox2->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
214 acoBox2->AddText("Blue line: mean of hits");
\r
215 acoBox2->AddText("Between GREEN lines: ACO. O.K.");
\r
216 h0->GetListOfFunctions()->Add(acoBox2);
\r
221 TPaveText *acoMultiBox = new TPaveText(20,maxMulti-0.20*maxMulti,40,maxMulti,"b");
\r
222 if (h1->Integral()==0 || isACOOk==kFALSE) {
\r
223 acoMultiBox->SetFillColor(kRed);
\r
224 acoMultiBox->SetLineColor(kRed);
\r
225 acoMultiBox->SetLineWidth(2);
\r
226 acoMultiBox->AddText("ACO. Not O.K., Call the experts");
\r
227 h1->GetListOfFunctions()->Add(acoMultiBox);
\r
229 /* if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){
\r
230 acoMultiBox->SetFillColor(kYellow);
\r
231 acoMultiBox->SetLineColor(kYellow);
\r
232 acoMultiBox->SetLineWidth(2);
\r
233 acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");
\r
234 GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);
\r
237 if (isACOOk==kTRUE) {
\r
238 acoMultiBox->SetFillColor(kGreen);
\r
239 acoMultiBox->SetLineColor(kGreen);
\r
240 acoMultiBox->SetLineWidth(2);
\r
241 acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K.");
\r
242 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
243 h1->GetListOfFunctions()->Add(acoMultiBox);
\r
245 if (isACOWarning==kTRUE) {
\r
246 acoMultiBox->SetFillColor(kYellow);
\r
247 acoMultiBox->SetLineColor(kYellow);
\r
248 acoMultiBox->SetLineWidth(2);
\r
249 acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");
\r
250 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
251 h1->GetListOfFunctions()->Add(acoMultiBox);
\r
254 // for AMU ACORDE trigger option
\r
255 TH1* h2 = (TH1*)harr[2];
\r
256 TH1* h3 = (TH1*)harr[3];
\r
257 if (!h2 || !h3) continue;
\r
258 Double_t integral1 = h2->Integral();
\r
259 if (integral1==0) {
\r
260 printf("No entries in ACORDE Hits histograms for trigger class %d --> fatal error, please check !!!\n",itc);
\r
261 TPaveText *acoBoxFatalAMU=new TPaveText(35,0.5,55,1,"b");
\r
262 acoBoxFatalAMU->SetFillColor(kRed);
\r
263 acoBoxFatalAMU->SetLineColor(kRed);
\r
264 acoBoxFatalAMU->SetLineWidth(2);
\r
265 //acoBox2->SetTextSize(3);
\r
266 //acoBox2->SetTextColor(kBlack);
\r
267 acoBoxFatalAMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
268 acoBoxFatalAMU->AddText("Blue line: mean of hits");
\r
269 acoBoxFatalAMU->AddText("Between GREEN lines: ACO. O.K.");
\r
270 h2->GetListOfFunctions()->Add(acoBoxFatalAMU);
\r
272 TPaveText *acoMultiBoxFatalAMU = new TPaveText(20,0.5,40,1,"b");
\r
273 acoMultiBoxFatalAMU->SetFillColor(kRed);
\r
274 acoMultiBoxFatalAMU->SetLineColor(kRed);
\r
275 acoMultiBoxFatalAMU->SetLineWidth(2);
\r
276 acoMultiBoxFatalAMU->AddText("ACO. Not O.K., Call the experts");
\r
277 h3->GetListOfFunctions()->Add(acoMultiBoxFatalAMU);
\r
281 Double_t mean1 = integral1/60;
\r
282 fhACOMeanAMU->SetY1(mean1);
\r
283 fhACOMeanAMU->SetY2(mean1);
\r
284 fhACOMinAMU->SetY1(0.05*mean1);
\r
285 fhACOMinAMU->SetY2(0.05*mean1);
\r
286 fhACOMaxAMU->SetY1(2.25*mean1);
\r
287 fhACOMaxAMU->SetY2(2.25*mean1);
\r
290 Double_t max1 = h2->GetMaximum();
\r
292 printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");
\r
295 // Multiplicity histogram threshold
\r
296 Double_t maxMulti1 = h3->GetMaximum();
\r
297 if (maxMulti1 == 0) {
\r
298 printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");
\r
301 fhACOMultiAMU->SetX1(1);
\r
302 fhACOMultiAMU->SetY1(1);
\r
303 fhACOMultiAMU->SetX2(1);
\r
304 fhACOMultiAMU->SetY2(maxMulti1);
\r
305 TPaveText *acoBoxAMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");
\r
306 //acoBox->SetFillStyle(0);
\r
307 TPaveText *acoBox1AMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");
\r
308 //acoBox1->SetFillStyle(0);
\r
309 TPaveText *acoBox2AMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");
\r
310 //acoBox2->SetFillStyle(0);
\r
311 Int_t flagACO_DQMAMU = 0;
\r
312 Bool_t isACOOkAMU = kTRUE;
\r
313 Bool_t isACOWarningAMU = kFALSE;
\r
314 for(Int_t iModule=0;iModule<60;iModule++) {
\r
315 if ((h2->GetBinContent(iModule))/max1 < 0.5) flagACO_DQMAMU++;
\r
317 if (flagACO_DQMAMU < 15) {
\r
318 acoBoxAMU->SetFillColor(kGreen);
\r
319 acoBoxAMU->SetLineColor(kGreen);
\r
320 acoBoxAMU->SetLineWidth(2);
\r
321 //acoBox->SetTextSize(3);
\r
322 //acoBox->SetTextColor(kBlack);
\r
323 acoBoxAMU->AddText("FLAG MESSAGE: O.K. !!!");
\r
324 acoBoxAMU->AddText("Blue line: mean of hits");
\r
325 acoBoxAMU->AddText("Between GREEN lines: ACO. O.K.");
\r
326 h2->GetListOfFunctions()->Add(acoBoxAMU);
\r
329 else if (flagACO_DQMAMU > 15 && flagACO_DQMAMU<30) {
\r
330 acoBox1AMU->SetFillColor(kYellow);
\r
331 acoBox1AMU->SetLineColor(kYellow);
\r
332 acoBox1AMU->SetLineWidth(2);
\r
333 //acoBox1->SetTextSize(3);
\r
334 //acoBox1->SetTextColor(kBlack);
\r
335 acoBox1AMU->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");
\r
336 acoBox1AMU->AddText("Blue line: mean of hits");
\r
337 acoBox1AMU->AddText("Between GREEN lines: ACO. O.K.");
\r
338 h2->GetListOfFunctions()->Add(acoBox1AMU);
\r
339 isACOWarningAMU=kTRUE;
\r
342 else if (flagACO_DQMAMU > 30) {
\r
343 acoBox2AMU->SetFillColor(kRed);
\r
344 acoBox2AMU->SetLineColor(kRed);
\r
345 acoBox2AMU->SetLineWidth(2);
\r
346 //acoBox2->SetTextSize(3);
\r
347 //acoBox2->SetTextColor(kBlack);
\r
348 acoBox2AMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
349 acoBox2AMU->AddText("Blue line: mean of hits");
\r
350 acoBox2AMU->AddText("Between GREEN lines: ACO. O.K.");
\r
351 h2->GetListOfFunctions()->Add(acoBox2AMU);
\r
355 TPaveText *acoMultiBoxAMU = new TPaveText(20,maxMulti1-0.20*maxMulti1,40,maxMulti1,"b");
\r
356 if (h3->Integral()==0 || isACOOkAMU==kFALSE) {
\r
357 acoMultiBoxAMU->SetFillColor(kRed);
\r
358 acoMultiBoxAMU->SetLineColor(kRed);
\r
359 acoMultiBoxAMU->SetLineWidth(2);
\r
360 acoMultiBoxAMU->AddText("ACO. Not O.K., Call the experts");
\r
361 h3->GetListOfFunctions()->Add(acoMultiBoxAMU);
\r
363 /* if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){
\r
364 acoMultiBox->SetFillColor(kYellow);
\r
365 acoMultiBox->SetLineColor(kYellow);
\r
366 acoMultiBox->SetLineWidth(2);
\r
367 acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");
\r
368 GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);
\r
371 if (isACOOkAMU==kTRUE) {
\r
372 acoMultiBoxAMU->SetFillColor(kGreen);
\r
373 acoMultiBoxAMU->SetLineColor(kGreen);
\r
374 acoMultiBoxAMU->SetLineWidth(2);
\r
375 acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K.");
\r
376 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
377 h3->GetListOfFunctions()->Add(acoMultiBoxAMU);
\r
379 if (isACOWarningAMU==kTRUE) {
\r
380 acoMultiBoxAMU->SetFillColor(kYellow);
\r
381 acoMultiBoxAMU->SetLineColor(kYellow);
\r
382 acoMultiBoxAMU->SetLineWidth(2);
\r
383 acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");
\r
384 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
385 h3->GetListOfFunctions()->Add(acoMultiBoxAMU);
\r
388 // Checks if hits distribution from SL0 and AMU are equal
\r
392 TH1* h4 = (TH1*)harr[4];
\r
394 for (Int_t iModule = 0; iModule < 60; iModule++) {
\r
395 if (h2->GetBinContent(iModule)==0) {
\r
400 eff = h0->GetBinContent(iModule)/h2->GetBinContent(iModule);
\r
401 h4->Fill(iModule,eff);
\r
402 if (eff!=1) effFlag++;
\r
406 if (effFlag == 0) {
\r
407 TPaveText *checkTriggerBox = new TPaveText(20,0.6,40,0.8,"b");
\r
408 checkTriggerBox->SetFillColor(kGreen);
\r
409 checkTriggerBox->SetLineColor(kGreen);
\r
410 checkTriggerBox->SetLineWidth(2);
\r
411 checkTriggerBox->AddText("FLAG MESSAGE: ACO. trigger O.K.");
\r
412 h4->GetListOfFunctions()->Add(checkTriggerBox);
\r
415 TPaveText *checkTriggerBox1 = new TPaveText(20,0.6,40,0.8,"b");
\r
416 checkTriggerBox1->SetFillColor(kYellow);
\r
417 checkTriggerBox1->SetLineColor(kYellow);
\r
418 checkTriggerBox1->SetLineWidth(2);
\r
419 checkTriggerBox1->AddText("FLAG MESSAGE: Warning, please check the ACO trigger configuration");
\r
420 h4->GetListOfFunctions()->Add(checkTriggerBox1);
\r
423 } // end of trigger classes loop
\r
424 } // end specie loop
\r
425 // QA Checker standar (to be updated)
\r
427 AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ;
\r
430 //____________________________________________________________________________
\r
431 void AliACORDEQADataMakerRec::StartOfDetectorCycle()
\r
433 //Detector specific actions at start of cycle
\r
437 //____________________________________________________________________________
\r
438 void AliACORDEQADataMakerRec::InitRaws()
\r
440 // create Raw histograms in Raw subdir
\r
442 const Bool_t expert = kTRUE ;
\r
443 const Bool_t saveCorr = kTRUE ;
\r
444 const Bool_t image = kTRUE ;
\r
446 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
447 "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
\r
448 "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
\r
449 "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
\r
450 "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
\r
451 "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
\r
453 // TH1F *fhACORDEBitPattern[4];
\r
454 //TH1F *fhACORDEBitPatternDQM;
\r
455 // fhACORDEBitPattern[0] = new TH1F("ACORDEBitPatternfromRAWSingle","Distribution of ACORDE fired modules from RAW-Single;Modules;Counts",60,-0.5,59.5);//AcordeSingleMuon BitPattern
\r
456 // fhACORDEBitPattern[1] = new TH1F("ACORDEBitPatternfromRAWMulti","Distribution of ACORDE fired modules from RAW-Multi;Modules;Counts",60,-0.5,59.5);//AcordeMultiMuon BitPattern
\r
457 // 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
458 // 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
459 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
460 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
461 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
462 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
463 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
464 // Expert histograms
\r
465 // for(Int_t i=0;i<4;i++)
\r
466 // Add2RawsList(fhACORDEBitPattern[i],i,expert, !image, !saveCorr);
\r
467 // Check the hits multiplicity from trigger configuration
\r
468 Add2RawsList(fhACORDEBitPatternCheckDQM,4,expert,image,!saveCorr);
\r
469 fhACORDEBitPatternCheckDQM->SetFillColor(kOrange);
\r
470 // AMORE diplay settings for shifter on GUI
\r
472 // For SL0 ACO trigger mode
\r
474 Add2RawsList(fhACORDEBitPatternDQM,0,!expert,image,!saveCorr);
\r
475 ForbidCloning(fhACORDEBitPatternDQM);
\r
476 Add2RawsList(fhACORDEMultiplicitySL0DQM,1,!expert,image,!saveCorr);
\r
477 ForbidCloning(fhACORDEMultiplicitySL0DQM);
\r
478 // For Hits distribution on ACORDE
\r
480 fhACORDEBitPatternDQM->SetFillColor(kCyan-7);
\r
481 fhACOMean->SetLineColor(kBlue);
\r
482 fhACOMean->SetLineStyle(2);
\r
483 fhACOMean->SetLineWidth(4);
\r
484 fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMean);
\r
485 fhACOMin->SetLineColor(kGreen);
\r
486 fhACOMin->SetLineStyle(2);
\r
487 fhACOMin->SetLineWidth(4);
\r
488 fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMin);
\r
489 fhACOMax->SetLineColor(kGreen);
\r
490 fhACOMax->SetLineStyle(2);
\r
491 fhACOMax->SetLineWidth(4);
\r
492 fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMax);
\r
494 // For ACORDE Multiplicity distribution of fired modules
\r
496 fhACORDEMultiplicitySL0DQM->SetFillColor(kBlue+1);
\r
497 fhACOMulti->SetLineColor(kMagenta);
\r
498 fhACOMulti->SetLineStyle(2);
\r
499 fhACOMulti->SetLineWidth(4);
\r
500 fhACORDEMultiplicitySL0DQM->GetListOfFunctions()->Add(fhACOMulti);
\r
502 // For AMU ACO trigger mode
\r
504 Add2RawsList(fhACORDEBitPatternAMUDQM,2,!expert,image,!saveCorr);
\r
505 Add2RawsList(fhACORDEMultiplicityAMUDQM,3,!expert,image,!saveCorr);
\r
507 // For Hits distribution on ACORDE
\r
509 fhACORDEBitPatternAMUDQM->SetFillColor(kCyan-7);
\r
510 fhACOMeanAMU->SetLineColor(kBlue);
\r
511 fhACOMeanAMU->SetLineStyle(2);
\r
512 fhACOMeanAMU->SetLineWidth(4);
\r
513 fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMeanAMU);
\r
514 fhACOMinAMU->SetLineColor(kGreen);
\r
515 fhACOMinAMU->SetLineStyle(2);
\r
516 fhACOMinAMU->SetLineWidth(4);
\r
517 fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMinAMU);
\r
518 fhACOMaxAMU->SetLineColor(kGreen);
\r
519 fhACOMaxAMU->SetLineStyle(2);
\r
520 fhACOMaxAMU->SetLineWidth(4);
\r
521 fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMaxAMU);
\r
523 // For ACORDE Multiplicity distribution of fired modules
\r
525 fhACORDEMultiplicityAMUDQM->SetFillColor(kBlue+1);
\r
526 fhACOMultiAMU->SetLineColor(kMagenta);
\r
527 fhACOMultiAMU->SetLineStyle(2);
\r
528 fhACOMultiAMU->SetLineWidth(4);
\r
529 fhACORDEMultiplicityAMUDQM->GetListOfFunctions()->Add(fhACOMultiAMU);
\r
532 for (Int_t iModule = 0; iModule<60; iModule++)
\r
534 fhACORDEBitPattern[0]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);
\r
535 fhACORDEBitPattern[1]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);
\r
539 ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line
\r
542 //____________________________________________________________________________
\r
543 void AliACORDEQADataMakerRec::InitDigits()
\r
545 // create Digits histograms in Digits subdir
\r
547 const Bool_t expert = kTRUE ;
\r
548 const Bool_t image = kTRUE ;
\r
549 TH1F * fhDigitsModule;
\r
550 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
551 "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
\r
552 "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
\r
553 "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
\r
554 "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
\r
555 "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
\r
558 fhDigitsModule = new TH1F("ACORDEBitPatternfromDigits","Distribution of ACORDE from DIGITS;Modules;Counts",60,1,60);
\r
559 Add2DigitsList(fhDigitsModule,0,!expert,image);
\r
560 for (Int_t i=0;i<60;i++) fhDigitsModule->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
\r
562 ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
\r
565 //____________________________________________________________________________
\r
567 void AliACORDEQADataMakerRec::InitRecPoints()
\r
569 // create cluster histograms in RecPoint subdir
\r
570 // Not needed for ACORDE by now !!!
\r
572 ClonePerTrigClass(AliQAv1::kRECPOINTS); // this should be the last line
\r
575 //____________________________________________________________________________
\r
576 void AliACORDEQADataMakerRec::InitESDs()
\r
578 //create ESDs histograms in ESDs subdir
\r
580 const Bool_t expert = kTRUE ;
\r
581 const Bool_t image = kTRUE ;
\r
583 TH1F * fhESDsSingle;
\r
584 TH1F * fhESDsMulti;
\r
585 TH1F * fhESDsMultiplicity;
\r
586 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
587 "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
\r
588 "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
\r
589 "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
\r
590 "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
\r
591 "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
\r
594 fhESDsSingle = new TH1F("ACORDEBitPatternfromESDsSingle","Distribution of ACORDE fired modules from ESDs-Single;Modules;Counts",60,1,60);
\r
595 Add2ESDsList(fhESDsSingle,0,!expert,image);
\r
597 fhESDsMulti = new TH1F("ACORDEBitPatternfromESDsMulti","Distribution of ACORDE fired modules from ESDs-Multi;Modules;Counts",60,1,60);
\r
598 Add2ESDsList(fhESDsMulti,1,!expert,image);
\r
600 fhESDsMultiplicity = new TH1F("ACORDEMultiplicityfromESD","Number of fired ACORDE modules; No. of fired ACORDE modules;No. of events in ACORDE",60,-0.5,60);
\r
601 Add2ESDsList(fhESDsMultiplicity,2,!expert,image);
\r
602 for (Int_t i=0;i<60;i++)
\r
604 fhESDsSingle->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
\r
605 fhESDsMulti->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
\r
608 ClonePerTrigClass(AliQAv1::kESDS); // this should be the last line
\r
610 //____________________________________________________________________________
\r
611 void AliACORDEQADataMakerRec::MakeRaws(AliRawReader* rawReader)
\r
613 //fills QA histos for RAW
\r
614 IncEvCountCycleRaws();
\r
615 IncEvCountTotalRaws();
\r
616 rawReader->Reset();
\r
617 AliACORDERawStream rawStream(rawReader);
\r
618 size_t contSingle=0;
\r
619 size_t contMulti=0;
\r
622 bool kroSingle[60],kroMulti[60];
\r
625 for(Int_t m=0;m<60;m++) {kroSingle[m]=0;kroMulti[m]=0;}
\r
627 if(rawStream.Next())
\r
629 dy[0]=rawStream.GetWord(0);
\r
630 dy[1]=rawStream.GetWord(1);
\r
631 dy[2]=rawStream.GetWord(2);
\r
632 dy[3]=rawStream.GetWord(3);
\r
634 for(Int_t r=0;r<30;r++)
\r
636 kroSingle[r] = tmpDy & 1;
\r
640 for(Int_t r=30;r<60;r++)
\r
642 kroSingle[r] = tmpDy & 1;
\r
646 for(Int_t r=0;r<30;r++)
\r
648 kroMulti[r] = tmpDy & 1;
\r
652 for(Int_t r=30;r<60;r++)
\r
654 kroMulti[r] = tmpDy & 1;
\r
659 for(Int_t r=0;r<60;r++)
\r
661 if(kroSingle[r]==1)
\r
664 //FillRawsData(4,r);
\r
670 //FillRawsData(6,r);
\r
675 FillRawsData(3,contSingle);
\r
676 FillRawsData(7,contMulti);
\r
679 //____________________________________________________________________________
\r
680 void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree)
\r
682 //fills QA histos for Digits
\r
683 IncEvCountCycleDigits();
\r
684 IncEvCountTotalDigits();
\r
687 fDigitsArray->Clear() ;
\r
689 fDigitsArray = new TClonesArray("AliACORDEdigit",1000);
\r
690 TBranch * branch = digitsTree->GetBranch("ACORDEdigit");
\r
692 AliWarning("ACORDE branch in Digits Tree not found");
\r
694 branch->SetAddress(&fDigitsArray);
\r
695 for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
\r
696 branch->GetEntry(track);
\r
697 for(Int_t idigit = 0 ; idigit < fDigitsArray->GetEntriesFast() ; idigit++) {
\r
698 AliACORDEdigit *AcoDigit = (AliACORDEdigit*) fDigitsArray->UncheckedAt(idigit);
\r
700 AliError("The unchecked digit doesn't exist");
\r
703 FillDigitsData(0,AcoDigit->GetModule()-1);
\r
709 //____________________________________________________________________________
\r
710 void AliACORDEQADataMakerRec::MakeESDs(AliESDEvent * esd)
\r
712 //fills QA histos for ESD
\r
713 IncEvCountCycleESDs();
\r
714 IncEvCountTotalESDs();
\r
716 AliESDACORDE * fESDACORDE= esd->GetACORDEData();
\r
718 for(int i=0;i<60;i++)
\r
720 if(fESDACORDE->GetHitChannel(i))
\r
722 FillESDsData(0,i+1);
\r
723 FillESDsData(1,i+1);
\r
726 } FillESDsData(2,acoMulti);
\r