]>
Commit | Line | Data |
---|---|---|
dc7f1e9e | 1 | /**************************************************************************\r |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r | |
3 | * *\r | |
4 | * Author: The ALICE Off-line Project. *\r | |
5 | * Contributors are mentioned in the code where appropriate. *\r | |
6 | * *\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 | |
15 | //---\r | |
16 | // Produces the data needed to calculate the quality assurance. \r | |
17 | // All data must be mergeable objects.\r | |
18 | \r | |
19 | \r | |
20 | // Authors:\r | |
21 | //\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 | |
25 | //\r | |
26 | // Created: June 13th 2008\r | |
27 | //---\r | |
7626fda4 | 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 |
dc7f1e9e | 29 | // Last Update: Aug. 27th 2008 --> Implementation to declare QA expert histogram\r |
1b368017 | 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 | |
32 | \r | |
dc7f1e9e | 33 | \r |
34 | \r | |
35 | // --- ROOT system ---\r | |
36 | #include <TClonesArray.h>\r | |
37 | #include <TFile.h> \r | |
38 | #include <TH1F.h> \r | |
39 | #include <TDirectory.h>\r | |
7626fda4 | 40 | #include <TLine.h>\r |
41 | #include <TPaveText.h>\r | |
dc7f1e9e | 42 | // --- Standard library ---\r |
43 | \r | |
44 | // --- AliRoot header files ---\r | |
45 | #include "AliESDEvent.h"\r | |
46 | #include "AliLog.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 | |
54 | \r | |
55 | //____________________________________________________________________________ \r | |
7626fda4 | 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 | |
dc7f1e9e | 66 | {\r |
67 | \r | |
68 | }\r | |
69 | //____________________________________________________________________________ \r | |
7626fda4 | 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 | |
dc7f1e9e | 80 | {\r |
81 | SetName((const char*)qadm.GetName()) ; \r | |
82 | SetTitle((const char*)qadm.GetTitle()); \r | |
83 | }\r | |
7626fda4 | 84 | //__________________________________________________________________\r |
85 | AliACORDEQADataMakerRec::~AliACORDEQADataMakerRec()\r | |
86 | {\r | |
87 | delete fhACOMean;\r | |
88 | delete fhACOMin;\r | |
89 | delete fhACOMax;\r | |
90 | delete fhACOMulti;\r | |
91 | delete fhACOTriggerCheck;\r | |
92 | }\r | |
93 | \r | |
dc7f1e9e | 94 | //__________________________________________________________________\r |
95 | AliACORDEQADataMakerRec& AliACORDEQADataMakerRec::operator = (const AliACORDEQADataMakerRec& qadm )\r | |
96 | {\r | |
97 | // Equal operator.\r | |
98 | this->~AliACORDEQADataMakerRec();\r | |
99 | new(this) AliACORDEQADataMakerRec(qadm);\r | |
100 | return *this;\r | |
101 | }\r | |
102 | //____________________________________________________________________________\r | |
103 | void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)\r | |
104 | {\r | |
105 | //Detector specific actions at end of cycle\r | |
106 | // do the QA checking\r | |
7626fda4 | 107 | // Update for DQM GUI\r |
108 | for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) \r | |
109 | {\r | |
110 | if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) \r | |
111 | continue ; \r | |
112 | if (!GetRawsData(0)||!GetRawsData(1)) continue;\r | |
113 | Double_t integral = GetRawsData(0)->Integral();\r | |
114 | if (integral==0) \r | |
115 | {\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 | |
127 | \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 | |
134 | \r | |
135 | continue;\r | |
136 | }\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 | |
144 | \r | |
145 | // alarms\r | |
146 | Double_t max = GetRawsData(0)->GetMaximum();\r | |
147 | if (max == 0)\r | |
148 | {\r | |
149 | printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");\r | |
150 | continue;\r | |
151 | }\r | |
152 | // Multiplicity histogram threshold\r | |
153 | Double_t maxMulti = GetRawsData(1)->GetMaximum();\r | |
154 | if (maxMulti == 0)\r | |
155 | {\r | |
156 | printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");\r | |
157 | continue;\r | |
158 | }\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 | |
173 | {\r | |
174 | if ((GetRawsData(0)->GetBinContent(iModule))/max < 0.5) flagACO_DQM++;\r | |
175 | }\r | |
176 | if (flagACO_DQM < 15)\r | |
177 | {\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 | |
187 | \r | |
188 | \r | |
189 | }else if (flagACO_DQM > 15 && flagACO_DQM<30)\r | |
190 | {\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 | |
201 | \r | |
202 | }else if (flagACO_DQM > 30)\r | |
203 | {\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 | |
213 | isACOOk=kFALSE;\r | |
214 | \r | |
215 | }\r | |
216 | \r | |
217 | \r | |
218 | TPaveText *acoMultiBox = new TPaveText(20,maxMulti-0.20*maxMulti,40,maxMulti,"b");\r | |
219 | if (GetRawsData(1)->Integral()==0 || isACOOk==kFALSE)\r | |
220 | {\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 | |
226 | }\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 | |
233 | }\r | |
234 | */\r | |
235 | if (isACOOk==kTRUE)\r | |
236 | {\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 | |
243 | }\r | |
244 | if (isACOWarning==kTRUE)\r | |
245 | {\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 | |
252 | }\r | |
253 | \r | |
254 | // for AMU ACORDE trigger option\r | |
255 | \r | |
256 | if (!GetRawsData(2)||!GetRawsData(3)) continue;\r | |
257 | Double_t integral1 = GetRawsData(2)->Integral();\r | |
258 | if (integral1==0) \r | |
259 | {\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 | |
271 | \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 | |
278 | \r | |
279 | continue;\r | |
280 | }\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 | |
288 | \r | |
289 | // alarms\r | |
290 | Double_t max1 = GetRawsData(2)->GetMaximum();\r | |
291 | if (max1 == 0)\r | |
292 | {\r | |
293 | printf("Maximum of hits equal to ZERO, please check the status of ACORDE !!\n");\r | |
294 | continue;\r | |
295 | }\r | |
296 | // Multiplicity histogram threshold\r | |
297 | Double_t maxMulti1 = GetRawsData(3)->GetMaximum();\r | |
298 | if (maxMulti1 == 0)\r | |
299 | {\r | |
300 | printf("Maximum of entries equal to ZERO, please check the status of ACORDE !!\n");\r | |
301 | continue;\r | |
302 | }\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 | {\r | |
318 | if ((GetRawsData(2)->GetBinContent(iModule))/max1 < 0.5) flagACO_DQMAMU++;\r | |
319 | }\r | |
320 | if (flagACO_DQMAMU < 15)\r | |
321 | {\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 | |
331 | \r | |
332 | \r | |
333 | }else if (flagACO_DQMAMU > 15 && flagACO_DQMAMU<30)\r | |
334 | {\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 | |
345 | \r | |
346 | }else if (flagACO_DQMAMU > 30)\r | |
347 | {\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 | |
357 | isACOOkAMU=kFALSE;\r | |
358 | \r | |
359 | }\r | |
360 | \r | |
361 | \r | |
362 | TPaveText *acoMultiBoxAMU = new TPaveText(20,maxMulti1-0.20*maxMulti1,40,maxMulti1,"b");\r | |
363 | if (GetRawsData(3)->Integral()==0 || isACOOkAMU==kFALSE)\r | |
364 | {\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 | |
370 | }\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 | |
377 | }\r | |
378 | */\r | |
379 | if (isACOOkAMU==kTRUE)\r | |
380 | {\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 | |
387 | }\r | |
388 | if (isACOWarningAMU==kTRUE)\r | |
389 | {\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 | |
396 | }\r | |
397 | \r | |
398 | // Checks if hits distribution from SL0 and AMU are equal\r | |
399 | Float_t eff = 0.0;\r | |
400 | Int_t effFlag = 0;\r | |
401 | for (Int_t iModule = 0; iModule < 60; iModule++)\r | |
402 | {\r | |
403 | if (GetRawsData(2)->GetBinContent(iModule)==0) \r | |
404 | {\r | |
405 | eff = 0.0;\r | |
406 | continue;\r | |
407 | }else\r | |
408 | {\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 | |
412 | }\r | |
413 | }\r | |
414 | \r | |
415 | if (effFlag == 0)\r | |
416 | {\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 | |
423 | }else\r | |
424 | {\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 | |
431 | \r | |
432 | }\r | |
433 | \r | |
434 | \r | |
435 | \r | |
436 | } // end specie loop\r | |
437 | \r | |
438 | // QA Checker standar (to be updated)\r | |
dc7f1e9e | 439 | AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ;\r |
440 | }\r | |
441 | \r | |
442 | //____________________________________________________________________________\r | |
443 | void AliACORDEQADataMakerRec::StartOfDetectorCycle()\r | |
444 | {\r | |
445 | //Detector specific actions at start of cycle\r | |
446 | \r | |
447 | }\r | |
448 | \r | |
449 | //____________________________________________________________________________ \r | |
450 | void AliACORDEQADataMakerRec::InitRaws()\r | |
451 | {\r | |
452 | // create Raw histograms in Raw subdir\r | |
453 | \r | |
454 | const Bool_t expert = kTRUE ; \r | |
455 | const Bool_t saveCorr = kTRUE ; \r | |
456 | const Bool_t image = kTRUE ; \r | |
7626fda4 | 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 |
dc7f1e9e | 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 | |
7626fda4 | 463 | */\r |
dc7f1e9e | 464 | \r |
7626fda4 | 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 | |
483 | \r | |
484 | // For SL0 ACO trigger mode\r | |
485 | \r | |
486 | Add2RawsList(fhACORDEBitPatternDQM,0,!expert,image,!saveCorr);\r | |
487 | Add2RawsList(fhACORDEMultiplicitySL0DQM,1,!expert,image,!saveCorr);\r | |
488 | \r | |
489 | // For Hits distribution on ACORDE\r | |
490 | \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 | |
504 | \r | |
505 | // For ACORDE Multiplicity distribution of fired modules\r | |
506 | \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 | |
512 | \r | |
513 | // For AMU ACO trigger mode\r | |
514 | \r | |
515 | Add2RawsList(fhACORDEBitPatternAMUDQM,2,!expert,image,!saveCorr);\r | |
516 | Add2RawsList(fhACORDEMultiplicityAMUDQM,3,!expert,image,!saveCorr);\r | |
517 | \r | |
518 | // For Hits distribution on ACORDE\r | |
519 | \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 | |
533 | \r | |
534 | // For ACORDE Multiplicity distribution of fired modules\r | |
535 | \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 | |
541 | \r | |
542 | /*\r | |
dc7f1e9e | 543 | for (Int_t iModule = 0; iModule<60; iModule++)\r |
544 | {\r | |
545 | fhACORDEBitPattern[0]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);\r | |
546 | fhACORDEBitPattern[1]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);\r | |
547 | }\r | |
7626fda4 | 548 | */\r |
dc7f1e9e | 549 | }\r |
550 | //____________________________________________________________________________ \r | |
551 | void AliACORDEQADataMakerRec::InitDigits()\r | |
552 | {\r | |
553 | // create Digits histograms in Digits subdir\r | |
554 | \r | |
555 | const Bool_t expert = kTRUE ; \r | |
556 | const Bool_t image = kTRUE ; \r | |
557 | TH1F * fhDigitsModule;\r | |
41d0241f | 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 |
dc7f1e9e | 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 | |
564 | \r | |
565 | \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 | |
569 | }\r | |
570 | \r | |
571 | //____________________________________________________________________________ \r | |
572 | \r | |
573 | void AliACORDEQADataMakerRec::InitRecPoints()\r | |
574 | {\r | |
575 | // create cluster histograms in RecPoint subdir\r | |
576 | // Not needed for ACORDE by now !!!\r | |
577 | }\r | |
578 | \r | |
579 | //____________________________________________________________________________\r | |
580 | void AliACORDEQADataMakerRec::InitESDs()\r | |
581 | {\r | |
582 | //create ESDs histograms in ESDs subdir\r | |
583 | \r | |
584 | const Bool_t expert = kTRUE ; \r | |
585 | const Bool_t image = kTRUE ; \r | |
586 | \r | |
587 | TH1F * fhESDsSingle;\r | |
588 | TH1F * fhESDsMulti;\r | |
1b368017 | 589 | TH1F * fhESDsMultiplicity;\r |
41d0241f | 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 |
dc7f1e9e | 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 | |
596 | \r | |
597 | \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 | |
600 | \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 | |
1b368017 | 603 | \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 | |
dc7f1e9e | 606 | for (Int_t i=0;i<60;i++)\r |
607 | {\r | |
608 | fhESDsSingle->GetXaxis()->SetBinLabel(i+1,acoModule[i]);\r | |
609 | fhESDsMulti->GetXaxis()->SetBinLabel(i+1,acoModule[i]);\r | |
610 | }\r | |
611 | \r | |
612 | \r | |
613 | }\r | |
614 | //____________________________________________________________________________\r | |
615 | void AliACORDEQADataMakerRec::MakeRaws(AliRawReader* rawReader)\r | |
616 | {\r | |
617 | //fills QA histos for RAW\r | |
618 | \r | |
619 | rawReader->Reset();\r | |
620 | AliACORDERawStream rawStream(rawReader);\r | |
621 | size_t contSingle=0;\r | |
622 | size_t contMulti=0;\r | |
623 | UInt_t dy[4];\r | |
624 | \r | |
625 | bool kroSingle[60],kroMulti[60];\r | |
626 | UInt_t tmpDy;\r | |
627 | \r | |
628 | for(Int_t m=0;m<60;m++) {kroSingle[m]=0;kroMulti[m]=0;}\r | |
629 | \r | |
630 | if(rawStream.Next())\r | |
631 | {\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 | |
636 | tmpDy=dy[0];\r | |
10f9e41a | 637 | for(Int_t r=0;r<30;r++)\r |
dc7f1e9e | 638 | {\r |
639 | kroSingle[r] = tmpDy & 1;\r | |
640 | tmpDy>>=1;\r | |
641 | }\r | |
642 | tmpDy=dy[1];\r | |
10f9e41a | 643 | for(Int_t r=30;r<60;r++)\r |
dc7f1e9e | 644 | {\r |
645 | kroSingle[r] = tmpDy & 1;\r | |
646 | tmpDy>>=1;\r | |
647 | }\r | |
648 | tmpDy=dy[2];\r | |
10f9e41a | 649 | for(Int_t r=0;r<30;r++)\r |
dc7f1e9e | 650 | {\r |
651 | kroMulti[r] = tmpDy & 1;\r | |
652 | tmpDy>>=1;\r | |
653 | }\r | |
654 | tmpDy=dy[3];\r | |
10f9e41a | 655 | for(Int_t r=30;r<60;r++)\r |
dc7f1e9e | 656 | {\r |
657 | kroMulti[r] = tmpDy & 1;\r | |
658 | tmpDy>>=1;\r | |
659 | }\r | |
660 | contSingle=0;\r | |
7626fda4 | 661 | for(Int_t r=0;r<60;r++)\r |
662 | {\r | |
663 | if(kroSingle[r]==1)\r | |
664 | {\r | |
665 | GetRawsData(0)->Fill(r);\r | |
666 | //GetRawsData(4)->Fill(r);\r | |
667 | contSingle++;\r | |
668 | }\r | |
669 | }GetRawsData(1)->Fill(contSingle);//GetRawsData(5)->Fill(contSingle);\r | |
670 | contMulti=0;\r | |
10f9e41a | 671 | for(Int_t r=0;r<60;r++)\r |
dc7f1e9e | 672 | {\r |
1b368017 | 673 | if(kroMulti[r]==1)\r |
674 | {\r | |
7626fda4 | 675 | GetRawsData(2)->Fill(r);\r |
676 | //GetRawsData(6)->Fill(r);\r | |
1b368017 | 677 | contMulti++;\r |
678 | }\r | |
dc7f1e9e | 679 | \r |
7626fda4 | 680 | }GetRawsData(3)->Fill(contMulti);//GetRawsData(7)->Fill(contMulti);\r |
dc7f1e9e | 681 | }\r |
682 | }\r | |
683 | //____________________________________________________________________________\r | |
684 | void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree)\r | |
685 | {\r | |
686 | //fills QA histos for Digits\r | |
687 | if (fDigitsArray) \r | |
688 | fDigitsArray->Clear() ; \r | |
689 | else \r | |
690 | fDigitsArray = new TClonesArray("AliACORDEdigit",1000);\r | |
691 | TBranch * branch = digitsTree->GetBranch("ACORDEdigit");\r | |
692 | if (!branch) {\r | |
693 | AliWarning("ACORDE branch in Digits Tree not found");\r | |
694 | } else {\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 | |
700 | if (!AcoDigit) {\r | |
701 | AliError("The unchecked digit doesn't exist");\r | |
702 | continue ;\r | |
703 | }\r | |
704 | GetDigitsData(0)->Fill(AcoDigit->GetModule()-1);\r | |
705 | }\r | |
706 | }\r | |
707 | }\r | |
708 | }\r | |
709 | \r | |
710 | //____________________________________________________________________________\r | |
711 | void AliACORDEQADataMakerRec::MakeESDs(AliESDEvent * esd)\r | |
712 | {\r | |
713 | //fills QA histos for ESD\r | |
714 | \r | |
715 | AliESDACORDE * fESDACORDE= esd->GetACORDEData();\r | |
1b368017 | 716 | Int_t acoMulti=0;\r |
dc7f1e9e | 717 | for(int i=0;i<60;i++)\r |
718 | {\r | |
719 | if(fESDACORDE->GetHitChannel(i)) \r | |
720 | {\r | |
1b368017 | 721 | GetESDsData(0)->Fill(i+1);\r |
722 | GetESDsData(1)->Fill(i+1);\r | |
723 | acoMulti++;\r | |
dc7f1e9e | 724 | }\r |
1b368017 | 725 | }GetESDsData(2)->Fill(acoMulti);\r |
dc7f1e9e | 726 | \r |
727 | }\r |