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 * parr = GetRawsDataOfTrigClass(itc);
\r
121 if (!parr) continue;
\r
122 TObjArray &harr = *parr;
\r
124 TH1* h0 = (TH1*)harr[0];
\r
125 TH1* h1 = (TH1*)harr[1];
\r
126 if (!h0 || !h1) continue;
\r
127 double integral = 0;
\r
128 if (itc==-1 && !(integral=h0->Integral())) { // default clone
\r
129 printf("No entries in ACORDE Hits histograms for trigger class %d, fatal error, please check !!!\n",itc);
\r
130 TPaveText *acoBoxFatal=new TPaveText(35,0.5,55,1,"b");
\r
131 acoBoxFatal->SetFillColor(kRed);
\r
132 acoBoxFatal->SetLineColor(kRed);
\r
133 acoBoxFatal->SetLineWidth(2);
\r
134 //acoBox2->SetTextSize(3);
\r
135 //acoBox2->SetTextColor(kBlack);
\r
136 acoBoxFatal->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
137 acoBoxFatal->AddText("Blue line: mean of hits");
\r
138 acoBoxFatal->AddText("Between GREEN lines: ACO. O.K.");
\r
139 h0->GetListOfFunctions()->Add(acoBoxFatal);
\r
141 TPaveText *acoMultiBoxFatal = new TPaveText(20,0.5,40,1,"b");
\r
142 acoMultiBoxFatal->SetFillColor(kRed);
\r
143 acoMultiBoxFatal->SetLineColor(kRed);
\r
144 acoMultiBoxFatal->SetLineWidth(2);
\r
145 acoMultiBoxFatal->AddText("ACO. Not O.K., Call the experts");
\r
146 h1->GetListOfFunctions()->Add(acoMultiBoxFatal);
\r
149 Double_t mean = integral/60;
\r
150 fhACOMean->SetY1(mean);
\r
151 fhACOMean->SetY2(mean);
\r
152 fhACOMin->SetY1(0.05*mean);
\r
153 fhACOMin->SetY2(0.05*mean);
\r
154 fhACOMax->SetY1(2.25*mean);
\r
155 fhACOMax->SetY2(2.25*mean);
\r
158 Double_t max = h0->GetMaximum();
\r
160 printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");
\r
163 // Multiplicity histogram threshold
\r
164 Double_t maxMulti = h1->GetMaximum();
\r
165 if (maxMulti == 0) {
\r
166 printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");
\r
169 fhACOMulti->SetX1(1);
\r
170 fhACOMulti->SetY1(1);
\r
171 fhACOMulti->SetX2(1);
\r
172 fhACOMulti->SetY2(maxMulti);
\r
173 TPaveText *acoBox=new TPaveText(35,max-0.20*max,55,max,"b");
\r
174 //acoBox->SetFillStyle(0);
\r
175 TPaveText *acoBox1=new TPaveText(35,max-0.20*max,55,max,"b");
\r
176 //acoBox1->SetFillStyle(0);
\r
177 TPaveText *acoBox2=new TPaveText(35,max-0.20*max,55,max,"b");
\r
178 //acoBox2->SetFillStyle(0);
\r
179 Int_t flagACO_DQM = 0;
\r
180 Bool_t isACOOk = kTRUE;
\r
181 Bool_t isACOWarning = kFALSE;
\r
182 for(Int_t iModule=0;iModule<60;iModule++) {
\r
183 if ((h0->GetBinContent(iModule))/max < 0.5) flagACO_DQM++;
\r
185 if (flagACO_DQM < 15) {
\r
186 acoBox->SetFillColor(kGreen);
\r
187 acoBox->SetLineColor(kGreen);
\r
188 acoBox->SetLineWidth(2);
\r
189 //acoBox->SetTextSize(3);
\r
190 //acoBox->SetTextColor(kBlack);
\r
191 acoBox->AddText("FLAG MESSAGE: O.K. !!!");
\r
192 acoBox->AddText("Blue line: mean of hits");
\r
193 acoBox->AddText("Between GREEN lines: ACO. O.K.");
\r
194 h0->GetListOfFunctions()->Add(acoBox);
\r
197 else if (flagACO_DQM > 15 && flagACO_DQM<30) {
\r
198 acoBox1->SetFillColor(kYellow);
\r
199 acoBox1->SetLineColor(kYellow);
\r
200 acoBox1->SetLineWidth(2);
\r
201 //acoBox1->SetTextSize(3);
\r
202 //acoBox1->SetTextColor(kBlack);
\r
203 acoBox1->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");
\r
204 acoBox1->AddText("Blue line: mean of hits");
\r
205 acoBox1->AddText("Between GREEN lines: ACO. O.K.");
\r
206 h0->GetListOfFunctions()->Add(acoBox1);
\r
207 isACOWarning=kTRUE;
\r
209 else if (flagACO_DQM > 30) {
\r
210 acoBox2->SetFillColor(kRed);
\r
211 acoBox2->SetLineColor(kRed);
\r
212 acoBox2->SetLineWidth(2);
\r
213 //acoBox2->SetTextSize(3);
\r
214 //acoBox2->SetTextColor(kBlack);
\r
215 acoBox2->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
216 acoBox2->AddText("Blue line: mean of hits");
\r
217 acoBox2->AddText("Between GREEN lines: ACO. O.K.");
\r
218 h0->GetListOfFunctions()->Add(acoBox2);
\r
223 TPaveText *acoMultiBox = new TPaveText(20,maxMulti-0.20*maxMulti,40,maxMulti,"b");
\r
224 if (h1->Integral()==0 || isACOOk==kFALSE) {
\r
225 acoMultiBox->SetFillColor(kRed);
\r
226 acoMultiBox->SetLineColor(kRed);
\r
227 acoMultiBox->SetLineWidth(2);
\r
228 acoMultiBox->AddText("ACO. Not O.K., Call the experts");
\r
229 h1->GetListOfFunctions()->Add(acoMultiBox);
\r
231 /* if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){
\r
232 acoMultiBox->SetFillColor(kYellow);
\r
233 acoMultiBox->SetLineColor(kYellow);
\r
234 acoMultiBox->SetLineWidth(2);
\r
235 acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");
\r
236 GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);
\r
239 if (isACOOk==kTRUE) {
\r
240 acoMultiBox->SetFillColor(kGreen);
\r
241 acoMultiBox->SetLineColor(kGreen);
\r
242 acoMultiBox->SetLineWidth(2);
\r
243 acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K.");
\r
244 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
245 h1->GetListOfFunctions()->Add(acoMultiBox);
\r
247 if (isACOWarning==kTRUE) {
\r
248 acoMultiBox->SetFillColor(kYellow);
\r
249 acoMultiBox->SetLineColor(kYellow);
\r
250 acoMultiBox->SetLineWidth(2);
\r
251 acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");
\r
252 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
253 h1->GetListOfFunctions()->Add(acoMultiBox);
\r
256 // for AMU ACORDE trigger option
\r
257 TH1* h2 = (TH1*)harr[2];
\r
258 TH1* h3 = (TH1*)harr[3];
\r
259 if (!h2 || !h3) continue;
\r
260 Double_t integral1 = h2->Integral();
\r
261 if (integral1==0) {
\r
262 printf("No entries in ACORDE Hits histograms for trigger class %d --> fatal error, please check !!!\n",itc);
\r
263 TPaveText *acoBoxFatalAMU=new TPaveText(35,0.5,55,1,"b");
\r
264 acoBoxFatalAMU->SetFillColor(kRed);
\r
265 acoBoxFatalAMU->SetLineColor(kRed);
\r
266 acoBoxFatalAMU->SetLineWidth(2);
\r
267 //acoBox2->SetTextSize(3);
\r
268 //acoBox2->SetTextColor(kBlack);
\r
269 acoBoxFatalAMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
270 acoBoxFatalAMU->AddText("Blue line: mean of hits");
\r
271 acoBoxFatalAMU->AddText("Between GREEN lines: ACO. O.K.");
\r
272 h2->GetListOfFunctions()->Add(acoBoxFatalAMU);
\r
274 TPaveText *acoMultiBoxFatalAMU = new TPaveText(20,0.5,40,1,"b");
\r
275 acoMultiBoxFatalAMU->SetFillColor(kRed);
\r
276 acoMultiBoxFatalAMU->SetLineColor(kRed);
\r
277 acoMultiBoxFatalAMU->SetLineWidth(2);
\r
278 acoMultiBoxFatalAMU->AddText("ACO. Not O.K., Call the experts");
\r
279 h3->GetListOfFunctions()->Add(acoMultiBoxFatalAMU);
\r
283 Double_t mean1 = integral1/60;
\r
284 fhACOMeanAMU->SetY1(mean1);
\r
285 fhACOMeanAMU->SetY2(mean1);
\r
286 fhACOMinAMU->SetY1(0.05*mean1);
\r
287 fhACOMinAMU->SetY2(0.05*mean1);
\r
288 fhACOMaxAMU->SetY1(2.25*mean1);
\r
289 fhACOMaxAMU->SetY2(2.25*mean1);
\r
292 Double_t max1 = h2->GetMaximum();
\r
294 printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");
\r
297 // Multiplicity histogram threshold
\r
298 Double_t maxMulti1 = h3->GetMaximum();
\r
299 if (maxMulti1 == 0) {
\r
300 printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");
\r
303 fhACOMultiAMU->SetX1(1);
\r
304 fhACOMultiAMU->SetY1(1);
\r
305 fhACOMultiAMU->SetX2(1);
\r
306 fhACOMultiAMU->SetY2(maxMulti1);
\r
307 TPaveText *acoBoxAMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");
\r
308 //acoBox->SetFillStyle(0);
\r
309 TPaveText *acoBox1AMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");
\r
310 //acoBox1->SetFillStyle(0);
\r
311 TPaveText *acoBox2AMU=new TPaveText(35,max1-0.20*max1,55,max1,"b");
\r
312 //acoBox2->SetFillStyle(0);
\r
313 Int_t flagACO_DQMAMU = 0;
\r
314 Bool_t isACOOkAMU = kTRUE;
\r
315 Bool_t isACOWarningAMU = kFALSE;
\r
316 for(Int_t iModule=0;iModule<60;iModule++) {
\r
317 if ((h2->GetBinContent(iModule))/max1 < 0.5) flagACO_DQMAMU++;
\r
319 if (flagACO_DQMAMU < 15) {
\r
320 acoBoxAMU->SetFillColor(kGreen);
\r
321 acoBoxAMU->SetLineColor(kGreen);
\r
322 acoBoxAMU->SetLineWidth(2);
\r
323 //acoBox->SetTextSize(3);
\r
324 //acoBox->SetTextColor(kBlack);
\r
325 acoBoxAMU->AddText("FLAG MESSAGE: O.K. !!!");
\r
326 acoBoxAMU->AddText("Blue line: mean of hits");
\r
327 acoBoxAMU->AddText("Between GREEN lines: ACO. O.K.");
\r
328 h2->GetListOfFunctions()->Add(acoBoxAMU);
\r
331 else if (flagACO_DQMAMU > 15 && flagACO_DQMAMU<30) {
\r
332 acoBox1AMU->SetFillColor(kYellow);
\r
333 acoBox1AMU->SetLineColor(kYellow);
\r
334 acoBox1AMU->SetLineWidth(2);
\r
335 //acoBox1->SetTextSize(3);
\r
336 //acoBox1->SetTextColor(kBlack);
\r
337 acoBox1AMU->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");
\r
338 acoBox1AMU->AddText("Blue line: mean of hits");
\r
339 acoBox1AMU->AddText("Between GREEN lines: ACO. O.K.");
\r
340 h2->GetListOfFunctions()->Add(acoBox1AMU);
\r
341 isACOWarningAMU=kTRUE;
\r
344 else if (flagACO_DQMAMU > 30) {
\r
345 acoBox2AMU->SetFillColor(kRed);
\r
346 acoBox2AMU->SetLineColor(kRed);
\r
347 acoBox2AMU->SetLineWidth(2);
\r
348 //acoBox2->SetTextSize(3);
\r
349 //acoBox2->SetTextColor(kBlack);
\r
350 acoBox2AMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
351 acoBox2AMU->AddText("Blue line: mean of hits");
\r
352 acoBox2AMU->AddText("Between GREEN lines: ACO. O.K.");
\r
353 h2->GetListOfFunctions()->Add(acoBox2AMU);
\r
357 TPaveText *acoMultiBoxAMU = new TPaveText(20,maxMulti1-0.20*maxMulti1,40,maxMulti1,"b");
\r
358 if (h3->Integral()==0 || isACOOkAMU==kFALSE) {
\r
359 acoMultiBoxAMU->SetFillColor(kRed);
\r
360 acoMultiBoxAMU->SetLineColor(kRed);
\r
361 acoMultiBoxAMU->SetLineWidth(2);
\r
362 acoMultiBoxAMU->AddText("ACO. Not O.K., Call the experts");
\r
363 h3->GetListOfFunctions()->Add(acoMultiBoxAMU);
\r
365 /* if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){
\r
366 acoMultiBox->SetFillColor(kYellow);
\r
367 acoMultiBox->SetLineColor(kYellow);
\r
368 acoMultiBox->SetLineWidth(2);
\r
369 acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");
\r
370 GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);
\r
373 if (isACOOkAMU==kTRUE) {
\r
374 acoMultiBoxAMU->SetFillColor(kGreen);
\r
375 acoMultiBoxAMU->SetLineColor(kGreen);
\r
376 acoMultiBoxAMU->SetLineWidth(2);
\r
377 acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K.");
\r
378 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
379 h3->GetListOfFunctions()->Add(acoMultiBoxAMU);
\r
381 if (isACOWarningAMU==kTRUE) {
\r
382 acoMultiBoxAMU->SetFillColor(kYellow);
\r
383 acoMultiBoxAMU->SetLineColor(kYellow);
\r
384 acoMultiBoxAMU->SetLineWidth(2);
\r
385 acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");
\r
386 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
387 h3->GetListOfFunctions()->Add(acoMultiBoxAMU);
\r
390 // Checks if hits distribution from SL0 and AMU are equal
\r
394 TH1* h4 = (TH1*)harr[4];
\r
396 for (Int_t iModule = 0; iModule < 60; iModule++) {
\r
397 if (h2->GetBinContent(iModule)==0) {
\r
402 eff = h0->GetBinContent(iModule)/h2->GetBinContent(iModule);
\r
403 h4->Fill(iModule,eff);
\r
404 if (eff!=1) effFlag++;
\r
408 if (effFlag == 0) {
\r
409 TPaveText *checkTriggerBox = new TPaveText(20,0.6,40,0.8,"b");
\r
410 checkTriggerBox->SetFillColor(kGreen);
\r
411 checkTriggerBox->SetLineColor(kGreen);
\r
412 checkTriggerBox->SetLineWidth(2);
\r
413 checkTriggerBox->AddText("FLAG MESSAGE: ACO. trigger O.K.");
\r
414 h4->GetListOfFunctions()->Add(checkTriggerBox);
\r
417 TPaveText *checkTriggerBox1 = new TPaveText(20,0.6,40,0.8,"b");
\r
418 checkTriggerBox1->SetFillColor(kYellow);
\r
419 checkTriggerBox1->SetLineColor(kYellow);
\r
420 checkTriggerBox1->SetLineWidth(2);
\r
421 checkTriggerBox1->AddText("FLAG MESSAGE: Warning, please check the ACO trigger configuration");
\r
422 h4->GetListOfFunctions()->Add(checkTriggerBox1);
\r
425 } // end of trigger classes loop
\r
426 } // end specie loop
\r
427 // QA Checker standar (to be updated)
\r
429 AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ;
\r
432 //____________________________________________________________________________
\r
433 void AliACORDEQADataMakerRec::StartOfDetectorCycle()
\r
435 //Detector specific actions at start of cycle
\r
439 //____________________________________________________________________________
\r
440 void AliACORDEQADataMakerRec::InitRaws()
\r
442 // create Raw histograms in Raw subdir
\r
444 const Bool_t expert = kTRUE ;
\r
445 const Bool_t saveCorr = kTRUE ;
\r
446 const Bool_t image = kTRUE ;
\r
448 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
449 "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
\r
450 "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
\r
451 "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
\r
452 "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
\r
453 "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
\r
455 // TH1F *fhACORDEBitPattern[4];
\r
456 //TH1F *fhACORDEBitPatternDQM;
\r
457 // fhACORDEBitPattern[0] = new TH1F("ACORDEBitPatternfromRAWSingle","Distribution of ACORDE fired modules from RAW-Single;Modules;Counts",60,-0.5,59.5);//AcordeSingleMuon BitPattern
\r
458 // fhACORDEBitPattern[1] = new TH1F("ACORDEBitPatternfromRAWMulti","Distribution of ACORDE fired modules from RAW-Multi;Modules;Counts",60,-0.5,59.5);//AcordeMultiMuon BitPattern
\r
459 // 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
460 // 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
461 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
462 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
463 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
464 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
465 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
466 // Expert histograms
\r
467 // for(Int_t i=0;i<4;i++)
\r
468 // Add2RawsList(fhACORDEBitPattern[i],i,expert, !image, !saveCorr);
\r
469 // Check the hits multiplicity from trigger configuration
\r
470 Add2RawsList(fhACORDEBitPatternCheckDQM,4,expert,image,!saveCorr);
\r
471 fhACORDEBitPatternCheckDQM->SetFillColor(kOrange);
\r
472 // AMORE diplay settings for shifter on GUI
\r
474 // For SL0 ACO trigger mode
\r
476 Add2RawsList(fhACORDEBitPatternDQM,0,!expert,image,!saveCorr);
\r
477 ForbidCloning(fhACORDEBitPatternDQM);
\r
478 Add2RawsList(fhACORDEMultiplicitySL0DQM,1,!expert,image,!saveCorr);
\r
479 ForbidCloning(fhACORDEMultiplicitySL0DQM);
\r
480 // For Hits distribution on ACORDE
\r
482 fhACORDEBitPatternDQM->SetFillColor(kCyan-7);
\r
483 fhACOMean->SetLineColor(kBlue);
\r
484 fhACOMean->SetLineStyle(2);
\r
485 fhACOMean->SetLineWidth(4);
\r
486 fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMean);
\r
487 fhACOMin->SetLineColor(kGreen);
\r
488 fhACOMin->SetLineStyle(2);
\r
489 fhACOMin->SetLineWidth(4);
\r
490 fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMin);
\r
491 fhACOMax->SetLineColor(kGreen);
\r
492 fhACOMax->SetLineStyle(2);
\r
493 fhACOMax->SetLineWidth(4);
\r
494 fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMax);
\r
496 // For ACORDE Multiplicity distribution of fired modules
\r
498 fhACORDEMultiplicitySL0DQM->SetFillColor(kBlue+1);
\r
499 fhACOMulti->SetLineColor(kMagenta);
\r
500 fhACOMulti->SetLineStyle(2);
\r
501 fhACOMulti->SetLineWidth(4);
\r
502 fhACORDEMultiplicitySL0DQM->GetListOfFunctions()->Add(fhACOMulti);
\r
504 // For AMU ACO trigger mode
\r
506 Add2RawsList(fhACORDEBitPatternAMUDQM,2,!expert,image,!saveCorr);
\r
507 Add2RawsList(fhACORDEMultiplicityAMUDQM,3,!expert,image,!saveCorr);
\r
509 // For Hits distribution on ACORDE
\r
511 fhACORDEBitPatternAMUDQM->SetFillColor(kCyan-7);
\r
512 fhACOMeanAMU->SetLineColor(kBlue);
\r
513 fhACOMeanAMU->SetLineStyle(2);
\r
514 fhACOMeanAMU->SetLineWidth(4);
\r
515 fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMeanAMU);
\r
516 fhACOMinAMU->SetLineColor(kGreen);
\r
517 fhACOMinAMU->SetLineStyle(2);
\r
518 fhACOMinAMU->SetLineWidth(4);
\r
519 fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMinAMU);
\r
520 fhACOMaxAMU->SetLineColor(kGreen);
\r
521 fhACOMaxAMU->SetLineStyle(2);
\r
522 fhACOMaxAMU->SetLineWidth(4);
\r
523 fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMaxAMU);
\r
525 // For ACORDE Multiplicity distribution of fired modules
\r
527 fhACORDEMultiplicityAMUDQM->SetFillColor(kBlue+1);
\r
528 fhACOMultiAMU->SetLineColor(kMagenta);
\r
529 fhACOMultiAMU->SetLineStyle(2);
\r
530 fhACOMultiAMU->SetLineWidth(4);
\r
531 fhACORDEMultiplicityAMUDQM->GetListOfFunctions()->Add(fhACOMultiAMU);
\r
534 for (Int_t iModule = 0; iModule<60; iModule++)
\r
536 fhACORDEBitPattern[0]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);
\r
537 fhACORDEBitPattern[1]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);
\r
541 ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line
\r
544 //____________________________________________________________________________
\r
545 void AliACORDEQADataMakerRec::InitDigits()
\r
547 // create Digits histograms in Digits subdir
\r
549 const Bool_t expert = kTRUE ;
\r
550 const Bool_t image = kTRUE ;
\r
551 TH1F * fhDigitsModule;
\r
552 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
553 "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
\r
554 "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
\r
555 "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
\r
556 "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
\r
557 "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
\r
560 fhDigitsModule = new TH1F("ACORDEBitPatternfromDigits","Distribution of ACORDE from DIGITS;Modules;Counts",60,1,60);
\r
561 Add2DigitsList(fhDigitsModule,0,!expert,image);
\r
562 for (Int_t i=0;i<60;i++) fhDigitsModule->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
\r
564 ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
\r
567 //____________________________________________________________________________
\r
569 void AliACORDEQADataMakerRec::InitRecPoints()
\r
571 // create cluster histograms in RecPoint subdir
\r
572 // Not needed for ACORDE by now !!!
\r
574 ClonePerTrigClass(AliQAv1::kRECPOINTS); // this should be the last line
\r
577 //____________________________________________________________________________
\r
578 void AliACORDEQADataMakerRec::InitESDs()
\r
580 //create ESDs histograms in ESDs subdir
\r
582 const Bool_t expert = kTRUE ;
\r
583 const Bool_t image = kTRUE ;
\r
585 TH1F * fhESDsSingle;
\r
586 TH1F * fhESDsMulti;
\r
587 TH1F * fhESDsMultiplicity;
\r
588 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
589 "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
\r
590 "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
\r
591 "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
\r
592 "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
\r
593 "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
\r
596 fhESDsSingle = new TH1F("ACORDEBitPatternfromESDsSingle","Distribution of ACORDE fired modules from ESDs-Single;Modules;Counts",60,1,60);
\r
597 Add2ESDsList(fhESDsSingle,0,!expert,image);
\r
599 fhESDsMulti = new TH1F("ACORDEBitPatternfromESDsMulti","Distribution of ACORDE fired modules from ESDs-Multi;Modules;Counts",60,1,60);
\r
600 Add2ESDsList(fhESDsMulti,1,!expert,image);
\r
602 fhESDsMultiplicity = new TH1F("ACORDEMultiplicityfromESD","Number of fired ACORDE modules; No. of fired ACORDE modules;No. of events in ACORDE",60,-0.5,60);
\r
603 Add2ESDsList(fhESDsMultiplicity,2,!expert,image);
\r
604 for (Int_t i=0;i<60;i++)
\r
606 fhESDsSingle->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
\r
607 fhESDsMulti->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
\r
610 ClonePerTrigClass(AliQAv1::kESDS); // this should be the last line
\r
612 //____________________________________________________________________________
\r
613 void AliACORDEQADataMakerRec::MakeRaws(AliRawReader* rawReader)
\r
615 //fills QA histos for RAW
\r
616 IncEvCountCycleRaws();
\r
617 IncEvCountTotalRaws();
\r
618 rawReader->Reset();
\r
619 AliACORDERawStream rawStream(rawReader);
\r
620 size_t contSingle=0;
\r
621 size_t contMulti=0;
\r
624 bool kroSingle[60],kroMulti[60];
\r
627 for(Int_t m=0;m<60;m++) {kroSingle[m]=0;kroMulti[m]=0;}
\r
629 if(rawStream.Next())
\r
631 dy[0]=rawStream.GetWord(0);
\r
632 dy[1]=rawStream.GetWord(1);
\r
633 dy[2]=rawStream.GetWord(2);
\r
634 dy[3]=rawStream.GetWord(3);
\r
636 for(Int_t r=0;r<30;r++)
\r
638 kroSingle[r] = tmpDy & 1;
\r
642 for(Int_t r=30;r<60;r++)
\r
644 kroSingle[r] = tmpDy & 1;
\r
648 for(Int_t r=0;r<30;r++)
\r
650 kroMulti[r] = tmpDy & 1;
\r
654 for(Int_t r=30;r<60;r++)
\r
656 kroMulti[r] = tmpDy & 1;
\r
661 for(Int_t r=0;r<60;r++)
\r
663 if(kroSingle[r]==1)
\r
666 //FillRawsData(4,r);
\r
672 //FillRawsData(6,r);
\r
677 FillRawsData(3,contSingle);
\r
678 // FillRawsData(7,contMulti);
\r
681 //____________________________________________________________________________
\r
682 void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree)
\r
684 //fills QA histos for Digits
\r
685 IncEvCountCycleDigits();
\r
686 IncEvCountTotalDigits();
\r
689 fDigitsArray->Clear() ;
\r
691 fDigitsArray = new TClonesArray("AliACORDEdigit",1000);
\r
692 TBranch * branch = digitsTree->GetBranch("ACORDEdigit");
\r
694 AliWarning("ACORDE branch in Digits Tree not found");
\r
696 branch->SetAddress(&fDigitsArray);
\r
697 for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
\r
698 branch->GetEntry(track);
\r
699 for(Int_t idigit = 0 ; idigit < fDigitsArray->GetEntriesFast() ; idigit++) {
\r
700 AliACORDEdigit *AcoDigit = (AliACORDEdigit*) fDigitsArray->UncheckedAt(idigit);
\r
702 AliError("The unchecked digit doesn't exist");
\r
705 FillDigitsData(0,AcoDigit->GetModule()-1);
\r
711 //____________________________________________________________________________
\r
712 void AliACORDEQADataMakerRec::MakeESDs(AliESDEvent * esd)
\r
714 //fills QA histos for ESD
\r
715 IncEvCountCycleESDs();
\r
716 IncEvCountTotalESDs();
\r
718 AliESDACORDE * fESDACORDE= esd->GetACORDEData();
\r
720 for(int i=0;i<60;i++)
\r
722 if(fESDACORDE->GetHitChannel(i))
\r
724 FillESDsData(0,i+1);
\r
725 FillESDsData(1,i+1);
\r
728 } FillESDsData(2,acoMulti);
\r