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 and QA-shifter histograms also with threshold lines and visual alarm
\r
29 // Last Update: Aug. 27th 2008 --> Implementation to declare QA expert histogram
\r
30 // Last update: Nov. 14t 2009 --> MRC <mrodrigu@mail.cern.ch> (FCFM-BUAP)
\r
31 // |--> Change in Multiplicity histogram for AMORE (to detect empty triggers events of ACORDE)
\r
35 // --- ROOT system ---
\r
36 #include <TClonesArray.h>
\r
39 #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):AliQADataMakerRec(),
\r
71 fhACOMean(qadm.fhACOMean),
\r
72 fhACOMin(qadm.fhACOMin),
\r
73 fhACOMax(qadm.fhACOMax),
\r
74 fhACOMulti(qadm.fhACOMulti),
\r
75 fhACOMeanAMU(qadm.fhACOMeanAMU),
\r
76 fhACOMinAMU(qadm.fhACOMinAMU),
\r
77 fhACOMaxAMU(qadm.fhACOMaxAMU),
\r
78 fhACOMultiAMU(qadm.fhACOMultiAMU),
\r
79 fhACOTriggerCheck(qadm.fhACOTriggerCheck)
\r
81 SetName((const char*)qadm.GetName()) ;
\r
82 SetTitle((const char*)qadm.GetTitle());
\r
84 //__________________________________________________________________
\r
85 AliACORDEQADataMakerRec::~AliACORDEQADataMakerRec()
\r
91 delete fhACOTriggerCheck;
\r
94 //__________________________________________________________________
\r
95 AliACORDEQADataMakerRec& AliACORDEQADataMakerRec::operator = (const AliACORDEQADataMakerRec& qadm )
\r
98 this->~AliACORDEQADataMakerRec();
\r
99 new(this) AliACORDEQADataMakerRec(qadm);
\r
102 //____________________________________________________________________________
\r
103 void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
\r
105 //Detector specific actions at end of cycle
\r
106 // do the QA checking
\r
107 // Update for DQM GUI
\r
108 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++)
\r
110 if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) )
\r
112 if (!GetRawsData(0)||!GetRawsData(1)) continue;
\r
113 Double_t integral = GetRawsData(0)->Integral();
\r
116 printf("No entries in ACORDE Hits histograms --> fatal error, please check !!!\n");
\r
117 TPaveText *acoBoxFatal=new TPaveText(35,0.5,55,1,"b");
\r
118 acoBoxFatal->SetFillColor(kRed);
\r
119 acoBoxFatal->SetLineColor(kRed);
\r
120 acoBoxFatal->SetLineWidth(2);
\r
121 //acoBox2->SetTextSize(3);
\r
122 //acoBox2->SetTextColor(kBlack);
\r
123 acoBoxFatal->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
124 acoBoxFatal->AddText("Blue line: mean of hits");
\r
125 acoBoxFatal->AddText("Between GREEN lines: ACO. O.K.");
\r
126 GetRawsData(0)->GetListOfFunctions()->Add(acoBoxFatal);
\r
128 TPaveText *acoMultiBoxFatal = new TPaveText(20,0.5,40,1,"b");
\r
129 acoMultiBoxFatal->SetFillColor(kRed);
\r
130 acoMultiBoxFatal->SetLineColor(kRed);
\r
131 acoMultiBoxFatal->SetLineWidth(2);
\r
132 acoMultiBoxFatal->AddText("ACO. Not O.K., Call the experts");
\r
133 GetRawsData(1)->GetListOfFunctions()->Add(acoMultiBoxFatal);
\r
137 Double_t mean = integral/60;
\r
138 fhACOMean->SetY1(mean);
\r
139 fhACOMean->SetY2(mean);
\r
140 fhACOMin->SetY1(0.05*mean);
\r
141 fhACOMin->SetY2(0.05*mean);
\r
142 fhACOMax->SetY1(2.25*mean);
\r
143 fhACOMax->SetY2(2.25*mean);
\r
146 Double_t max = GetRawsData(0)->GetMaximum();
\r
149 printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");
\r
152 // Multiplicity histogram threshold
\r
153 Double_t maxMulti = GetRawsData(1)->GetMaximum();
\r
156 printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");
\r
159 fhACOMulti->SetX1(1);
\r
160 fhACOMulti->SetY1(1);
\r
161 fhACOMulti->SetX2(1);
\r
162 fhACOMulti->SetY2(maxMulti);
\r
163 TPaveText *acoBox=new TPaveText(35,max-0.20*max,55,max,"b");
\r
164 //acoBox->SetFillStyle(0);
\r
165 TPaveText *acoBox1=new TPaveText(35,max-0.20*max,55,max,"b");
\r
166 //acoBox1->SetFillStyle(0);
\r
167 TPaveText *acoBox2=new TPaveText(35,max-0.20*max,55,max,"b");
\r
168 //acoBox2->SetFillStyle(0);
\r
169 Int_t flagACO_DQM = 0;
\r
170 Bool_t isACOOk = kTRUE;
\r
171 Bool_t isACOWarning = kFALSE;
\r
172 for(Int_t iModule=0;iModule<60;iModule++)
\r
174 if ((GetRawsData(0)->GetBinContent(iModule))/max < 0.5) flagACO_DQM++;
\r
176 if (flagACO_DQM < 15)
\r
178 acoBox->SetFillColor(kGreen);
\r
179 acoBox->SetLineColor(kGreen);
\r
180 acoBox->SetLineWidth(2);
\r
181 //acoBox->SetTextSize(3);
\r
182 //acoBox->SetTextColor(kBlack);
\r
183 acoBox->AddText("FLAG MESSAGE: O.K. !!!");
\r
184 acoBox->AddText("Blue line: mean of hits");
\r
185 acoBox->AddText("Between GREEN lines: ACO. O.K.");
\r
186 GetRawsData(0)->GetListOfFunctions()->Add(acoBox);
\r
189 }else if (flagACO_DQM > 15 && flagACO_DQM<30)
\r
191 acoBox1->SetFillColor(kYellow);
\r
192 acoBox1->SetLineColor(kYellow);
\r
193 acoBox1->SetLineWidth(2);
\r
194 //acoBox1->SetTextSize(3);
\r
195 //acoBox1->SetTextColor(kBlack);
\r
196 acoBox1->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");
\r
197 acoBox1->AddText("Blue line: mean of hits");
\r
198 acoBox1->AddText("Between GREEN lines: ACO. O.K.");
\r
199 GetRawsData(0)->GetListOfFunctions()->Add(acoBox1);
\r
200 isACOWarning=kTRUE;
\r
202 }else if (flagACO_DQM > 30)
\r
204 acoBox2->SetFillColor(kRed);
\r
205 acoBox2->SetLineColor(kRed);
\r
206 acoBox2->SetLineWidth(2);
\r
207 //acoBox2->SetTextSize(3);
\r
208 //acoBox2->SetTextColor(kBlack);
\r
209 acoBox2->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
210 acoBox2->AddText("Blue line: mean of hits");
\r
211 acoBox2->AddText("Between GREEN lines: ACO. O.K.");
\r
212 GetRawsData(0)->GetListOfFunctions()->Add(acoBox2);
\r
218 TPaveText *acoMultiBox = new TPaveText(20,maxMulti-0.20*maxMulti,40,maxMulti,"b");
\r
219 if (GetRawsData(1)->Integral()==0 || isACOOk==kFALSE)
\r
221 acoMultiBox->SetFillColor(kRed);
\r
222 acoMultiBox->SetLineColor(kRed);
\r
223 acoMultiBox->SetLineWidth(2);
\r
224 acoMultiBox->AddText("ACO. Not O.K., Call the experts");
\r
225 GetRawsData(1)->GetListOfFunctions()->Add(acoMultiBox);
\r
227 /* if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){
\r
228 acoMultiBox->SetFillColor(kYellow);
\r
229 acoMultiBox->SetLineColor(kYellow);
\r
230 acoMultiBox->SetLineWidth(2);
\r
231 acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");
\r
232 GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);
\r
235 if (isACOOk==kTRUE)
\r
237 acoMultiBox->SetFillColor(kGreen);
\r
238 acoMultiBox->SetLineColor(kGreen);
\r
239 acoMultiBox->SetLineWidth(2);
\r
240 acoMultiBox->AddText("FLAG MESSAGE: ACO. O.K.");
\r
241 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
242 GetRawsData(1)->GetListOfFunctions()->Add(acoMultiBox);
\r
244 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 GetRawsData(1)->GetListOfFunctions()->Add(acoMultiBox);
\r
254 // for AMU ACORDE trigger option
\r
256 if (!GetRawsData(2)||!GetRawsData(3)) continue;
\r
257 Double_t integral1 = GetRawsData(2)->Integral();
\r
260 printf("No entries in ACORDE Hits histograms --> fatal error, please check !!!\n");
\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 GetRawsData(2)->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 GetRawsData(3)->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 = GetRawsData(2)->GetMaximum();
\r
293 printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");
\r
296 // Multiplicity histogram threshold
\r
297 Double_t maxMulti1 = GetRawsData(3)->GetMaximum();
\r
298 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
318 if ((GetRawsData(2)->GetBinContent(iModule))/max1 < 0.5) flagACO_DQMAMU++;
\r
320 if (flagACO_DQMAMU < 15)
\r
322 acoBoxAMU->SetFillColor(kGreen);
\r
323 acoBoxAMU->SetLineColor(kGreen);
\r
324 acoBoxAMU->SetLineWidth(2);
\r
325 //acoBox->SetTextSize(3);
\r
326 //acoBox->SetTextColor(kBlack);
\r
327 acoBoxAMU->AddText("FLAG MESSAGE: O.K. !!!");
\r
328 acoBoxAMU->AddText("Blue line: mean of hits");
\r
329 acoBoxAMU->AddText("Between GREEN lines: ACO. O.K.");
\r
330 GetRawsData(2)->GetListOfFunctions()->Add(acoBoxAMU);
\r
333 }else if (flagACO_DQMAMU > 15 && flagACO_DQMAMU<30)
\r
335 acoBox1AMU->SetFillColor(kYellow);
\r
336 acoBox1AMU->SetLineColor(kYellow);
\r
337 acoBox1AMU->SetLineWidth(2);
\r
338 //acoBox1->SetTextSize(3);
\r
339 //acoBox1->SetTextColor(kBlack);
\r
340 acoBox1AMU->AddText("FLAG MESSAGE: Warning, some modules are not working properly !!!");
\r
341 acoBox1AMU->AddText("Blue line: mean of hits");
\r
342 acoBox1AMU->AddText("Between GREEN lines: ACO. O.K.");
\r
343 GetRawsData(2)->GetListOfFunctions()->Add(acoBox1AMU);
\r
344 isACOWarningAMU=kTRUE;
\r
346 }else if (flagACO_DQMAMU > 30)
\r
348 acoBox2AMU->SetFillColor(kRed);
\r
349 acoBox2AMU->SetLineColor(kRed);
\r
350 acoBox2AMU->SetLineWidth(2);
\r
351 //acoBox2->SetTextSize(3);
\r
352 //acoBox2->SetTextColor(kBlack);
\r
353 acoBox2AMU->AddText("FLAG MESSAGE: ACO. Not Ok, Call the expert !!!");
\r
354 acoBox2AMU->AddText("Blue line: mean of hits");
\r
355 acoBox2AMU->AddText("Between GREEN lines: ACO. O.K.");
\r
356 GetRawsData(2)->GetListOfFunctions()->Add(acoBox2AMU);
\r
362 TPaveText *acoMultiBoxAMU = new TPaveText(20,maxMulti1-0.20*maxMulti1,40,maxMulti1,"b");
\r
363 if (GetRawsData(3)->Integral()==0 || isACOOkAMU==kFALSE)
\r
365 acoMultiBoxAMU->SetFillColor(kRed);
\r
366 acoMultiBoxAMU->SetLineColor(kRed);
\r
367 acoMultiBoxAMU->SetLineWidth(2);
\r
368 acoMultiBoxAMU->AddText("ACO. Not O.K., Call the experts");
\r
369 GetRawsData(3)->GetListOfFunctions()->Add(acoMultiBoxAMU);
\r
371 /* if (GetRawsData(5)->GetBinContent(1) > 0 || isACOOk && GetRawsData(5)->Integral()!=0 && isACOOk==kTRUE){
\r
372 acoMultiBox->SetFillColor(kYellow);
\r
373 acoMultiBox->SetLineColor(kYellow);
\r
374 acoMultiBox->SetLineWidth(2);
\r
375 acoMultiBox->AddText("Warning: possible empy events only IF ACORDE is triggering, else: O.K.");
\r
376 GetRawsData(5)->GetListOfFunctions()->Add(acoMultiBox);
\r
379 if (isACOOkAMU==kTRUE)
\r
381 acoMultiBoxAMU->SetFillColor(kGreen);
\r
382 acoMultiBoxAMU->SetLineColor(kGreen);
\r
383 acoMultiBoxAMU->SetLineWidth(2);
\r
384 acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K.");
\r
385 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
386 GetRawsData(3)->GetListOfFunctions()->Add(acoMultiBoxAMU);
\r
388 if (isACOWarningAMU==kTRUE)
\r
390 acoMultiBoxAMU->SetFillColor(kYellow);
\r
391 acoMultiBoxAMU->SetLineColor(kYellow);
\r
392 acoMultiBoxAMU->SetLineWidth(2);
\r
393 acoMultiBoxAMU->AddText("FLAG MESSAGE: ACO. O.K., warning, some modules are not working properly");
\r
394 //acoMultiBox->AddText("NOTE: if entries below the pink line and ACO is triggering, then call the expert (possible empty events)");
\r
395 GetRawsData(3)->GetListOfFunctions()->Add(acoMultiBoxAMU);
\r
398 // Checks if hits distribution from SL0 and AMU are equal
\r
401 for (Int_t iModule = 0; iModule < 60; iModule++)
\r
403 if (GetRawsData(2)->GetBinContent(iModule)==0)
\r
409 eff = GetRawsData(0)->GetBinContent(iModule)/GetRawsData(2)->GetBinContent(iModule);
\r
410 GetRawsData(4)->Fill(iModule,eff);
\r
411 if (eff!=1) effFlag++;
\r
417 TPaveText *checkTriggerBox = new TPaveText(20,0.6,40,0.8,"b");
\r
418 checkTriggerBox->SetFillColor(kGreen);
\r
419 checkTriggerBox->SetLineColor(kGreen);
\r
420 checkTriggerBox->SetLineWidth(2);
\r
421 checkTriggerBox->AddText("FLAG MESSAGE: ACO. trigger O.K.");
\r
422 GetRawsData(4)->GetListOfFunctions()->Add(checkTriggerBox);
\r
425 TPaveText *checkTriggerBox1 = new TPaveText(20,0.6,40,0.8,"b");
\r
426 checkTriggerBox1->SetFillColor(kYellow);
\r
427 checkTriggerBox1->SetLineColor(kYellow);
\r
428 checkTriggerBox1->SetLineWidth(2);
\r
429 checkTriggerBox1->AddText("FLAG MESSAGE: Warning, please check the ACO trigger configuration");
\r
430 GetRawsData(4)->GetListOfFunctions()->Add(checkTriggerBox1);
\r
436 } // end specie loop
\r
438 // QA Checker standar (to be updated)
\r
439 AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ;
\r
442 //____________________________________________________________________________
\r
443 void AliACORDEQADataMakerRec::StartOfDetectorCycle()
\r
445 //Detector specific actions at start of cycle
\r
449 //____________________________________________________________________________
\r
450 void AliACORDEQADataMakerRec::InitRaws()
\r
452 // create Raw histograms in Raw subdir
\r
454 const Bool_t expert = kTRUE ;
\r
455 const Bool_t saveCorr = kTRUE ;
\r
456 const Bool_t image = kTRUE ;
\r
457 /* 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
458 "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
\r
459 "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
\r
460 "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
\r
461 "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
\r
462 "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
\r
465 // TH1F *fhACORDEBitPattern[4];
\r
466 //TH1F *fhACORDEBitPatternDQM;
\r
467 // fhACORDEBitPattern[0] = new TH1F("ACORDEBitPatternfromRAWSingle","Distribution of ACORDE fired modules from RAW-Single;Modules;Counts",60,-0.5,59.5);//AcordeSingleMuon BitPattern
\r
468 // fhACORDEBitPattern[1] = new TH1F("ACORDEBitPatternfromRAWMulti","Distribution of ACORDE fired modules from RAW-Multi;Modules;Counts",60,-0.5,59.5);//AcordeMultiMuon BitPattern
\r
469 // 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
470 // 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
471 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
472 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
473 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
474 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
475 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
476 // Expert histograms
\r
477 // for(Int_t i=0;i<4;i++)
\r
478 // Add2RawsList(fhACORDEBitPattern[i],i,expert, !image, !saveCorr);
\r
479 // Check the hits multiplicity from trigger configuration
\r
480 Add2RawsList(fhACORDEBitPatternCheckDQM,4,expert,image,!saveCorr);
\r
481 fhACORDEBitPatternCheckDQM->SetFillColor(kOrange);
\r
482 // AMORE diplay settings for shifter on GUI
\r
484 // For SL0 ACO trigger mode
\r
486 Add2RawsList(fhACORDEBitPatternDQM,0,!expert,image,!saveCorr);
\r
487 Add2RawsList(fhACORDEMultiplicitySL0DQM,1,!expert,image,!saveCorr);
\r
489 // For Hits distribution on ACORDE
\r
491 fhACORDEBitPatternDQM->SetFillColor(kCyan-7);
\r
492 fhACOMean->SetLineColor(kBlue);
\r
493 fhACOMean->SetLineStyle(2);
\r
494 fhACOMean->SetLineWidth(4);
\r
495 fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMean);
\r
496 fhACOMin->SetLineColor(kGreen);
\r
497 fhACOMin->SetLineStyle(2);
\r
498 fhACOMin->SetLineWidth(4);
\r
499 fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMin);
\r
500 fhACOMax->SetLineColor(kGreen);
\r
501 fhACOMax->SetLineStyle(2);
\r
502 fhACOMax->SetLineWidth(4);
\r
503 fhACORDEBitPatternDQM->GetListOfFunctions()->Add(fhACOMax);
\r
505 // For ACORDE Multiplicity distribution of fired modules
\r
507 fhACORDEMultiplicitySL0DQM->SetFillColor(kBlue+1);
\r
508 fhACOMulti->SetLineColor(kMagenta);
\r
509 fhACOMulti->SetLineStyle(2);
\r
510 fhACOMulti->SetLineWidth(4);
\r
511 fhACORDEMultiplicitySL0DQM->GetListOfFunctions()->Add(fhACOMulti);
\r
513 // For AMU ACO trigger mode
\r
515 Add2RawsList(fhACORDEBitPatternAMUDQM,2,!expert,image,!saveCorr);
\r
516 Add2RawsList(fhACORDEMultiplicityAMUDQM,3,!expert,image,!saveCorr);
\r
518 // For Hits distribution on ACORDE
\r
520 fhACORDEBitPatternAMUDQM->SetFillColor(kCyan-7);
\r
521 fhACOMeanAMU->SetLineColor(kBlue);
\r
522 fhACOMeanAMU->SetLineStyle(2);
\r
523 fhACOMeanAMU->SetLineWidth(4);
\r
524 fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMeanAMU);
\r
525 fhACOMinAMU->SetLineColor(kGreen);
\r
526 fhACOMinAMU->SetLineStyle(2);
\r
527 fhACOMinAMU->SetLineWidth(4);
\r
528 fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMinAMU);
\r
529 fhACOMaxAMU->SetLineColor(kGreen);
\r
530 fhACOMaxAMU->SetLineStyle(2);
\r
531 fhACOMaxAMU->SetLineWidth(4);
\r
532 fhACORDEBitPatternAMUDQM->GetListOfFunctions()->Add(fhACOMaxAMU);
\r
534 // For ACORDE Multiplicity distribution of fired modules
\r
536 fhACORDEMultiplicityAMUDQM->SetFillColor(kBlue+1);
\r
537 fhACOMultiAMU->SetLineColor(kMagenta);
\r
538 fhACOMultiAMU->SetLineStyle(2);
\r
539 fhACOMultiAMU->SetLineWidth(4);
\r
540 fhACORDEMultiplicityAMUDQM->GetListOfFunctions()->Add(fhACOMultiAMU);
\r
543 for (Int_t iModule = 0; iModule<60; iModule++)
\r
545 fhACORDEBitPattern[0]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);
\r
546 fhACORDEBitPattern[1]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);
\r
550 //____________________________________________________________________________
\r
551 void AliACORDEQADataMakerRec::InitDigits()
\r
553 // create Digits histograms in Digits subdir
\r
555 const Bool_t expert = kTRUE ;
\r
556 const Bool_t image = kTRUE ;
\r
557 TH1F * fhDigitsModule;
\r
558 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
559 "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
\r
560 "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
\r
561 "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
\r
562 "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
\r
563 "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
\r
566 fhDigitsModule = new TH1F("ACORDEBitPatternfromDigits","Distribution of ACORDE from DIGITS;Modules;Counts",60,1,60);
\r
567 Add2DigitsList(fhDigitsModule,0,!expert,image);
\r
568 for (Int_t i=0;i<60;i++) fhDigitsModule->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
\r
571 //____________________________________________________________________________
\r
573 void AliACORDEQADataMakerRec::InitRecPoints()
\r
575 // create cluster histograms in RecPoint subdir
\r
576 // Not needed for ACORDE by now !!!
\r
579 //____________________________________________________________________________
\r
580 void AliACORDEQADataMakerRec::InitESDs()
\r
582 //create ESDs histograms in ESDs subdir
\r
584 const Bool_t expert = kTRUE ;
\r
585 const Bool_t image = kTRUE ;
\r
587 TH1F * fhESDsSingle;
\r
588 TH1F * fhESDsMulti;
\r
589 TH1F * fhESDsMultiplicity;
\r
590 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
591 "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
\r
592 "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
\r
593 "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
\r
594 "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
\r
595 "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
\r
598 fhESDsSingle = new TH1F("ACORDEBitPatternfromESDsSingle","Distribution of ACORDE fired modules from ESDs-Single;Modules;Counts",60,1,60);
\r
599 Add2ESDsList(fhESDsSingle,0,!expert,image);
\r
601 fhESDsMulti = new TH1F("ACORDEBitPatternfromESDsMulti","Distribution of ACORDE fired modules from ESDs-Multi;Modules;Counts",60,1,60);
\r
602 Add2ESDsList(fhESDsMulti,1,!expert,image);
\r
604 fhESDsMultiplicity = new TH1F("ACORDEMultiplicityfromESD","Number of fired ACORDE modules; No. of fired ACORDE modules;No. of events in ACORDE",60,-0.5,60);
\r
605 Add2ESDsList(fhESDsMultiplicity,2,!expert,image);
\r
606 for (Int_t i=0;i<60;i++)
\r
608 fhESDsSingle->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
\r
609 fhESDsMulti->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
\r
614 //____________________________________________________________________________
\r
615 void AliACORDEQADataMakerRec::MakeRaws(AliRawReader* rawReader)
\r
617 //fills QA histos for RAW
\r
619 rawReader->Reset();
\r
620 AliACORDERawStream rawStream(rawReader);
\r
621 size_t contSingle=0;
\r
622 size_t contMulti=0;
\r
625 bool kroSingle[60],kroMulti[60];
\r
628 for(Int_t m=0;m<60;m++) {kroSingle[m]=0;kroMulti[m]=0;}
\r
630 if(rawStream.Next())
\r
632 dy[0]=rawStream.GetWord(0);
\r
633 dy[1]=rawStream.GetWord(1);
\r
634 dy[2]=rawStream.GetWord(2);
\r
635 dy[3]=rawStream.GetWord(3);
\r
637 for(Int_t r=0;r<30;r++)
\r
639 kroSingle[r] = tmpDy & 1;
\r
643 for(Int_t r=30;r<60;r++)
\r
645 kroSingle[r] = tmpDy & 1;
\r
649 for(Int_t r=0;r<30;r++)
\r
651 kroMulti[r] = tmpDy & 1;
\r
655 for(Int_t r=30;r<60;r++)
\r
657 kroMulti[r] = tmpDy & 1;
\r
661 for(Int_t r=0;r<60;r++)
\r
663 if(kroSingle[r]==1)
\r
665 GetRawsData(0)->Fill(r);
\r
666 //GetRawsData(4)->Fill(r);
\r
669 }GetRawsData(1)->Fill(contSingle);//GetRawsData(5)->Fill(contSingle);
\r
671 for(Int_t r=0;r<60;r++)
\r
675 GetRawsData(2)->Fill(r);
\r
676 //GetRawsData(6)->Fill(r);
\r
680 }GetRawsData(3)->Fill(contMulti);//GetRawsData(7)->Fill(contMulti);
\r
683 //____________________________________________________________________________
\r
684 void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree)
\r
686 //fills QA histos for Digits
\r
688 fDigitsArray->Clear() ;
\r
690 fDigitsArray = new TClonesArray("AliACORDEdigit",1000);
\r
691 TBranch * branch = digitsTree->GetBranch("ACORDEdigit");
\r
693 AliWarning("ACORDE branch in Digits Tree not found");
\r
695 branch->SetAddress(&fDigitsArray);
\r
696 for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
\r
697 branch->GetEntry(track);
\r
698 for(Int_t idigit = 0 ; idigit < fDigitsArray->GetEntriesFast() ; idigit++) {
\r
699 AliACORDEdigit *AcoDigit = (AliACORDEdigit*) fDigitsArray->UncheckedAt(idigit);
\r
701 AliError("The unchecked digit doesn't exist");
\r
704 GetDigitsData(0)->Fill(AcoDigit->GetModule()-1);
\r
710 //____________________________________________________________________________
\r
711 void AliACORDEQADataMakerRec::MakeESDs(AliESDEvent * esd)
\r
713 //fills QA histos for ESD
\r
715 AliESDACORDE * fESDACORDE= esd->GetACORDEData();
\r
717 for(int i=0;i<60;i++)
\r
719 if(fESDACORDE->GetHitChannel(i))
\r
721 GetESDsData(0)->Fill(i+1);
\r
722 GetESDsData(1)->Fill(i+1);
\r
725 }GetESDsData(2)->Fill(acoMulti);
\r