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 fhACOMeanAMU;
\r
96 delete fhACOMultiAMU;
\r
97 delete fhACOTriggerCheck;
\r
100 //__________________________________________________________________
\r
101 AliACORDEQADataMakerRec& AliACORDEQADataMakerRec::operator = (const AliACORDEQADataMakerRec& qadm )
\r
104 this->~AliACORDEQADataMakerRec();
\r
105 new(this) AliACORDEQADataMakerRec(qadm);
\r
108 //____________________________________________________________________________
\r
109 void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
\r
111 //Detector specific actions at end of cycle
\r
112 // do the QA checking
\r
113 ResetEventTrigClasses(); // reset triggers list to select all histos
\r
114 // Update for DQM GUI
\r
116 for (Int_t specie = 0; specie < AliRecoParam::kNSpecies ; specie++) {
\r
117 if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) continue ;
\r
119 // RS Set event specie
\r
120 SetEventSpecie(AliRecoParam::ConvertIndex(specie));
\r
122 for (int itc=-1;itc<GetNTrigClasses();itc++) { // RS Loop over the trigger classes
\r
124 TObjArray * parr = GetRawsDataOfTrigClass(itc);
\r
125 if (!parr) continue;
\r
126 TObjArray &harr = *parr;
\r
128 TH1* h0 = (TH1*)harr[0];
\r
129 TH1* h1 = (TH1*)harr[1];
\r
130 if (!h0 || !h1) continue;
\r
131 double integral = 0;
\r
132 if (itc==-1 && !(integral=h0->Integral())) { // default clone
\r
133 printf("No entries in ACORDE Hits histograms for trigger class %d, fatal error, please check !!!\n",itc);
\r
134 TPaveText *acoBoxFatal=new TPaveText(35,0.5,55,1,"b");
\r
135 acoBoxFatal->SetFillColor(kRed);
\r
136 acoBoxFatal->SetLineColor(kRed);
\r
137 acoBoxFatal->SetLineWidth(2);
\r
138 //acoBox2->SetTextSize(3);
\r
139 //acoBox2->SetTextColor(kBlack);
\r
140 acoBoxFatal->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
141 acoBoxFatal->AddText("Blue line: mean of hits");
\r
142 acoBoxFatal->AddText("Between GREEN lines: ACO. O.K.");
\r
143 h0->GetListOfFunctions()->Add(acoBoxFatal);
\r
145 TPaveText *acoMultiBoxFatal = new TPaveText(20,0.5,40,1,"b");
\r
146 acoMultiBoxFatal->SetFillColor(kRed);
\r
147 acoMultiBoxFatal->SetLineColor(kRed);
\r
148 acoMultiBoxFatal->SetLineWidth(2);
\r
149 acoMultiBoxFatal->AddText("ACO. Not O.K., Call the experts");
\r
150 h1->GetListOfFunctions()->Add(acoMultiBoxFatal);
\r
153 Double_t mean = integral/60;
\r
154 fhACOMean->SetY1(mean);
\r
155 fhACOMean->SetY2(mean);
\r
156 fhACOMin->SetY1(0.05*mean);
\r
157 fhACOMin->SetY2(0.05*mean);
\r
158 fhACOMax->SetY1(2.25*mean);
\r
159 fhACOMax->SetY2(2.25*mean);
\r
162 Double_t max = h0->GetMaximum();
\r
164 printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");
\r
167 // Multiplicity histogram threshold
\r
168 Double_t maxMulti = h1->GetMaximum();
\r
169 if (maxMulti == 0) {
\r
170 printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");
\r
173 fhACOMulti->SetX1(1);
\r
174 fhACOMulti->SetY1(1);
\r
175 fhACOMulti->SetX2(1);
\r
176 fhACOMulti->SetY2(maxMulti);
\r
177 TPaveText *acoBox=new TPaveText(35,max-0.20*max,55,max,"b");
\r
178 //acoBox->SetFillStyle(0);
\r
179 TPaveText *acoBox1=new TPaveText(35,max-0.20*max,55,max,"b");
\r
180 //acoBox1->SetFillStyle(0);
\r
181 TPaveText *acoBox2=new TPaveText(35,max-0.20*max,55,max,"b");
\r
182 //acoBox2->SetFillStyle(0);
\r
183 Int_t flagACO_DQM = 0;
\r
184 Bool_t isACOOk = kTRUE;
\r
185 Bool_t isACOWarning = kFALSE;
\r
186 for(Int_t iModule=0;iModule<60;iModule++) {
\r
187 if ((h0->GetBinContent(iModule))/max < 0.5) flagACO_DQM++;
\r
189 if (flagACO_DQM < 15) {
\r
190 acoBox->SetFillColor(kGreen);
\r
191 acoBox->SetLineColor(kGreen);
\r
192 acoBox->SetLineWidth(2);
\r
193 //acoBox->SetTextSize(3);
\r
194 //acoBox->SetTextColor(kBlack);
\r
195 acoBox->AddText("FLAG MESSAGE: O.K. !!!");
\r
196 acoBox->AddText("Blue line: mean of hits");
\r
197 acoBox->AddText("Between GREEN lines: ACO. O.K.");
\r
198 h0->GetListOfFunctions()->Add(acoBox);
\r
201 else if (flagACO_DQM > 15 && flagACO_DQM<30) {
\r
202 acoBox1->SetFillColor(kYellow);
\r
203 acoBox1->SetLineColor(kYellow);
\r
204 acoBox1->SetLineWidth(2);
\r
205 //acoBox1->SetTextSize(3);
\r
206 //acoBox1->SetTextColor(kBlack);
\r
207 acoBox1->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");
\r
208 acoBox1->AddText("Blue line: mean of hits");
\r
209 acoBox1->AddText("Between GREEN lines: ACO. O.K.");
\r
210 h0->GetListOfFunctions()->Add(acoBox1);
\r
211 isACOWarning=kTRUE;
\r
213 else if (flagACO_DQM > 30) {
\r
214 acoBox2->SetFillColor(kRed);
\r
215 acoBox2->SetLineColor(kRed);
\r
216 acoBox2->SetLineWidth(2);
\r
217 //acoBox2->SetTextSize(3);
\r
218 //acoBox2->SetTextColor(kBlack);
\r
219 acoBox2->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
220 acoBox2->AddText("Blue line: mean of hits");
\r
221 acoBox2->AddText("Between GREEN lines: ACO. O.K.");
\r
222 h0->GetListOfFunctions()->Add(acoBox2);
\r
227 TPaveText *acoMultiBox = new TPaveText(20,maxMulti-0.20*maxMulti,40,maxMulti,"b");
\r
228 if (h1->Integral()==0 || isACOOk==kFALSE) {
\r
229 acoMultiBox->SetFillColor(kRed);
\r
230 acoMultiBox->SetLineColor(kRed);
\r
231 acoMultiBox->SetLineWidth(2);
\r
232 acoMultiBox->AddText("ACO. Not O.K., Call the experts");
\r
233 h1->GetListOfFunctions()->Add(acoMultiBox);
\r
235 /* if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){
\r
236 acoMultiBox->SetFillColor(kYellow);
\r
237 acoMultiBox->SetLineColor(kYellow);
\r
238 acoMultiBox->SetLineWidth(2);
\r
239 acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");
\r
240 GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);
\r
243 if (isACOOk==kTRUE) {
\r
244 acoMultiBox->SetFillColor(kGreen);
\r
245 acoMultiBox->SetLineColor(kGreen);
\r
246 acoMultiBox->SetLineWidth(2);
\r
247 acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K.");
\r
248 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
249 h1->GetListOfFunctions()->Add(acoMultiBox);
\r
251 if (isACOWarning==kTRUE) {
\r
252 acoMultiBox->SetFillColor(kYellow);
\r
253 acoMultiBox->SetLineColor(kYellow);
\r
254 acoMultiBox->SetLineWidth(2);
\r
255 acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");
\r
256 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
257 h1->GetListOfFunctions()->Add(acoMultiBox);
\r
260 // for AMU ACORDE trigger option
\r
261 TH1* h2 = (TH1*)harr[2];
\r
262 TH1* h3 = (TH1*)harr[3];
\r
263 if (!h2 || !h3) continue;
\r
264 Double_t integral1 = h2->Integral();
\r
265 if (integral1==0) {
\r
266 printf("No entries in ACORDE Hits histograms for trigger class %d --> fatal error, please check !!!\n",itc);
\r
267 TPaveText *acoBoxFatalAMU=new TPaveText(35,0.5,55,1,"b");
\r
268 acoBoxFatalAMU->SetFillColor(kRed);
\r
269 acoBoxFatalAMU->SetLineColor(kRed);
\r
270 acoBoxFatalAMU->SetLineWidth(2);
\r
271 //acoBox2->SetTextSize(3);
\r
272 //acoBox2->SetTextColor(kBlack);
\r
273 acoBoxFatalAMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
274 acoBoxFatalAMU->AddText("Blue line: mean of hits");
\r
275 acoBoxFatalAMU->AddText("Between GREEN lines: ACO. O.K.");
\r
276 h2->GetListOfFunctions()->Add(acoBoxFatalAMU);
\r
278 TPaveText *acoMultiBoxFatalAMU = new TPaveText(20,0.5,40,1,"b");
\r
279 acoMultiBoxFatalAMU->SetFillColor(kRed);
\r
280 acoMultiBoxFatalAMU->SetLineColor(kRed);
\r
281 acoMultiBoxFatalAMU->SetLineWidth(2);
\r
282 acoMultiBoxFatalAMU->AddText("ACO. Not O.K., Call the experts");
\r
283 h3->GetListOfFunctions()->Add(acoMultiBoxFatalAMU);
\r
287 Double_t mean1 = integral1/60;
\r
288 fhACOMeanAMU->SetY1(mean1);
\r
289 fhACOMeanAMU->SetY2(mean1);
\r
290 fhACOMinAMU->SetY1(0.05*mean1);
\r
291 fhACOMinAMU->SetY2(0.05*mean1);
\r
292 fhACOMaxAMU->SetY1(2.25*mean1);
\r
293 fhACOMaxAMU->SetY2(2.25*mean1);
\r
296 Double_t max1 = h2->GetMaximum();
\r
298 printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");
\r
301 // Multiplicity histogram threshold
\r
302 Double_t maxMulti1 = h3->GetMaximum();
\r
303 if (maxMulti1 == 0) {
\r
304 printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");
\r
307 fhACOMultiAMU->SetX1(1);
\r
308 fhACOMultiAMU->SetY1(1);
\r
309 fhACOMultiAMU->SetX2(1);
\r
310 fhACOMultiAMU->SetY2(maxMulti1);
\r
311 TPaveText *acoBoxAMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");
\r
312 //acoBox->SetFillStyle(0);
\r
313 TPaveText *acoBox1AMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");
\r
314 //acoBox1->SetFillStyle(0);
\r
315 TPaveText *acoBox2AMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");
\r
316 //acoBox2->SetFillStyle(0);
\r
317 Int_t flagACO_DQMAMU = 0;
\r
318 Bool_t isACOOkAMU = kTRUE;
\r
319 Bool_t isACOWarningAMU = kFALSE;
\r
320 for(Int_t iModule=0;iModule<60;iModule++) {
\r
321 if ((h2->GetBinContent(iModule))/max1 < 0.5) flagACO_DQMAMU++;
\r
323 if (flagACO_DQMAMU < 15) {
\r
324 acoBoxAMU->SetFillColor(kGreen);
\r
325 acoBoxAMU->SetLineColor(kGreen);
\r
326 acoBoxAMU->SetLineWidth(2);
\r
327 //acoBox->SetTextSize(3);
\r
328 //acoBox->SetTextColor(kBlack);
\r
329 acoBoxAMU->AddText("FLAG MESSAGE: O.K. !!!");
\r
330 acoBoxAMU->AddText("Blue line: mean of hits");
\r
331 acoBoxAMU->AddText("Between GREEN lines: ACO. O.K.");
\r
332 h2->GetListOfFunctions()->Add(acoBoxAMU);
\r
335 else if (flagACO_DQMAMU > 15 && flagACO_DQMAMU<30) {
\r
336 acoBox1AMU->SetFillColor(kYellow);
\r
337 acoBox1AMU->SetLineColor(kYellow);
\r
338 acoBox1AMU->SetLineWidth(2);
\r
339 //acoBox1->SetTextSize(3);
\r
340 //acoBox1->SetTextColor(kBlack);
\r
341 acoBox1AMU->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");
\r
342 acoBox1AMU->AddText("Blue line: mean of hits");
\r
343 acoBox1AMU->AddText("Between GREEN lines: ACO. O.K.");
\r
344 h2->GetListOfFunctions()->Add(acoBox1AMU);
\r
345 isACOWarningAMU=kTRUE;
\r
348 else if (flagACO_DQMAMU > 30) {
\r
349 acoBox2AMU->SetFillColor(kRed);
\r
350 acoBox2AMU->SetLineColor(kRed);
\r
351 acoBox2AMU->SetLineWidth(2);
\r
352 //acoBox2->SetTextSize(3);
\r
353 //acoBox2->SetTextColor(kBlack);
\r
354 acoBox2AMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
355 acoBox2AMU->AddText("Blue line: mean of hits");
\r
356 acoBox2AMU->AddText("Between GREEN lines: ACO. O.K.");
\r
357 h2->GetListOfFunctions()->Add(acoBox2AMU);
\r
361 TPaveText *acoMultiBoxAMU = new TPaveText(20,maxMulti1-0.20*maxMulti1,40,maxMulti1,"b");
\r
362 if (h3->Integral()==0 || isACOOkAMU==kFALSE) {
\r
363 acoMultiBoxAMU->SetFillColor(kRed);
\r
364 acoMultiBoxAMU->SetLineColor(kRed);
\r
365 acoMultiBoxAMU->SetLineWidth(2);
\r
366 acoMultiBoxAMU->AddText("ACO. Not O.K., Call the experts");
\r
367 h3->GetListOfFunctions()->Add(acoMultiBoxAMU);
\r
369 /* if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){
\r
370 acoMultiBox->SetFillColor(kYellow);
\r
371 acoMultiBox->SetLineColor(kYellow);
\r
372 acoMultiBox->SetLineWidth(2);
\r
373 acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");
\r
374 GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);
\r
377 if (isACOOkAMU==kTRUE) {
\r
378 acoMultiBoxAMU->SetFillColor(kGreen);
\r
379 acoMultiBoxAMU->SetLineColor(kGreen);
\r
380 acoMultiBoxAMU->SetLineWidth(2);
\r
381 acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K.");
\r
382 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
383 h3->GetListOfFunctions()->Add(acoMultiBoxAMU);
\r
385 if (isACOWarningAMU==kTRUE) {
\r
386 acoMultiBoxAMU->SetFillColor(kYellow);
\r
387 acoMultiBoxAMU->SetLineColor(kYellow);
\r
388 acoMultiBoxAMU->SetLineWidth(2);
\r
389 acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");
\r
390 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
391 h3->GetListOfFunctions()->Add(acoMultiBoxAMU);
\r
394 // Checks if hits distribution from SL0 and AMU are equal
\r
398 TH1* h4 = (TH1*)harr[4];
\r
400 for (Int_t iModule = 0; iModule < 60; iModule++) {
\r
401 if (h2->GetBinContent(iModule)==0) {
\r
406 eff = h0->GetBinContent(iModule)/h2->GetBinContent(iModule);
\r
407 h4->Fill(iModule,eff);
\r
408 if (eff!=1) effFlag++;
\r
412 if (effFlag == 0) {
\r
413 TPaveText *checkTriggerBox = new TPaveText(20,0.6,40,0.8,"b");
\r
414 checkTriggerBox->SetFillColor(kGreen);
\r
415 checkTriggerBox->SetLineColor(kGreen);
\r
416 checkTriggerBox->SetLineWidth(2);
\r
417 checkTriggerBox->AddText("FLAG MESSAGE: ACO. trigger O.K.");
\r
418 h4->GetListOfFunctions()->Add(checkTriggerBox);
\r
421 TPaveText *checkTriggerBox1 = new TPaveText(20,0.6,40,0.8,"b");
\r
422 checkTriggerBox1->SetFillColor(kYellow);
\r
423 checkTriggerBox1->SetLineColor(kYellow);
\r
424 checkTriggerBox1->SetLineWidth(2);
\r
425 checkTriggerBox1->AddText("FLAG MESSAGE: Warning, please check the ACO trigger configuration");
\r
426 h4->GetListOfFunctions()->Add(checkTriggerBox1);
\r
429 } // end of trigger classes loop
\r
430 } // end specie loop
\r
431 // QA Checker standar (to be updated)
\r
433 AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ;
\r
436 //____________________________________________________________________________
\r
437 void AliACORDEQADataMakerRec::StartOfDetectorCycle()
\r
439 //Detector specific actions at start of cycle
\r
443 //____________________________________________________________________________
\r
444 void AliACORDEQADataMakerRec::InitRaws()
\r
446 // create Raw histograms in Raw subdir
\r
448 const Bool_t expert = kTRUE ;
\r
449 const Bool_t saveCorr = kTRUE ;
\r
450 const Bool_t image = kTRUE ;
\r
452 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
453 "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
\r
454 "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
\r
455 "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
\r
456 "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
\r
457 "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
\r
459 // TH1F *fhACORDEBitPattern[4];
\r
460 //TH1F *fhACORDEBitPatternDQM;
\r
461 // fhACORDEBitPattern[0] = new TH1F("ACORDEBitPatternfromRAWSingle","Distribution of ACORDE fired modules from RAW-Single;Modules;Counts",60,-0.5,59.5);//AcordeSingleMuon BitPattern
\r
462 // fhACORDEBitPattern[1] = new TH1F("ACORDEBitPatternfromRAWMulti","Distribution of ACORDE fired modules from RAW-Multi;Modules;Counts",60,-0.5,59.5);//AcordeMultiMuon BitPattern
\r
463 // 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
464 // 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
465 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
466 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
467 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
468 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
469 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
470 // Expert histograms
\r
471 // for(Int_t i=0;i<4;i++)
\r
472 // Add2RawsList(fhACORDEBitPattern[i],i,expert, !image, !saveCorr);
\r
473 // Check the hits multiplicity from trigger configuration
\r
474 Add2RawsList(fhACORDEBitPatternCheckDQM,4,expert,image,!saveCorr);
\r
475 fhACORDEBitPatternCheckDQM->SetFillColor(kOrange);
\r
476 // AMORE diplay settings for shifter on GUI
\r
478 // For SL0 ACO trigger mode
\r
480 Add2RawsList(fhACORDEBitPatternDQM,0,!expert,image,!saveCorr);
\r
481 ForbidCloning(fhACORDEBitPatternDQM);
\r
482 Add2RawsList(fhACORDEMultiplicitySL0DQM,1,!expert,image,!saveCorr);
\r
483 ForbidCloning(fhACORDEMultiplicitySL0DQM);
\r
484 // For Hits distribution on ACORDE
\r
486 fhACORDEBitPatternDQM->SetFillColor(kCyan-7);
\r
487 fhACOMean->SetLineColor(kBlue);
\r
488 fhACOMean->SetLineStyle(2);
\r
489 fhACOMean->SetLineWidth(4);
\r
490 fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMean);
\r
491 fhACOMin->SetLineColor(kGreen);
\r
492 fhACOMin->SetLineStyle(2);
\r
493 fhACOMin->SetLineWidth(4);
\r
494 fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMin);
\r
495 fhACOMax->SetLineColor(kGreen);
\r
496 fhACOMax->SetLineStyle(2);
\r
497 fhACOMax->SetLineWidth(4);
\r
498 fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMax);
\r
500 // For ACORDE Multiplicity distribution of fired modules
\r
502 fhACORDEMultiplicitySL0DQM->SetFillColor(kBlue+1);
\r
503 fhACOMulti->SetLineColor(kMagenta);
\r
504 fhACOMulti->SetLineStyle(2);
\r
505 fhACOMulti->SetLineWidth(4);
\r
506 fhACORDEMultiplicitySL0DQM->GetListOfFunctions()->Add(fhACOMulti);
\r
508 // For AMU ACO trigger mode
\r
510 Add2RawsList(fhACORDEBitPatternAMUDQM,2,!expert,image,!saveCorr);
\r
511 Add2RawsList(fhACORDEMultiplicityAMUDQM,3,!expert,image,!saveCorr);
\r
513 // For Hits distribution on ACORDE
\r
515 fhACORDEBitPatternAMUDQM->SetFillColor(kCyan-7);
\r
516 fhACOMeanAMU->SetLineColor(kBlue);
\r
517 fhACOMeanAMU->SetLineStyle(2);
\r
518 fhACOMeanAMU->SetLineWidth(4);
\r
519 fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMeanAMU);
\r
520 fhACOMinAMU->SetLineColor(kGreen);
\r
521 fhACOMinAMU->SetLineStyle(2);
\r
522 fhACOMinAMU->SetLineWidth(4);
\r
523 fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMinAMU);
\r
524 fhACOMaxAMU->SetLineColor(kGreen);
\r
525 fhACOMaxAMU->SetLineStyle(2);
\r
526 fhACOMaxAMU->SetLineWidth(4);
\r
527 fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMaxAMU);
\r
529 // For ACORDE Multiplicity distribution of fired modules
\r
531 fhACORDEMultiplicityAMUDQM->SetFillColor(kBlue+1);
\r
532 fhACOMultiAMU->SetLineColor(kMagenta);
\r
533 fhACOMultiAMU->SetLineStyle(2);
\r
534 fhACOMultiAMU->SetLineWidth(4);
\r
535 fhACORDEMultiplicityAMUDQM->GetListOfFunctions()->Add(fhACOMultiAMU);
\r
538 for (Int_t iModule = 0; iModule<60; iModule++)
\r
540 fhACORDEBitPattern[0]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);
\r
541 fhACORDEBitPattern[1]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);
\r
545 ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line
\r
548 //____________________________________________________________________________
\r
549 void AliACORDEQADataMakerRec::InitDigits()
\r
551 // create Digits histograms in Digits subdir
\r
553 const Bool_t expert = kTRUE ;
\r
554 const Bool_t image = kTRUE ;
\r
555 TH1F * fhDigitsModule;
\r
556 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
557 "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
\r
558 "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
\r
559 "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
\r
560 "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
\r
561 "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
\r
564 fhDigitsModule = new TH1F("ACORDEBitPatternfromDigits","Distribution of ACORDE from DIGITS;Modules;Counts",60,1,60);
\r
565 Add2DigitsList(fhDigitsModule,0,!expert,image);
\r
566 for (Int_t i=0;i<60;i++) fhDigitsModule->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
\r
568 ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
\r
571 //____________________________________________________________________________
\r
573 void AliACORDEQADataMakerRec::InitRecPoints()
\r
575 // create cluster histograms in RecPoint subdir
\r
576 // Not needed for ACORDE by now !!!
\r
578 ClonePerTrigClass(AliQAv1::kRECPOINTS); // this should be the last line
\r
581 //____________________________________________________________________________
\r
582 void AliACORDEQADataMakerRec::InitESDs()
\r
584 //create ESDs histograms in ESDs subdir
\r
586 const Bool_t expert = kTRUE ;
\r
587 const Bool_t image = kTRUE ;
\r
589 TH1F * fhESDsSingle;
\r
590 TH1F * fhESDsMulti;
\r
591 TH1F * fhESDsMultiplicity;
\r
592 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
593 "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
\r
594 "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
\r
595 "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
\r
596 "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
\r
597 "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
\r
600 fhESDsSingle = new TH1F("ACORDEBitPatternfromESDsSingle","Distribution of ACORDE fired modules from ESDs-Single;Modules;Counts",60,1,60);
\r
601 Add2ESDsList(fhESDsSingle,0,!expert,image);
\r
603 fhESDsMulti = new TH1F("ACORDEBitPatternfromESDsMulti","Distribution of ACORDE fired modules from ESDs-Multi;Modules;Counts",60,1,60);
\r
604 Add2ESDsList(fhESDsMulti,1,!expert,image);
\r
606 fhESDsMultiplicity = new TH1F("ACORDEMultiplicityfromESD","Number of fired ACORDE modules; No. of fired ACORDE modules;No. of events in ACORDE",60,-0.5,60);
\r
607 Add2ESDsList(fhESDsMultiplicity,2,!expert,image);
\r
608 for (Int_t i=0;i<60;i++)
\r
610 fhESDsSingle->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
\r
611 fhESDsMulti->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
\r
614 ClonePerTrigClass(AliQAv1::kESDS); // this should be the last line
\r
616 //____________________________________________________________________________
\r
617 void AliACORDEQADataMakerRec::MakeRaws(AliRawReader* rawReader)
\r
619 //fills QA histos for RAW
\r
620 IncEvCountCycleRaws();
\r
621 IncEvCountTotalRaws();
\r
622 rawReader->Reset();
\r
623 AliACORDERawStream rawStream(rawReader);
\r
624 size_t contSingle=0;
\r
625 size_t contMulti=0;
\r
628 bool kroSingle[60],kroMulti[60];
\r
631 for(Int_t m=0;m<60;m++) {kroSingle[m]=0;kroMulti[m]=0;}
\r
633 if(rawStream.Next())
\r
635 dy[0]=rawStream.GetWord(0);
\r
636 dy[1]=rawStream.GetWord(1);
\r
637 dy[2]=rawStream.GetWord(2);
\r
638 dy[3]=rawStream.GetWord(3);
\r
640 for(Int_t r=0;r<30;r++)
\r
642 kroSingle[r] = tmpDy & 1;
\r
646 for(Int_t r=30;r<60;r++)
\r
648 kroSingle[r] = tmpDy & 1;
\r
652 for(Int_t r=0;r<30;r++)
\r
654 kroMulti[r] = tmpDy & 1;
\r
658 for(Int_t r=30;r<60;r++)
\r
660 kroMulti[r] = tmpDy & 1;
\r
665 for(Int_t r=0;r<60;r++)
\r
667 if(kroSingle[r]==1)
\r
670 //FillRawsData(4,r);
\r
676 //FillRawsData(6,r);
\r
681 FillRawsData(1,contSingle);
\r
682 FillRawsData(3,contMulti);
\r
683 // FillRawsData(7,contMulti);
\r
686 //____________________________________________________________________________
\r
687 void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree)
\r
689 //fills QA histos for Digits
\r
690 IncEvCountCycleDigits();
\r
691 IncEvCountTotalDigits();
\r
694 fDigitsArray->Clear() ;
\r
696 fDigitsArray = new TClonesArray("AliACORDEdigit",1000);
\r
697 TBranch * branch = digitsTree->GetBranch("ACORDEdigit");
\r
699 AliWarning("ACORDE branch in Digits Tree not found");
\r
701 branch->SetAddress(&fDigitsArray);
\r
702 for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
\r
703 branch->GetEntry(track);
\r
704 for(Int_t idigit = 0 ; idigit < fDigitsArray->GetEntriesFast() ; idigit++) {
\r
705 AliACORDEdigit *AcoDigit = (AliACORDEdigit*) fDigitsArray->UncheckedAt(idigit);
\r
707 AliError("The unchecked digit doesn't exist");
\r
710 FillDigitsData(0,AcoDigit->GetModule()-1);
\r
716 //____________________________________________________________________________
\r
717 void AliACORDEQADataMakerRec::MakeESDs(AliESDEvent * esd)
\r
719 //fills QA histos for ESD
\r
720 IncEvCountCycleESDs();
\r
721 IncEvCountTotalESDs();
\r
723 AliESDACORDE * fESDACORDE= esd->GetACORDEData();
\r
725 for(int i=0;i<60;i++)
\r
727 if(fESDACORDE->GetHitChannel(i))
\r
729 FillESDsData(0,i+1);
\r
730 FillESDsData(1,i+1);
\r
733 } FillESDsData(2,acoMulti);
\r