]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ESDCheck/AliPMDQATask.cxx
Added two missing includes to allow macro compilation (thanks to Laurent for remarkin...
[u/mrichter/AliRoot.git] / ESDCheck / AliPMDQATask.cxx
CommitLineData
1dfe075f 1
2/**************************************************************************
3 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * *
5 * Author: The ALICE Off-line Project. *
6 * Contributors are mentioned in the code where appropriate. *
7 * *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
0b28fd57 16
17/* $Id$ */
18
1dfe075f 19//_________________________________________________________________________
20// An analysis task to check the PMD data in simulated data
21//
22//*-- Yves Schutz
23//////////////////////////////////////////////////////////////////////////////
24
0b28fd57 25#include <TCanvas.h>
1dfe075f 26#include <TChain.h>
0b28fd57 27#include <TFile.h>
1dfe075f 28#include <TH2F.h>
1dfe075f 29#include <TLine.h>
0b28fd57 30#include <TROOT.h>
1dfe075f 31#include <TStyle.h>
1f588058 32#include <TString.h>
1dfe075f 33
34#include "AliPMDQATask.h"
35#include "AliPMDUtility.h"
36#include "AliESD.h"
37#include "AliLog.h"
38
39//______________________________________________________________________________
40AliPMDQATask::AliPMDQATask(const char *name) :
41 AliAnalysisTask(name,""),
42 fChain(0),
43 fESD(0),
5effd3c6 44 fOutputContainer(0),
1dfe075f 45 fhPMDP1(0),
46 fhPMDC2(0),
47 fhPMDP2(0),
48 fhPMDC3(0),
49 fhPMDP3(0),
50 fhPMDP4(0),
51 fhPMDC5(0),
52 fhPMDP5(0),
53 fhPMDCP0(0),
54 fhPMDCP1(0),
55 fhPMDCP2(0),
56 fhPMDCP3(0),
57 fhPMDCP4(0),
58 fhPMDSM1(0),
59 fhPMDSM2(0),
60 fhPMDSM3(0),
61 fhPMDSM4(0),
62 fhPMDSM5(0),
63 fhPMDSM6(0),
64 fhPMDSM7(0),
65 fhPMDSM8(0),
66 fhPMDSM9(0),
67 fhPMDSM10(0),
68 fhPMDSM11(0),
69 fhPMDSM12(0),
70 fhPMDSM13(0),
71 fhPMDSM14(0),
72 fhPMDSM15(0),
73 fhPMDSM16(0),
74 fhPMDSM17(0),
75 fhPMDSM18(0),
76 fhPMDSM19(0),
77 fhPMDSM20(0),
78 fhPMDSM21(0),
79 fhPMDSM22(0),
80 fhPMDSM23(0),
81 fhPMDSM24(0),
82 fhPMDSM (0)
83{
84 // Constructor.
85 // Input slot #0 works with an Ntuple
86 DefineInput(0, TChain::Class());
87 // Output slot #0 writes into a TH1 container
88 DefineOutput(0, TObjArray::Class()) ;
89}
90
da219175 91//______________________________________________________________________________
92AliPMDQATask::AliPMDQATask(const AliPMDQATask& ta) :
93AliAnalysisTask(ta.GetName(), ""),
94fChain(ta.fChain),
95fESD(ta.fESD),
5effd3c6 96fOutputContainer(ta.fOutputContainer),
da219175 97fhPMDP1(ta.fhPMDP1),
98fhPMDC2(ta.fhPMDC2),
99fhPMDP2(ta.fhPMDP2),
100fhPMDC3(ta.fhPMDC3),
101fhPMDP3(ta.fhPMDP3),
102fhPMDP4(ta.fhPMDP4),
103fhPMDC5(ta.fhPMDC5),
104fhPMDP5(ta.fhPMDP5),
105fhPMDCP0(ta.fhPMDCP0),
106fhPMDCP1(ta.fhPMDCP1),
107fhPMDCP2(ta.fhPMDCP2),
108fhPMDCP3(ta.fhPMDCP3),
109fhPMDCP4(ta.fhPMDCP4),
110fhPMDSM1(ta.fhPMDSM1),
111fhPMDSM2(ta.fhPMDSM2),
112fhPMDSM3(ta.fhPMDSM3),
113fhPMDSM4(ta.fhPMDSM4),
114fhPMDSM5(ta.fhPMDSM5),
115fhPMDSM6(ta.fhPMDSM6),
116fhPMDSM7(ta.fhPMDSM7),
117fhPMDSM8(ta.fhPMDSM8),
118fhPMDSM9(ta.fhPMDSM9),
119fhPMDSM10(ta.fhPMDSM10),
120fhPMDSM11(ta.fhPMDSM11),
121fhPMDSM12(ta.fhPMDSM12),
122fhPMDSM13(ta.fhPMDSM13),
123fhPMDSM14(ta.fhPMDSM14),
124fhPMDSM15(ta.fhPMDSM15),
125fhPMDSM16(ta.fhPMDSM16),
126fhPMDSM17(ta.fhPMDSM17),
127fhPMDSM18(ta.fhPMDSM18),
128fhPMDSM19(ta.fhPMDSM19),
129fhPMDSM20(ta.fhPMDSM20),
130fhPMDSM21(ta.fhPMDSM21),
131fhPMDSM22(ta.fhPMDSM22),
132fhPMDSM23(ta.fhPMDSM23),
133fhPMDSM24(ta.fhPMDSM24),
134fhPMDSM (ta.fhPMDSM)
135{
136 // copy constructor
137}
138
139//_____________________________________________________________________________
140AliPMDQATask& AliPMDQATask::operator = (const AliPMDQATask& ap)
141{
142 // assignment operator
143
144 this->~AliPMDQATask();
145 new(this) AliPMDQATask(ap);
146 return *this;
147}
148
1dfe075f 149//______________________________________________________________________________
150AliPMDQATask::~AliPMDQATask()
151{
152 // dtor
153 fOutputContainer->Clear() ;
154 delete fOutputContainer ;
155
156 delete fhPMDP1 ;
157 delete fhPMDC2 ;
158 delete fhPMDP2 ;
159 delete fhPMDC3 ;
160 delete fhPMDP3 ;
161 delete fhPMDP4 ;
162 delete fhPMDC5 ;
163 delete fhPMDP5 ;
164 delete fhPMDCP0 ;
165 delete fhPMDCP1 ;
166 delete fhPMDCP2 ;
167 delete fhPMDCP3 ;
168 delete fhPMDCP4 ;
169 delete fhPMDSM1 ;
170 delete fhPMDSM2 ;
171 delete fhPMDSM3 ;
172 delete fhPMDSM4 ;
173 delete fhPMDSM5 ;
174 delete fhPMDSM6 ;
175 delete fhPMDSM7 ;
176 delete fhPMDSM8 ;
177 delete fhPMDSM9 ;
178 delete fhPMDSM10 ;
179 delete fhPMDSM11 ;
180 delete fhPMDSM12 ;
181 delete fhPMDSM13 ;
182 delete fhPMDSM14 ;
183 delete fhPMDSM15 ;
184 delete fhPMDSM16 ;
185 delete fhPMDSM17 ;
186 delete fhPMDSM18 ;
187 delete fhPMDSM19 ;
188 delete fhPMDSM20 ;
189 delete fhPMDSM21 ;
190 delete fhPMDSM22 ;
191 delete fhPMDSM23 ;
192 delete fhPMDSM24 ;
193 delete fhPMDSM ;
194
195}
196
197//______________________________________________________________________________
c52c2132 198void AliPMDQATask::ConnectInputData(const Option_t*)
1dfe075f 199{
200 // Initialisation of branch container and histograms
201
202 AliInfo(Form("*** Initialization of %s", GetName())) ;
203
204 // Get input data
205 fChain = dynamic_cast<TChain *>(GetInputData(0)) ;
206 if (!fChain) {
207 AliError(Form("Input 0 for %s not found\n", GetName()));
208 return ;
209 }
210
c52c2132 211 // One should first check if the branch address was taken by some other task
212 char ** address = (char **)GetBranchAddress(0, "ESD");
213 if (address) {
214 fESD = (AliESD*)(*address);
215 } else {
216 fESD = new AliESD();
217 SetBranchAddress(0, "ESD", &fESD);
1dfe075f 218 }
c52c2132 219}
220
221//________________________________________________________________________
222void AliPMDQATask::CreateOutputObjects()
223{
1dfe075f 224 // create histograms
225
1e20f195 226 OpenFile(0) ;
227
1dfe075f 228 fhPMDP1 = new TH2F("fhPMDP1","XY of Clusters",100,-100.,100.,100,-100.,100.);
229 fhPMDC2 = new TH1F("fhPMDC2","CPV PHI",200,-1,9);
230 fhPMDP2 = new TH1F("fhPMDP2","PRE PHI",200,-1,9);
231 fhPMDC3 = new TH1F("fhPMDC3","CPV Clus",30,0.,500.);
232 fhPMDP3 = new TH1F("fhPMDP3","PRE N-gammalike",20,0.,500.);
233 fhPMDP4 = new TH1F("fhPMDP4","PRE EDEP",30,0.,1000.);
234 fhPMDC5 = new TH1F("fhPMDC5","CPV n-cell",20,0.,100.);
235 fhPMDP5 = new TH1F("fhPMDP5","PMD n-cell",20,0.,100.);
236 fhPMDCP0 = new TH2F("fhPMDCP0","PRE CLUS Quad.1 vs 2",150,0.,300.,150,0.,300.);
237 fhPMDCP1 = new TH2F("fhPMDCP1","PRE CLUS Quad.3 vs 4",150,0.,300.,150,0.,300.);
238 fhPMDCP2 = new TH2F("fhPMDCP2","PRE EDEP Quad.3 vs 4",50,0.,300.,50,0.,300.);
239 fhPMDCP3 = new TH2F("fhPMDCP3","PRE EDEP vs Tot Clus ",10,0.,1000.,10,0.,300.);
240 fhPMDCP4 = new TH2F("fhPMDCP4","PRE Clus vs CPV Clus ",150,0.,200.,150,0.,200.);
241
242 fhPMDSM1 = new TH2F("fhPMDSM1","PRE Cluster XY",200,-100,100,200,-100,100);
243 fhPMDSM2 = new TH2F("fhPMDSM2","",999,-100.0,100.0,999,-100.0,100.0);
244 fhPMDSM3 = new TH2F("fhPMDSM3","",999,-100.0,100.0,999,-100.0,100.0);
245 fhPMDSM4 = new TH2F("fhPMDSM4","",999,-100.0,100.0,999,-100.0,100.0);
246 fhPMDSM5 = new TH2F("fhPMDSM5","",999,-100.0,100.0,999,-100.0,100.0);
247 fhPMDSM6 = new TH2F("fhPMDSM6","",999,-100.0,100.0,999,-100.0,100.0);
248 fhPMDSM7 = new TH2F("fhPMDSM7","",999,-100.0,100.0,999,-100.0,100.0);
249 fhPMDSM8 = new TH2F("fhPMDSM8","",999,-100.0,100.0,999,-100.0,100.0);
250 fhPMDSM9 = new TH2F("fhPMDSM9","",999,-100.0,100.0,999,-100.0,100.0);
251 fhPMDSM10 = new TH2F("fhPMDSM10","",999,-100.0,100.0,999,-100.0,100.0);
252 fhPMDSM11 = new TH2F("fhPMDSM11","",999,-100.0,100.0,999,-100.0,100.0);
253 fhPMDSM12 = new TH2F("fhPMDSM12","",999,-100.0,100.0,999,-100.0,100.0);
254 fhPMDSM13 = new TH2F("fhPMDSM13","",999,-100.0,100.0,999,-100.0,100.0);
255 fhPMDSM14 = new TH2F("fhPMDSM14","",999,-100.0,100.0,999,-100.0,100.0);
256 fhPMDSM15 = new TH2F("fhPMDSM15","",999,-100.0,100.0,999,-100.0,100.0);
257 fhPMDSM16 = new TH2F("fhPMDSM16","",999,-100.0,100.0,999,-100.0,100.0);
258 fhPMDSM17 = new TH2F("fhPMDSM17","",999,-100.0,100.0,999,-100.0,100.0);
259 fhPMDSM18 = new TH2F("fhPMDSM18","",999,-100.0,100.0,999,-100.0,100.0);
260 fhPMDSM19 = new TH2F("fhPMDSM19","",999,-100.0,100.0,999,-100.0,100.0);
261 fhPMDSM20 = new TH2F("fhPMDSM20","",999,-100.0,100.0,999,-100.0,100.0);
262 fhPMDSM21 = new TH2F("fhPMDSM21","",999,-100.0,100.0,999,-100.0,100.0);
263 fhPMDSM22 = new TH2F("fhPMDSM22","",999,-100.0,100.0,999,-100.0,100.0);
264 fhPMDSM23 = new TH2F("fhPMDSM23","",999,-100.0,100.0,999,-100.0,100.0);
265 fhPMDSM24 = new TH2F("fhPMDSM24","",999,-100.0,100.0,999,-100.0,100.0);
266 fhPMDSM = new TH1F("fhPMDSM","Plot of all 24 Super Modules",24,0,24);
267
268 // create output container
269
270 fOutputContainer = new TObjArray(38) ;
271 fOutputContainer->SetName("PMD") ;
272
273 fOutputContainer->AddAt(fhPMDP1, 0 );
274 fOutputContainer->AddAt(fhPMDC2, 1 );
275 fOutputContainer->AddAt(fhPMDP2, 2 );
276 fOutputContainer->AddAt(fhPMDC3, 3 );
277 fOutputContainer->AddAt(fhPMDP3, 4 );
278 fOutputContainer->AddAt(fhPMDP4, 5 );
279 fOutputContainer->AddAt(fhPMDC5, 6 );
280 fOutputContainer->AddAt(fhPMDP5, 7 );
281 fOutputContainer->AddAt(fhPMDCP0, 8 );
282 fOutputContainer->AddAt(fhPMDCP1, 9);
283 fOutputContainer->AddAt(fhPMDCP2, 10 );
284 fOutputContainer->AddAt(fhPMDCP3, 11 );
285 fOutputContainer->AddAt(fhPMDCP4, 12 );
286
287 fOutputContainer->AddAt(fhPMDSM1, 13 );
288 fOutputContainer->AddAt(fhPMDSM2, 14 );
289 fOutputContainer->AddAt(fhPMDSM3, 15 );
290 fOutputContainer->AddAt(fhPMDSM4, 16 );
291 fOutputContainer->AddAt(fhPMDSM5, 17 );
292 fOutputContainer->AddAt(fhPMDSM6, 18 );
293 fOutputContainer->AddAt(fhPMDSM7, 19 );
294 fOutputContainer->AddAt(fhPMDSM8, 20 );
295 fOutputContainer->AddAt(fhPMDSM9, 21 );
296 fOutputContainer->AddAt(fhPMDSM10, 22 );
297 fOutputContainer->AddAt(fhPMDSM11, 23 );
298 fOutputContainer->AddAt(fhPMDSM12, 24 );
299 fOutputContainer->AddAt(fhPMDSM13, 25 );
300 fOutputContainer->AddAt(fhPMDSM14, 26 );
301 fOutputContainer->AddAt(fhPMDSM15, 27 );
302 fOutputContainer->AddAt(fhPMDSM16, 28 );
303 fOutputContainer->AddAt(fhPMDSM17, 29 );
304 fOutputContainer->AddAt(fhPMDSM18, 30 );
305 fOutputContainer->AddAt(fhPMDSM19, 31 );
306 fOutputContainer->AddAt(fhPMDSM20, 32 );
307 fOutputContainer->AddAt(fhPMDSM21, 33 );
308 fOutputContainer->AddAt(fhPMDSM22, 34 );
309 fOutputContainer->AddAt(fhPMDSM23, 35 );
310 fOutputContainer->AddAt(fhPMDSM24, 36 );
311 fOutputContainer->AddAt(fhPMDSM, 37 );
312}
313
314//______________________________________________________________________________
315void AliPMDQATask::Exec(Option_t *)
316{
317 // Processing of one event
318
319 Long64_t entry = fChain->GetReadEntry() ;
320
321 if (!fESD) {
322 AliError("fESD is not connected to the input!") ;
323 return ;
324 }
325
326 if ( !((entry-1)%100) )
327 AliInfo(Form("%s ----> Processing event # %lld", (dynamic_cast<TChain *>(fChain))->GetFile()->GetName(), entry)) ;
328
329 // ************************ PMD
330
331 AliPMDUtility *cc = new AliPMDUtility();
332
333 Int_t smn;
334 Int_t n=0;
335 Float_t totCPVClus ;
336 Float_t totPREClus ;
337 Float_t totPREEdep ;
338 Float_t totCPVCell ;
339 Float_t totPRECell ;
340 Float_t preCluQUAD[4] ;
341 Float_t cpvCluQUAD[4] ;
342 Float_t preADCQUAD[4] ;
343 Float_t cpvADCQUAD[4] ;
344 Float_t preCelQUAD[4] ;
345 Float_t cpvCelQUAD[4] ;
346
347 Int_t npmdCl = fESD->GetNumberOfPmdTracks();
348
349 // ****** The loop over PMD clusters
350
351 for (Int_t kk = 0; kk < 4 ; kk++) {
352 cpvCluQUAD[kk] = 0.0 ;
353 preCluQUAD[kk] = 0.0 ;
354 cpvCelQUAD[kk] = 0.0 ;
355 preCelQUAD[kk] = 0.0 ;
356 preADCQUAD[kk] = 0.0 ;
357 }
358
359 while (npmdCl--) {
360
361 AliESDPmdTrack * pmdtr = fESD->GetPmdTrack(npmdCl);
362 Int_t det = pmdtr->GetDetector();
363 Float_t clsX = pmdtr->GetClusterX();
364 Float_t clsY = pmdtr->GetClusterY();
365 Float_t clsZ = pmdtr->GetClusterZ();
366 Float_t ncell = pmdtr->GetClusterCells();
367 Float_t adc = pmdtr->GetClusterADC();
368
369 cc->SetXYZ(clsX,clsY,clsZ);
370 cc->CalculateEta();
371 cc->CalculatePhi();
372 Float_t eta = cc->GetEta();
373 Float_t phi = cc->GetPhi();
374
375 // Calculating S.Module Number from Cluster .
376
377 CalculateSMN(clsX, clsY, smn);
378 if( det == 1)
379 {
380 if(smn >= 0 && smn <= 5) {
381 ++cpvCluQUAD[0] ;
382 cpvADCQUAD[0] =+ adc ;
383 cpvCelQUAD[0] =+ ncell ;
384 }
385 if(smn >= 6 && smn <=11) {
386 ++cpvCluQUAD[1] ;
387 cpvADCQUAD[1] =+ adc ;
388 cpvCelQUAD[1] =+ ncell ;
389 }
390 if(smn >=12 && smn <=17) {
391 ++cpvCluQUAD[2] ;
392 cpvADCQUAD[2] =+ adc ;
393 cpvCelQUAD[2] =+ ncell ;
394 }
395 if(smn >=18 && smn <=23) {
396 ++cpvCluQUAD[3] ;
397 cpvADCQUAD[3] =+ adc ;
398 cpvCelQUAD[3] =+ ncell ;
399 }
400
401 if(eta >= 2.3 && eta <= 3.5)
402 {
403 fhPMDC2->Fill(phi);
404 }
405 }
406 if( det == 0)
407 {
408 if(smn >= 0 && smn <= 5) {
409 ++preCluQUAD[0] ;
410 preADCQUAD[0] =+ adc ;
411 preCelQUAD[0] =+ ncell ;
412 }
413 if(smn >= 6 && smn <=11) {
414 ++preCluQUAD[1] ;
415 preADCQUAD[1] =+ adc ;
416 preCelQUAD[1] =+ ncell ;
417 }
418 if(smn >=12 && smn <=17) {
419 ++preCluQUAD[2] ;
420 preADCQUAD[2] =+ adc ;
421 preCelQUAD[2] =+ ncell ;
422 }
423 if(smn >=18 && smn <=23) {
424 ++preCluQUAD[3] ;
425 preADCQUAD[3] =+ adc ;
426 preCelQUAD[3] =+ ncell ;
427 }
428 if ( n <= 100 ) {
429 fhPMDSM->Fill(smn);
430 if(smn == 0) fhPMDSM1->Fill(-clsX,clsY);
431 if(smn == 0) fhPMDSM1->Fill(-clsX,clsY);
432 if(smn == 1) fhPMDSM2->Fill(-clsX,clsY);
433 if(smn == 2) fhPMDSM3->Fill(-clsX,clsY);
434 if(smn == 3) fhPMDSM4->Fill(-clsX,clsY);
435 if(smn == 4) fhPMDSM5->Fill(-clsX,clsY);
436 if(smn == 5) fhPMDSM6->Fill(-clsX,clsY);
437 if(smn == 6) fhPMDSM7->Fill(-clsX,clsY);
438 if(smn == 7) fhPMDSM8->Fill(-clsX,clsY);
439 if(smn == 8) fhPMDSM9->Fill(-clsX,clsY);
440 if(smn == 9) fhPMDSM10->Fill(-clsX,clsY);
441 if(smn ==10) fhPMDSM11->Fill(-clsX,clsY);
442 if(smn ==11) fhPMDSM12->Fill(-clsX,clsY);
443 if(smn ==12) fhPMDSM13->Fill(-clsX,clsY);
444 if(smn ==13) fhPMDSM14->Fill(-clsX,clsY);
445 if(smn ==14) fhPMDSM15->Fill(-clsX,clsY);
446 if(smn ==15) fhPMDSM16->Fill(-clsX,clsY);
447 if(smn ==16) fhPMDSM17->Fill(-clsX,clsY);
448 if(smn ==17) fhPMDSM18->Fill(-clsX,clsY);
449 if(smn ==18) fhPMDSM19->Fill(-clsX,clsY);
450 if(smn ==19) fhPMDSM20->Fill(-clsX,clsY);
451 if(smn ==20) fhPMDSM21->Fill(-clsX,clsY);
452 if(smn ==21) fhPMDSM22->Fill(-clsX,clsY);
453 if(smn ==22) fhPMDSM23->Fill(-clsX,clsY);
454 if(smn ==23) fhPMDSM24->Fill(-clsX,clsY);
455 }
456 if(eta >= 2.3 && eta <= 3.5)
457 {
458 fhPMDP2->Fill(phi);
459 }
460 fhPMDP1->Fill(clsX,clsY);
461 }
462 }
463 for (Int_t k = 0 ; k < 4 ; k++) {
464 totCPVClus =+ cpvCluQUAD [k] ;
465 totPREClus =+ preCluQUAD [k] ;
466 totCPVCell =+ cpvCelQUAD [k] ;
467 totPRECell =+ preCelQUAD [k] ;
468 totPREEdep =+ preADCQUAD [k] ;
469 }
470 Float_t totCPVpreClus = totPREClus + totCPVClus ;
471
472 // if(eta >= 2.3 && eta <= 3.5) {
473 fhPMDC3->Fill(totCPVClus);
474 fhPMDP3->Fill(totPREClus);
475 fhPMDP4->Fill(totPREEdep);
476 fhPMDP5->Fill(totPRECell);
477 fhPMDCP0->Fill(preCluQUAD[0],preCluQUAD[1]);
478 fhPMDCP1->Fill(preCluQUAD[2],preCluQUAD[3]);
479 fhPMDCP2->Fill(preADCQUAD[2],preADCQUAD[3]);
480 fhPMDCP3->Fill(totPREEdep,totCPVpreClus);
481 fhPMDCP4->Fill(totPREClus,totCPVClus);
482 // }
483 totCPVClus = 0.0;
484 totPREClus = 0.0;
485 totCPVCell = 0.0;
486 totPRECell = 0.0;
487 totPREEdep = 0.0;
488
489 PostData(0, fOutputContainer);
490}
491
492//______________________________________________________________________________
493void AliPMDQATask::Terminate(Option_t *)
494{
495 // Processing when the event loop is ended
c52c2132 496 fOutputContainer = (TObjArray*)GetOutputData(0);
1dfe075f 497
c52c2132 498 fhPMDP1 = (TH2F*)fOutputContainer->At(0);
499 fhPMDC2 = (TH1F*)fOutputContainer->At(1);
500 fhPMDP2 = (TH1F*)fOutputContainer->At(2);
501 fhPMDC3 = (TH1F*)fOutputContainer->At(3);
502 fhPMDP3 = (TH1F*)fOutputContainer->At(4);
503 fhPMDP4 = (TH1F*)fOutputContainer->At(5);
504 fhPMDC5 = (TH1F*)fOutputContainer->At(6);
505 fhPMDP5 = (TH1F*)fOutputContainer->At(7);
506 fhPMDCP0 = (TH2F*)fOutputContainer->At(8);
507 fhPMDCP1 = (TH2F*)fOutputContainer->At(9);
508 fhPMDCP2 = (TH2F*)fOutputContainer->At(10);
509 fhPMDCP3 = (TH2F*)fOutputContainer->At(11);
510 fhPMDCP4 = (TH2F*)fOutputContainer->At(12);
511
512 fhPMDSM1 = (TH2F*)fOutputContainer->At(13);
513 fhPMDSM2 = (TH2F*)fOutputContainer->At(14);
514 fhPMDSM3 = (TH2F*)fOutputContainer->At(15);
515 fhPMDSM4 = (TH2F*)fOutputContainer->At(16);
516 fhPMDSM5 = (TH2F*)fOutputContainer->At(17);
517 fhPMDSM6 = (TH2F*)fOutputContainer->At(18);
518 fhPMDSM7 = (TH2F*)fOutputContainer->At(19);
519 fhPMDSM8 = (TH2F*)fOutputContainer->At(20);
520 fhPMDSM9 = (TH2F*)fOutputContainer->At(21);
521 fhPMDSM10 = (TH2F*)fOutputContainer->At(22);
522 fhPMDSM11 = (TH2F*)fOutputContainer->At(23);
523 fhPMDSM12 = (TH2F*)fOutputContainer->At(24);
524 fhPMDSM13 = (TH2F*)fOutputContainer->At(25);
525 fhPMDSM14 = (TH2F*)fOutputContainer->At(26);
526 fhPMDSM15 = (TH2F*)fOutputContainer->At(27);
527 fhPMDSM16 = (TH2F*)fOutputContainer->At(28);
528 fhPMDSM17 = (TH2F*)fOutputContainer->At(29);
529 fhPMDSM18 = (TH2F*)fOutputContainer->At(30);
530 fhPMDSM19 = (TH2F*)fOutputContainer->At(31);
531 fhPMDSM20 = (TH2F*)fOutputContainer->At(32);
532 fhPMDSM21 = (TH2F*)fOutputContainer->At(33);
533 fhPMDSM22 = (TH2F*)fOutputContainer->At(34);
534 fhPMDSM23 = (TH2F*)fOutputContainer->At(35);
535 fhPMDSM24 = (TH2F*)fOutputContainer->At(36);
536 fhPMDSM = (TH1F*)fOutputContainer->At(37);
537
2704006a 538 Bool_t problem = kFALSE ;
84eb42a1 539 AliInfo(Form(" *** %s Report:", GetName())) ;
540
1dfe075f 541 gStyle->SetOptStat(110000);
542 gStyle->SetOptFit(1);
543
544 TCanvas *cPMD0 = new TCanvas("cPMD0","PMD ESD Test #1", 10,10, 600, 600);
545 cPMD0->Range(-100, -100,100 ,100 );
546 fhPMDSM1->SetMarkerColor(2);
547 fhPMDSM1->Draw();
548 fhPMDSM1->GetXaxis()->SetTitle("Cluster X");
549 fhPMDSM1->GetYaxis()->SetTitle("Cluster Y");
550 fhPMDSM2->SetMarkerColor(2);
551 fhPMDSM2->Draw("same");
552 fhPMDSM3->SetMarkerColor(2);
553 fhPMDSM3->Draw("same");
554 fhPMDSM4->SetMarkerColor(2);
555 fhPMDSM4->Draw("same");
556 fhPMDSM5->SetMarkerColor(2);
557 fhPMDSM5->Draw("same");
558 fhPMDSM6->SetMarkerColor(2);
559 fhPMDSM6->Draw("same");
560 fhPMDSM7->SetMarkerColor(4);
561 fhPMDSM7->Draw("same");
562 fhPMDSM8->SetMarkerColor(4);
563 fhPMDSM8->Draw("same");
564 fhPMDSM9->SetMarkerColor(4);
565 fhPMDSM9->Draw("same");
566 fhPMDSM10->SetMarkerColor(4);
567 fhPMDSM10->Draw("same");
568 fhPMDSM11->SetMarkerColor(4);
569 fhPMDSM11->Draw("same");
570 fhPMDSM12->SetMarkerColor(4);
571 fhPMDSM12->Draw("same");
572 fhPMDSM13->SetMarkerColor(6);
573 fhPMDSM13->Draw("same");
574 fhPMDSM14->SetMarkerColor(6);
575 fhPMDSM14->Draw("same");
576 fhPMDSM15->SetMarkerColor(6);
577 fhPMDSM15->Draw("same");
578 fhPMDSM16->SetMarkerColor(6);
579 fhPMDSM16->Draw("same");
580 fhPMDSM17->SetMarkerColor(6);
581 fhPMDSM17->Draw("same");
582 fhPMDSM18->SetMarkerColor(6);
583 fhPMDSM18->Draw("same");
584 fhPMDSM19->SetMarkerColor(8);
585 fhPMDSM19->Draw("same");
586 fhPMDSM20->SetMarkerColor(8);
587 fhPMDSM20->Draw("same");
588 fhPMDSM21->SetMarkerColor(8);
589 fhPMDSM21->Draw("same");
590 fhPMDSM22->SetMarkerColor(8);
591 fhPMDSM22->Draw("same");
592 fhPMDSM23->SetMarkerColor(8);
593 fhPMDSM23->Draw("same");
594 fhPMDSM24->SetMarkerColor(8);
595 fhPMDSM24->Draw("same");
596
597 DrawPMDBoundary();
598 DrawPMDBoundarySM1();
599 DrawPMDBoundarySM2();
600 DrawPMDBoundarySM3();
601 DrawPMDBoundarySM4();
602 cPMD0->Print("ClusterXY.eps");
603
604 TCanvas *cPMD1 = new TCanvas("cPMD1"," PMD ESD Test #2",10, 10, 600,600);
605 cPMD1->Divide(1,2);
606 cPMD1->cd(1);
607 cPMD1->SetFillColor(0);
608 fhPMDC2->SetLineColor(4);
609 fhPMDC2->Draw();
610 cPMD1->cd(2);
611 fhPMDP2->SetLineColor(2);
612 fhPMDP2->Draw();
613 cPMD1->Print("CPVPREphi.eps");
614
615 TCanvas *cPMD2 = new TCanvas("cPMD2","PMD ESD test #3",10, 10, 600, 600);
616 cPMD2->cd();
617 fhPMDSM->SetFillColor(2);
618 fhPMDSM->Draw();
619 cPMD2->Print("AllSMN.eps");
620
621 TCanvas *cPMD3 = new TCanvas("cPMD3", "PMD ESD test #4",10, 10, 600, 600);
622 cPMD3->Divide(2,2);
623 cPMD3->cd(1);
624 fhPMDCP0->SetMarkerColor(9);
625 fhPMDCP0->Draw();
626 cPMD3->cd(2);
627 fhPMDCP1->SetMarkerColor(6);
628 fhPMDCP1->Draw();
629 cPMD3->cd(3);
630 fhPMDP3->SetLineColor(2);
631 fhPMDP3->Draw();
632 cPMD3->cd(4);
633 fhPMDCP4->SetMarkerColor(3);
634 fhPMDCP4->Draw();
635 cPMD3->Print("CPVPREClus.eps");
636
637 TCanvas *cPMD4 = new TCanvas("cPMD4","PMD ESD test #5", 10, 10, 600, 600);
638 cPMD4->Divide(1,2);
639 cPMD4->cd(1);
640 fhPMDC3->SetLineColor(4);
641 fhPMDC3->Draw();
642 cPMD4->cd(2);
643 fhPMDP4->SetLineColor(2);
644 fhPMDP4->Draw();
645 cPMD4->Print("CPVPREAdc.eps");
646
647 char line[1024] ;
84eb42a1 648 sprintf(line, ".!tar -zcf %s.tar.gz *.eps", GetName()) ;
1dfe075f 649 gROOT->ProcessLine(line);
650
2704006a 651 AliInfo(Form("!!! All the eps files are in %s.tar.gz !!!", GetName())) ;
1dfe075f 652
1f588058 653 TString report ;
2704006a 654 if(problem)
655 report="Problems found, please check!!!";
656 else
657 report="OK";
658
1f588058 659 AliInfo(Form("*** %s Summary Report: %s \n",GetName(), report.Data())) ;
1dfe075f 660}
661
662//______________________________________________________________________________
da219175 663void AliPMDQATask::CalculateSMN( Float_t clsX, Float_t clsY, Int_t & smn) const
1dfe075f 664{
665 Double_t xcon[96] = {75.133, 54.204, 53.254, 32.326, 31.376,10.447,
666 75.133, 54.204, 53.254, 32.326, 31.376,10.447,
667 75.133, 54.204, 53.254, 32.326, 31.376,10.447,
668 75.133, 54.204, 53.254, 32.326, 31.376,10.447,
669 -75.133, -54.204, -53.254, -32.326, -31.376,-10.447,
670 -75.133, -54.204, -53.254, -32.326, -31.376,-10.447,
671 -75.133, -54.204, -53.254, -32.326, -31.376,-10.447,
672 -75.133, -54.204, -53.254, -32.326, -31.376,-10.447,
673 9.167, -32.543, -33.493, -75.133,
674 9.167, -32.543, -33.493, -75.133,
675 9.167, -32.543, -33.493, -75.133,
676 9.167, -32.543, -33.493, -75.133,
677 9.167, -32.543, -33.493, -75.133,
678 9.167, -32.543, -33.493, -75.133,
679 -9.167, 32.543, 33.493, 75.133,
680 -9.167, 32.543, 33.493, 75.133,
681 -9.167, 32.543, 33.493, 75.133,
682 -9.167, 32.543, 33.493, 75.133,
683 -9.167, 32.543, 33.493, 75.133,
684 -9.167, 32.543, 33.493, 75.133};
685
686 Double_t ycon[96] = {86.475, 86.475, 86.475, 86.475, 86.475, 86.475,
687 38.225, 38.225, 38.225, 38.225, 38.225, 38.225,
688 37.325, 37.325, 37.325, 37.325, 37.325, 37.325,
689 -10.925, -10.925, -10.925, -10.925, -10.925, -10.925,
690 -86.475, -86.475, -86.475, -86.475, -86.475, -86.475,
691 -38.225, -38.225, -38.225, -38.225, -38.225, -38.225,
692 -37.325, -37.325, -37.325, -37.325, -37.325, -37.325,
693 10.925, 10.925, 10.925, 10.925, 10.925, 10.925,
694 86.475, 86.475, 86.475, 86.475,
695 62.225, 62.225, 62.225, 62.225,
696 61.325, 61.325, 61.325, 61.325,
697 37.075, 37.075, 37.075, 37.075,
698 36.175, 36.175, 36.175, 36.175,
699 11.925, 11.925, 11.925 , 11.925,
700 -86.475, -86.475, -86.475, -86.475,
701 -62.225, -62.225, -62.225, -62.225,
702 -61.325, -61.325, -61.325, -61.325,
703 -37.075, -37.075, -37.075, -37.075,
704 -36.175, -36.175, -36.175, -36.175,
705 -11.925, -11.925, -11.925 , -11.925 };
706
707 if((clsX <= xcon[0]) && (clsX >= xcon[1]) &&
708 (clsY <= ycon[0]) && (clsY >= ycon[6])) smn = 0 ;
709
710 else if((clsX <=xcon[2]) && (clsX >= xcon[3]) &&
711 (clsY <= ycon[1]) && (clsY >= ycon[7]))smn = 1 ;
712
713 else if((clsX <=xcon[4]) && (clsX >= xcon[5]) &&
714 (clsY <= ycon[3]) && (clsY >= ycon[8]))smn = 2 ;
715
716 else if((clsX <= xcon[0]) && (clsX >= xcon[1]) &&
717 (clsY <= ycon[12]) && (clsY >= ycon[18])) smn = 3 ;
718
719 else if((clsX <=xcon[2]) && (clsX >= xcon[3]) &&
720 (clsY <= ycon[12]) && (clsY >= ycon[18]))smn = 4 ;
721
722 else if((clsX <=xcon[4]) && (clsX >= xcon[5]) &&
723 (clsY <= ycon[12]) && (clsY >= ycon[18]))smn = 5 ;
724 //------------------------------------------------------------------
725 else if((clsX >= xcon[24]) && (clsX <= xcon[25]) &&
726 (clsY >= ycon[24]) && (clsY <= ycon[30])) smn = 6 ;
727
728 else if((clsX >=xcon[26]) && (clsX <= xcon[27]) &&
729 (clsY >= ycon[25]) && (clsY <= ycon[31]))smn = 7 ;
730
731 else if((clsX >=xcon[28]) && (clsX <= xcon[29]) &&
732 (clsY >= ycon[26]) && (clsY <= ycon[32]))smn = 8 ;
733
734 else if((clsX >= xcon[24]) && (clsX <= xcon[25]) &&
735 (clsY >= ycon[36]) && (clsY <= ycon[42])) smn = 9 ;
736
737 else if((clsX >=xcon[26]) && (clsX <= xcon[27]) &&
738 (clsY >= ycon[36]) && (clsY <= ycon[42]))smn = 10;
739
740 else if((clsX >=xcon[28]) && (clsX <= xcon[29]) &&
741 (clsY >= ycon[36]) && (clsY <= ycon[42]))smn = 11;
742 //------------------------------------------------------------------
743 else if((clsX <= xcon[48]) && (clsX >= xcon[49]) &&
744 (clsY <= ycon[48]) && (clsY >= ycon[52])) smn = 12 ;
745
746 else if((clsX <=xcon[50]) && (clsX >= xcon[51]) &&
747 (clsY <= ycon[48]) && (clsY >= ycon[52]))smn = 13 ;
748
749 else if((clsX <=xcon[48]) && (clsX >= xcon[49]) &&
750 (clsY <= ycon[56]) && (clsY >= ycon[60]))smn = 14 ;
751
752 else if((clsX <=xcon[50]) && (clsX >= xcon[51]) &&
753 (clsY <= ycon[56]) && (clsY >= ycon[60]))smn = 15 ;
754
755 else if((clsX <=xcon[48]) && (clsX >= xcon[49]) &&
756 (clsY <= ycon[64]) && (clsY >= ycon[68]))smn = 16 ;
757
758 else if((clsX <=xcon[50]) && (clsX >= xcon[51]) &&
759 (clsY <= ycon[64]) && (clsY >= ycon[68]))smn = 17 ;
760 //--------------------------------------------------------------
761 else if((clsX >= xcon[72]) && (clsX <= xcon[73]) &&
762 (clsY >= ycon[72]) && (clsY <= ycon[76])) smn = 18 ;
763
764 else if((clsX >=xcon[74]) && (clsX <= xcon[75]) &&
765 (clsY >= ycon[72]) && (clsY <= ycon[76]))smn = 19 ;
766
767 else if((clsX >=xcon[72]) && (clsX <= xcon[73]) &&
768 (clsY >= ycon[80]) && (clsY <= ycon[84]))smn = 20 ;
769
770 else if((clsX >=xcon[74]) && (clsX <= xcon[75]) &&
771 (clsY >= ycon[80]) && (clsY <= ycon[84]))smn = 21;
772
773 else if((clsX >= xcon[72]) && (clsX <= xcon[73]) &&
774 (clsY >= ycon[88]) && (clsY <= ycon[92])) smn = 22 ;
775
776 else if((clsX >=xcon[74]) && (clsX <= xcon[75]) &&
777 (clsY >= ycon[88]) && (clsY <= ycon[92]))smn = 23 ;
778 else smn = 111;
779 }
780
781//______________________________________________________________________________
da219175 782void AliPMDQATask::DrawPMDBoundary() const
1dfe075f 783{
784 // Draw PMD boundaries
785
786 gStyle->SetLineWidth(2);
787 gStyle->SetLineColor(2);
788 TLine * l;
789 l = new TLine(75.1333, 86.475, -75.1333, 86.475); l->Draw("same");
790 l = new TLine(-75.1333, 86.470,-75.1333, -86.475); l->Draw("same");
791 l = new TLine(-75.1333, -86.475,75.1333, -86.475); l->Draw("same");
792 l = new TLine(75.1333, -86.475,75.1333, 86.475); l->Draw("same");
793}
794
795//______________________________________________________________________________
da219175 796void AliPMDQATask::DrawPMDBoundarySM1() const
1dfe075f 797{
798 // Draw boundaries of Super Module 1
799
800 gStyle->SetLineWidth(1);
801 gStyle->SetLineColor(4);
802 TLine * l;
803 l = new TLine(-75.1333, 86.475, -10.447, 86.475); l->Draw("same");
804 l = new TLine(-10.447, 86.475, -10.446, -10.925); l->Draw("same");
805 l = new TLine(-10.446, -10.925, -75.1333,-10.925); l->Draw("same");
806 l = new TLine(-75.1333,-10.925, -75.1333, 86.475); l->Draw("same");
807}
808
809//______________________________________________________________________________
da219175 810void AliPMDQATask::DrawPMDBoundarySM2() const
1dfe075f 811{
812 // Draw boundaries of Super Module 2
813
814 gStyle->SetLineWidth(1);
815 gStyle->SetLineColor(4);
816 TLine * l;
817 l = new TLine(75.1333, -86.475, 10.446, -86.475); l->Draw("same");
818 l = new TLine(10.446, -86.475, 10.446, 10.925); l->Draw("same");
819 l = new TLine(10.446, 10.925, 75.1333, 10.925); l->Draw("same");
820 l = new TLine(75.1333, 10.925, 75.1333, -86.475); l->Draw("same");
821}
822
823
824//______________________________________________________________________________
da219175 825void AliPMDQATask::DrawPMDBoundarySM3() const
1dfe075f 826{
827 // Draw boundaries of Super Module 3
828
829 gStyle->SetLineWidth(1);
830 gStyle->SetLineColor(1);
831 TLine * l;
832 l = new TLine( -9.167, 86.475, 75.1333, 86.475); l->Draw("same");
833 l = new TLine(75.1333,86.475, 75.1333, 11.925); l->Draw("same");
834 l = new TLine(75.1333,11.925, -9.167, 11.925); l->Draw("same");
835 l = new TLine( -9.167, 11.925, -9.167, 86.475); l->Draw("same");
836}
837
838//______________________________________________________________________________
da219175 839void AliPMDQATask::DrawPMDBoundarySM4() const
1dfe075f 840{
841 // Draw boundaries of Super Module 4
842
843 gStyle->SetLineWidth(1);
844 gStyle->SetLineColor(1);
845 TLine * l;
846 l = new TLine(9.167, -86.475, -75.1333,-86.475); l->Draw("same");
847 l = new TLine(-75.1333,-86.475, -75.1333,-11.925); l->Draw("same");
848 l = new TLine(-75.1333,-11.925, 9.167, -11.925); l->Draw("same");
849 l = new TLine(9.167, -11.925, 9.167, -86.475); l->Draw("same");
850}