2 /**************************************************************************
3 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * Author: The ALICE Off-line Project. *
6 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
19 //_________________________________________________________________________
20 // An analysis task to check the PMD data in simulated data
23 //////////////////////////////////////////////////////////////////////////////
34 #include "AliPMDQATask.h"
35 #include "AliPMDUtility.h"
39 //______________________________________________________________________________
40 AliPMDQATask::AliPMDQATask(const char *name) :
41 AliAnalysisTask(name,""),
84 // Input slot #0 works with an Ntuple
85 DefineInput(0, TChain::Class());
86 // Output slot #0 writes into a TH1 container
87 DefineOutput(0, TObjArray::Class()) ;
90 //______________________________________________________________________________
91 AliPMDQATask::AliPMDQATask(const AliPMDQATask& ta) :
92 AliAnalysisTask(ta.GetName(), ""),
103 fhPMDCP0(ta.fhPMDCP0),
104 fhPMDCP1(ta.fhPMDCP1),
105 fhPMDCP2(ta.fhPMDCP2),
106 fhPMDCP3(ta.fhPMDCP3),
107 fhPMDCP4(ta.fhPMDCP4),
108 fhPMDSM1(ta.fhPMDSM1),
109 fhPMDSM2(ta.fhPMDSM2),
110 fhPMDSM3(ta.fhPMDSM3),
111 fhPMDSM4(ta.fhPMDSM4),
112 fhPMDSM5(ta.fhPMDSM5),
113 fhPMDSM6(ta.fhPMDSM6),
114 fhPMDSM7(ta.fhPMDSM7),
115 fhPMDSM8(ta.fhPMDSM8),
116 fhPMDSM9(ta.fhPMDSM9),
117 fhPMDSM10(ta.fhPMDSM10),
118 fhPMDSM11(ta.fhPMDSM11),
119 fhPMDSM12(ta.fhPMDSM12),
120 fhPMDSM13(ta.fhPMDSM13),
121 fhPMDSM14(ta.fhPMDSM14),
122 fhPMDSM15(ta.fhPMDSM15),
123 fhPMDSM16(ta.fhPMDSM16),
124 fhPMDSM17(ta.fhPMDSM17),
125 fhPMDSM18(ta.fhPMDSM18),
126 fhPMDSM19(ta.fhPMDSM19),
127 fhPMDSM20(ta.fhPMDSM20),
128 fhPMDSM21(ta.fhPMDSM21),
129 fhPMDSM22(ta.fhPMDSM22),
130 fhPMDSM23(ta.fhPMDSM23),
131 fhPMDSM24(ta.fhPMDSM24),
137 //_____________________________________________________________________________
138 AliPMDQATask& AliPMDQATask::operator = (const AliPMDQATask& ap)
140 // assignment operator
142 this->~AliPMDQATask();
143 new(this) AliPMDQATask(ap);
147 //______________________________________________________________________________
148 AliPMDQATask::~AliPMDQATask()
151 fOutputContainer->Clear() ;
152 delete fOutputContainer ;
195 //______________________________________________________________________________
196 void AliPMDQATask::ConnectInputData(const Option_t*)
198 // Initialisation of branch container and histograms
200 AliInfo(Form("*** Initialization of %s", GetName())) ;
203 fChain = dynamic_cast<TChain *>(GetInputData(0)) ;
205 AliError(Form("Input 0 for %s not found\n", GetName()));
209 // One should first check if the branch address was taken by some other task
210 char ** address = (char **)GetBranchAddress(0, "ESD");
212 fESD = (AliESD*)(*address);
215 SetBranchAddress(0, "ESD", &fESD);
219 //________________________________________________________________________
220 void AliPMDQATask::CreateOutputObjects()
226 fhPMDP1 = new TH2F("fhPMDP1","XY of Clusters",100,-100.,100.,100,-100.,100.);
227 fhPMDC2 = new TH1F("fhPMDC2","CPV PHI",200,-1,9);
228 fhPMDP2 = new TH1F("fhPMDP2","PRE PHI",200,-1,9);
229 fhPMDC3 = new TH1F("fhPMDC3","CPV Clus",30,0.,500.);
230 fhPMDP3 = new TH1F("fhPMDP3","PRE N-gammalike",20,0.,500.);
231 fhPMDP4 = new TH1F("fhPMDP4","PRE EDEP",30,0.,1000.);
232 fhPMDC5 = new TH1F("fhPMDC5","CPV n-cell",20,0.,100.);
233 fhPMDP5 = new TH1F("fhPMDP5","PMD n-cell",20,0.,100.);
234 fhPMDCP0 = new TH2F("fhPMDCP0","PRE CLUS Quad.1 vs 2",150,0.,300.,150,0.,300.);
235 fhPMDCP1 = new TH2F("fhPMDCP1","PRE CLUS Quad.3 vs 4",150,0.,300.,150,0.,300.);
236 fhPMDCP2 = new TH2F("fhPMDCP2","PRE EDEP Quad.3 vs 4",50,0.,300.,50,0.,300.);
237 fhPMDCP3 = new TH2F("fhPMDCP3","PRE EDEP vs Tot Clus ",10,0.,1000.,10,0.,300.);
238 fhPMDCP4 = new TH2F("fhPMDCP4","PRE Clus vs CPV Clus ",150,0.,200.,150,0.,200.);
240 fhPMDSM1 = new TH2F("fhPMDSM1","PRE Cluster XY",200,-100,100,200,-100,100);
241 fhPMDSM2 = new TH2F("fhPMDSM2","",999,-100.0,100.0,999,-100.0,100.0);
242 fhPMDSM3 = new TH2F("fhPMDSM3","",999,-100.0,100.0,999,-100.0,100.0);
243 fhPMDSM4 = new TH2F("fhPMDSM4","",999,-100.0,100.0,999,-100.0,100.0);
244 fhPMDSM5 = new TH2F("fhPMDSM5","",999,-100.0,100.0,999,-100.0,100.0);
245 fhPMDSM6 = new TH2F("fhPMDSM6","",999,-100.0,100.0,999,-100.0,100.0);
246 fhPMDSM7 = new TH2F("fhPMDSM7","",999,-100.0,100.0,999,-100.0,100.0);
247 fhPMDSM8 = new TH2F("fhPMDSM8","",999,-100.0,100.0,999,-100.0,100.0);
248 fhPMDSM9 = new TH2F("fhPMDSM9","",999,-100.0,100.0,999,-100.0,100.0);
249 fhPMDSM10 = new TH2F("fhPMDSM10","",999,-100.0,100.0,999,-100.0,100.0);
250 fhPMDSM11 = new TH2F("fhPMDSM11","",999,-100.0,100.0,999,-100.0,100.0);
251 fhPMDSM12 = new TH2F("fhPMDSM12","",999,-100.0,100.0,999,-100.0,100.0);
252 fhPMDSM13 = new TH2F("fhPMDSM13","",999,-100.0,100.0,999,-100.0,100.0);
253 fhPMDSM14 = new TH2F("fhPMDSM14","",999,-100.0,100.0,999,-100.0,100.0);
254 fhPMDSM15 = new TH2F("fhPMDSM15","",999,-100.0,100.0,999,-100.0,100.0);
255 fhPMDSM16 = new TH2F("fhPMDSM16","",999,-100.0,100.0,999,-100.0,100.0);
256 fhPMDSM17 = new TH2F("fhPMDSM17","",999,-100.0,100.0,999,-100.0,100.0);
257 fhPMDSM18 = new TH2F("fhPMDSM18","",999,-100.0,100.0,999,-100.0,100.0);
258 fhPMDSM19 = new TH2F("fhPMDSM19","",999,-100.0,100.0,999,-100.0,100.0);
259 fhPMDSM20 = new TH2F("fhPMDSM20","",999,-100.0,100.0,999,-100.0,100.0);
260 fhPMDSM21 = new TH2F("fhPMDSM21","",999,-100.0,100.0,999,-100.0,100.0);
261 fhPMDSM22 = new TH2F("fhPMDSM22","",999,-100.0,100.0,999,-100.0,100.0);
262 fhPMDSM23 = new TH2F("fhPMDSM23","",999,-100.0,100.0,999,-100.0,100.0);
263 fhPMDSM24 = new TH2F("fhPMDSM24","",999,-100.0,100.0,999,-100.0,100.0);
264 fhPMDSM = new TH1F("fhPMDSM","Plot of all 24 Super Modules",24,0,24);
266 // create output container
268 fOutputContainer = new TObjArray(38) ;
269 fOutputContainer->SetName("PMD") ;
271 fOutputContainer->AddAt(fhPMDP1, 0 );
272 fOutputContainer->AddAt(fhPMDC2, 1 );
273 fOutputContainer->AddAt(fhPMDP2, 2 );
274 fOutputContainer->AddAt(fhPMDC3, 3 );
275 fOutputContainer->AddAt(fhPMDP3, 4 );
276 fOutputContainer->AddAt(fhPMDP4, 5 );
277 fOutputContainer->AddAt(fhPMDC5, 6 );
278 fOutputContainer->AddAt(fhPMDP5, 7 );
279 fOutputContainer->AddAt(fhPMDCP0, 8 );
280 fOutputContainer->AddAt(fhPMDCP1, 9);
281 fOutputContainer->AddAt(fhPMDCP2, 10 );
282 fOutputContainer->AddAt(fhPMDCP3, 11 );
283 fOutputContainer->AddAt(fhPMDCP4, 12 );
285 fOutputContainer->AddAt(fhPMDSM1, 13 );
286 fOutputContainer->AddAt(fhPMDSM2, 14 );
287 fOutputContainer->AddAt(fhPMDSM3, 15 );
288 fOutputContainer->AddAt(fhPMDSM4, 16 );
289 fOutputContainer->AddAt(fhPMDSM5, 17 );
290 fOutputContainer->AddAt(fhPMDSM6, 18 );
291 fOutputContainer->AddAt(fhPMDSM7, 19 );
292 fOutputContainer->AddAt(fhPMDSM8, 20 );
293 fOutputContainer->AddAt(fhPMDSM9, 21 );
294 fOutputContainer->AddAt(fhPMDSM10, 22 );
295 fOutputContainer->AddAt(fhPMDSM11, 23 );
296 fOutputContainer->AddAt(fhPMDSM12, 24 );
297 fOutputContainer->AddAt(fhPMDSM13, 25 );
298 fOutputContainer->AddAt(fhPMDSM14, 26 );
299 fOutputContainer->AddAt(fhPMDSM15, 27 );
300 fOutputContainer->AddAt(fhPMDSM16, 28 );
301 fOutputContainer->AddAt(fhPMDSM17, 29 );
302 fOutputContainer->AddAt(fhPMDSM18, 30 );
303 fOutputContainer->AddAt(fhPMDSM19, 31 );
304 fOutputContainer->AddAt(fhPMDSM20, 32 );
305 fOutputContainer->AddAt(fhPMDSM21, 33 );
306 fOutputContainer->AddAt(fhPMDSM22, 34 );
307 fOutputContainer->AddAt(fhPMDSM23, 35 );
308 fOutputContainer->AddAt(fhPMDSM24, 36 );
309 fOutputContainer->AddAt(fhPMDSM, 37 );
312 //______________________________________________________________________________
313 void AliPMDQATask::Exec(Option_t *)
315 // Processing of one event
317 Long64_t entry = fChain->GetReadEntry() ;
320 AliError("fESD is not connected to the input!") ;
324 if ( !((entry-1)%100) )
325 AliInfo(Form("%s ----> Processing event # %lld", (dynamic_cast<TChain *>(fChain))->GetFile()->GetName(), entry)) ;
327 // ************************ PMD
329 AliPMDUtility *cc = new AliPMDUtility();
338 Float_t preCluQUAD[4] ;
339 Float_t cpvCluQUAD[4] ;
340 Float_t preADCQUAD[4] ;
341 Float_t cpvADCQUAD[4] ;
342 Float_t preCelQUAD[4] ;
343 Float_t cpvCelQUAD[4] ;
345 Int_t npmdCl = fESD->GetNumberOfPmdTracks();
347 // ****** The loop over PMD clusters
349 for (Int_t kk = 0; kk < 4 ; kk++) {
350 cpvCluQUAD[kk] = 0.0 ;
351 preCluQUAD[kk] = 0.0 ;
352 cpvCelQUAD[kk] = 0.0 ;
353 preCelQUAD[kk] = 0.0 ;
354 preADCQUAD[kk] = 0.0 ;
359 AliESDPmdTrack * pmdtr = fESD->GetPmdTrack(npmdCl);
360 Int_t det = pmdtr->GetDetector();
361 Float_t clsX = pmdtr->GetClusterX();
362 Float_t clsY = pmdtr->GetClusterY();
363 Float_t clsZ = pmdtr->GetClusterZ();
364 Float_t ncell = pmdtr->GetClusterCells();
365 Float_t adc = pmdtr->GetClusterADC();
367 cc->SetXYZ(clsX,clsY,clsZ);
370 Float_t eta = cc->GetEta();
371 Float_t phi = cc->GetPhi();
373 // Calculating S.Module Number from Cluster .
375 CalculateSMN(clsX, clsY, smn);
378 if(smn >= 0 && smn <= 5) {
380 cpvADCQUAD[0] =+ adc ;
381 cpvCelQUAD[0] =+ ncell ;
383 if(smn >= 6 && smn <=11) {
385 cpvADCQUAD[1] =+ adc ;
386 cpvCelQUAD[1] =+ ncell ;
388 if(smn >=12 && smn <=17) {
390 cpvADCQUAD[2] =+ adc ;
391 cpvCelQUAD[2] =+ ncell ;
393 if(smn >=18 && smn <=23) {
395 cpvADCQUAD[3] =+ adc ;
396 cpvCelQUAD[3] =+ ncell ;
399 if(eta >= 2.3 && eta <= 3.5)
406 if(smn >= 0 && smn <= 5) {
408 preADCQUAD[0] =+ adc ;
409 preCelQUAD[0] =+ ncell ;
411 if(smn >= 6 && smn <=11) {
413 preADCQUAD[1] =+ adc ;
414 preCelQUAD[1] =+ ncell ;
416 if(smn >=12 && smn <=17) {
418 preADCQUAD[2] =+ adc ;
419 preCelQUAD[2] =+ ncell ;
421 if(smn >=18 && smn <=23) {
423 preADCQUAD[3] =+ adc ;
424 preCelQUAD[3] =+ ncell ;
428 if(smn == 0) fhPMDSM1->Fill(-clsX,clsY);
429 if(smn == 0) fhPMDSM1->Fill(-clsX,clsY);
430 if(smn == 1) fhPMDSM2->Fill(-clsX,clsY);
431 if(smn == 2) fhPMDSM3->Fill(-clsX,clsY);
432 if(smn == 3) fhPMDSM4->Fill(-clsX,clsY);
433 if(smn == 4) fhPMDSM5->Fill(-clsX,clsY);
434 if(smn == 5) fhPMDSM6->Fill(-clsX,clsY);
435 if(smn == 6) fhPMDSM7->Fill(-clsX,clsY);
436 if(smn == 7) fhPMDSM8->Fill(-clsX,clsY);
437 if(smn == 8) fhPMDSM9->Fill(-clsX,clsY);
438 if(smn == 9) fhPMDSM10->Fill(-clsX,clsY);
439 if(smn ==10) fhPMDSM11->Fill(-clsX,clsY);
440 if(smn ==11) fhPMDSM12->Fill(-clsX,clsY);
441 if(smn ==12) fhPMDSM13->Fill(-clsX,clsY);
442 if(smn ==13) fhPMDSM14->Fill(-clsX,clsY);
443 if(smn ==14) fhPMDSM15->Fill(-clsX,clsY);
444 if(smn ==15) fhPMDSM16->Fill(-clsX,clsY);
445 if(smn ==16) fhPMDSM17->Fill(-clsX,clsY);
446 if(smn ==17) fhPMDSM18->Fill(-clsX,clsY);
447 if(smn ==18) fhPMDSM19->Fill(-clsX,clsY);
448 if(smn ==19) fhPMDSM20->Fill(-clsX,clsY);
449 if(smn ==20) fhPMDSM21->Fill(-clsX,clsY);
450 if(smn ==21) fhPMDSM22->Fill(-clsX,clsY);
451 if(smn ==22) fhPMDSM23->Fill(-clsX,clsY);
452 if(smn ==23) fhPMDSM24->Fill(-clsX,clsY);
454 if(eta >= 2.3 && eta <= 3.5)
458 fhPMDP1->Fill(clsX,clsY);
461 for (Int_t k = 0 ; k < 4 ; k++) {
462 totCPVClus =+ cpvCluQUAD [k] ;
463 totPREClus =+ preCluQUAD [k] ;
464 totCPVCell =+ cpvCelQUAD [k] ;
465 totPRECell =+ preCelQUAD [k] ;
466 totPREEdep =+ preADCQUAD [k] ;
468 Float_t totCPVpreClus = totPREClus + totCPVClus ;
470 // if(eta >= 2.3 && eta <= 3.5) {
471 fhPMDC3->Fill(totCPVClus);
472 fhPMDP3->Fill(totPREClus);
473 fhPMDP4->Fill(totPREEdep);
474 fhPMDP5->Fill(totPRECell);
475 fhPMDCP0->Fill(preCluQUAD[0],preCluQUAD[1]);
476 fhPMDCP1->Fill(preCluQUAD[2],preCluQUAD[3]);
477 fhPMDCP2->Fill(preADCQUAD[2],preADCQUAD[3]);
478 fhPMDCP3->Fill(totPREEdep,totCPVpreClus);
479 fhPMDCP4->Fill(totPREClus,totCPVClus);
487 PostData(0, fOutputContainer);
490 //______________________________________________________________________________
491 void AliPMDQATask::Terminate(Option_t *)
493 // Processing when the event loop is ended
494 fOutputContainer = (TObjArray*)GetOutputData(0);
496 fhPMDP1 = (TH2F*)fOutputContainer->At(0);
497 fhPMDC2 = (TH1F*)fOutputContainer->At(1);
498 fhPMDP2 = (TH1F*)fOutputContainer->At(2);
499 fhPMDC3 = (TH1F*)fOutputContainer->At(3);
500 fhPMDP3 = (TH1F*)fOutputContainer->At(4);
501 fhPMDP4 = (TH1F*)fOutputContainer->At(5);
502 fhPMDC5 = (TH1F*)fOutputContainer->At(6);
503 fhPMDP5 = (TH1F*)fOutputContainer->At(7);
504 fhPMDCP0 = (TH2F*)fOutputContainer->At(8);
505 fhPMDCP1 = (TH2F*)fOutputContainer->At(9);
506 fhPMDCP2 = (TH2F*)fOutputContainer->At(10);
507 fhPMDCP3 = (TH2F*)fOutputContainer->At(11);
508 fhPMDCP4 = (TH2F*)fOutputContainer->At(12);
510 fhPMDSM1 = (TH2F*)fOutputContainer->At(13);
511 fhPMDSM2 = (TH2F*)fOutputContainer->At(14);
512 fhPMDSM3 = (TH2F*)fOutputContainer->At(15);
513 fhPMDSM4 = (TH2F*)fOutputContainer->At(16);
514 fhPMDSM5 = (TH2F*)fOutputContainer->At(17);
515 fhPMDSM6 = (TH2F*)fOutputContainer->At(18);
516 fhPMDSM7 = (TH2F*)fOutputContainer->At(19);
517 fhPMDSM8 = (TH2F*)fOutputContainer->At(20);
518 fhPMDSM9 = (TH2F*)fOutputContainer->At(21);
519 fhPMDSM10 = (TH2F*)fOutputContainer->At(22);
520 fhPMDSM11 = (TH2F*)fOutputContainer->At(23);
521 fhPMDSM12 = (TH2F*)fOutputContainer->At(24);
522 fhPMDSM13 = (TH2F*)fOutputContainer->At(25);
523 fhPMDSM14 = (TH2F*)fOutputContainer->At(26);
524 fhPMDSM15 = (TH2F*)fOutputContainer->At(27);
525 fhPMDSM16 = (TH2F*)fOutputContainer->At(28);
526 fhPMDSM17 = (TH2F*)fOutputContainer->At(29);
527 fhPMDSM18 = (TH2F*)fOutputContainer->At(30);
528 fhPMDSM19 = (TH2F*)fOutputContainer->At(31);
529 fhPMDSM20 = (TH2F*)fOutputContainer->At(32);
530 fhPMDSM21 = (TH2F*)fOutputContainer->At(33);
531 fhPMDSM22 = (TH2F*)fOutputContainer->At(34);
532 fhPMDSM23 = (TH2F*)fOutputContainer->At(35);
533 fhPMDSM24 = (TH2F*)fOutputContainer->At(36);
534 fhPMDSM = (TH1F*)fOutputContainer->At(37);
536 Bool_t problem = kFALSE ;
537 AliInfo(Form(" *** %s Report:", GetName())) ;
539 gStyle->SetOptStat(110000);
540 gStyle->SetOptFit(1);
542 TCanvas *cPMD0 = new TCanvas("cPMD0","PMD ESD Test #1", 10,10, 600, 600);
543 cPMD0->Range(-100, -100,100 ,100 );
544 fhPMDSM1->SetMarkerColor(2);
546 fhPMDSM1->GetXaxis()->SetTitle("Cluster X");
547 fhPMDSM1->GetYaxis()->SetTitle("Cluster Y");
548 fhPMDSM2->SetMarkerColor(2);
549 fhPMDSM2->Draw("same");
550 fhPMDSM3->SetMarkerColor(2);
551 fhPMDSM3->Draw("same");
552 fhPMDSM4->SetMarkerColor(2);
553 fhPMDSM4->Draw("same");
554 fhPMDSM5->SetMarkerColor(2);
555 fhPMDSM5->Draw("same");
556 fhPMDSM6->SetMarkerColor(2);
557 fhPMDSM6->Draw("same");
558 fhPMDSM7->SetMarkerColor(4);
559 fhPMDSM7->Draw("same");
560 fhPMDSM8->SetMarkerColor(4);
561 fhPMDSM8->Draw("same");
562 fhPMDSM9->SetMarkerColor(4);
563 fhPMDSM9->Draw("same");
564 fhPMDSM10->SetMarkerColor(4);
565 fhPMDSM10->Draw("same");
566 fhPMDSM11->SetMarkerColor(4);
567 fhPMDSM11->Draw("same");
568 fhPMDSM12->SetMarkerColor(4);
569 fhPMDSM12->Draw("same");
570 fhPMDSM13->SetMarkerColor(6);
571 fhPMDSM13->Draw("same");
572 fhPMDSM14->SetMarkerColor(6);
573 fhPMDSM14->Draw("same");
574 fhPMDSM15->SetMarkerColor(6);
575 fhPMDSM15->Draw("same");
576 fhPMDSM16->SetMarkerColor(6);
577 fhPMDSM16->Draw("same");
578 fhPMDSM17->SetMarkerColor(6);
579 fhPMDSM17->Draw("same");
580 fhPMDSM18->SetMarkerColor(6);
581 fhPMDSM18->Draw("same");
582 fhPMDSM19->SetMarkerColor(8);
583 fhPMDSM19->Draw("same");
584 fhPMDSM20->SetMarkerColor(8);
585 fhPMDSM20->Draw("same");
586 fhPMDSM21->SetMarkerColor(8);
587 fhPMDSM21->Draw("same");
588 fhPMDSM22->SetMarkerColor(8);
589 fhPMDSM22->Draw("same");
590 fhPMDSM23->SetMarkerColor(8);
591 fhPMDSM23->Draw("same");
592 fhPMDSM24->SetMarkerColor(8);
593 fhPMDSM24->Draw("same");
596 DrawPMDBoundarySM1();
597 DrawPMDBoundarySM2();
598 DrawPMDBoundarySM3();
599 DrawPMDBoundarySM4();
600 cPMD0->Print("ClusterXY.eps");
602 TCanvas *cPMD1 = new TCanvas("cPMD1"," PMD ESD Test #2",10, 10, 600,600);
605 cPMD1->SetFillColor(0);
606 fhPMDC2->SetLineColor(4);
609 fhPMDP2->SetLineColor(2);
611 cPMD1->Print("CPVPREphi.eps");
613 TCanvas *cPMD2 = new TCanvas("cPMD2","PMD ESD test #3",10, 10, 600, 600);
615 fhPMDSM->SetFillColor(2);
617 cPMD2->Print("AllSMN.eps");
619 TCanvas *cPMD3 = new TCanvas("cPMD3", "PMD ESD test #4",10, 10, 600, 600);
622 fhPMDCP0->SetMarkerColor(9);
625 fhPMDCP1->SetMarkerColor(6);
628 fhPMDP3->SetLineColor(2);
631 fhPMDCP4->SetMarkerColor(3);
633 cPMD3->Print("CPVPREClus.eps");
635 TCanvas *cPMD4 = new TCanvas("cPMD4","PMD ESD test #5", 10, 10, 600, 600);
638 fhPMDC3->SetLineColor(4);
641 fhPMDP4->SetLineColor(2);
643 cPMD4->Print("CPVPREAdc.eps");
646 sprintf(line, ".!tar -zcf %s.tar.gz *.eps", GetName()) ;
647 gROOT->ProcessLine(line);
649 AliInfo(Form("!!! All the eps files are in %s.tar.gz !!!", GetName())) ;
653 report="Problems found, please check!!!";
657 AliInfo(Form("*** %s Summary Report: %s \n",GetName(), report.Data())) ;
660 //______________________________________________________________________________
661 void AliPMDQATask::CalculateSMN( Float_t clsX, Float_t clsY, Int_t & smn) const
663 Double_t xcon[96] = {75.133, 54.204, 53.254, 32.326, 31.376,10.447,
664 75.133, 54.204, 53.254, 32.326, 31.376,10.447,
665 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 9.167, -32.543, -33.493, -75.133,
672 9.167, -32.543, -33.493, -75.133,
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};
684 Double_t ycon[96] = {86.475, 86.475, 86.475, 86.475, 86.475, 86.475,
685 38.225, 38.225, 38.225, 38.225, 38.225, 38.225,
686 37.325, 37.325, 37.325, 37.325, 37.325, 37.325,
687 -10.925, -10.925, -10.925, -10.925, -10.925, -10.925,
688 -86.475, -86.475, -86.475, -86.475, -86.475, -86.475,
689 -38.225, -38.225, -38.225, -38.225, -38.225, -38.225,
690 -37.325, -37.325, -37.325, -37.325, -37.325, -37.325,
691 10.925, 10.925, 10.925, 10.925, 10.925, 10.925,
692 86.475, 86.475, 86.475, 86.475,
693 62.225, 62.225, 62.225, 62.225,
694 61.325, 61.325, 61.325, 61.325,
695 37.075, 37.075, 37.075, 37.075,
696 36.175, 36.175, 36.175, 36.175,
697 11.925, 11.925, 11.925 , 11.925,
698 -86.475, -86.475, -86.475, -86.475,
699 -62.225, -62.225, -62.225, -62.225,
700 -61.325, -61.325, -61.325, -61.325,
701 -37.075, -37.075, -37.075, -37.075,
702 -36.175, -36.175, -36.175, -36.175,
703 -11.925, -11.925, -11.925 , -11.925 };
705 if((clsX <= xcon[0]) && (clsX >= xcon[1]) &&
706 (clsY <= ycon[0]) && (clsY >= ycon[6])) smn = 0 ;
708 else if((clsX <=xcon[2]) && (clsX >= xcon[3]) &&
709 (clsY <= ycon[1]) && (clsY >= ycon[7]))smn = 1 ;
711 else if((clsX <=xcon[4]) && (clsX >= xcon[5]) &&
712 (clsY <= ycon[3]) && (clsY >= ycon[8]))smn = 2 ;
714 else if((clsX <= xcon[0]) && (clsX >= xcon[1]) &&
715 (clsY <= ycon[12]) && (clsY >= ycon[18])) smn = 3 ;
717 else if((clsX <=xcon[2]) && (clsX >= xcon[3]) &&
718 (clsY <= ycon[12]) && (clsY >= ycon[18]))smn = 4 ;
720 else if((clsX <=xcon[4]) && (clsX >= xcon[5]) &&
721 (clsY <= ycon[12]) && (clsY >= ycon[18]))smn = 5 ;
722 //------------------------------------------------------------------
723 else if((clsX >= xcon[24]) && (clsX <= xcon[25]) &&
724 (clsY >= ycon[24]) && (clsY <= ycon[30])) smn = 6 ;
726 else if((clsX >=xcon[26]) && (clsX <= xcon[27]) &&
727 (clsY >= ycon[25]) && (clsY <= ycon[31]))smn = 7 ;
729 else if((clsX >=xcon[28]) && (clsX <= xcon[29]) &&
730 (clsY >= ycon[26]) && (clsY <= ycon[32]))smn = 8 ;
732 else if((clsX >= xcon[24]) && (clsX <= xcon[25]) &&
733 (clsY >= ycon[36]) && (clsY <= ycon[42])) smn = 9 ;
735 else if((clsX >=xcon[26]) && (clsX <= xcon[27]) &&
736 (clsY >= ycon[36]) && (clsY <= ycon[42]))smn = 10;
738 else if((clsX >=xcon[28]) && (clsX <= xcon[29]) &&
739 (clsY >= ycon[36]) && (clsY <= ycon[42]))smn = 11;
740 //------------------------------------------------------------------
741 else if((clsX <= xcon[48]) && (clsX >= xcon[49]) &&
742 (clsY <= ycon[48]) && (clsY >= ycon[52])) smn = 12 ;
744 else if((clsX <=xcon[50]) && (clsX >= xcon[51]) &&
745 (clsY <= ycon[48]) && (clsY >= ycon[52]))smn = 13 ;
747 else if((clsX <=xcon[48]) && (clsX >= xcon[49]) &&
748 (clsY <= ycon[56]) && (clsY >= ycon[60]))smn = 14 ;
750 else if((clsX <=xcon[50]) && (clsX >= xcon[51]) &&
751 (clsY <= ycon[56]) && (clsY >= ycon[60]))smn = 15 ;
753 else if((clsX <=xcon[48]) && (clsX >= xcon[49]) &&
754 (clsY <= ycon[64]) && (clsY >= ycon[68]))smn = 16 ;
756 else if((clsX <=xcon[50]) && (clsX >= xcon[51]) &&
757 (clsY <= ycon[64]) && (clsY >= ycon[68]))smn = 17 ;
758 //--------------------------------------------------------------
759 else if((clsX >= xcon[72]) && (clsX <= xcon[73]) &&
760 (clsY >= ycon[72]) && (clsY <= ycon[76])) smn = 18 ;
762 else if((clsX >=xcon[74]) && (clsX <= xcon[75]) &&
763 (clsY >= ycon[72]) && (clsY <= ycon[76]))smn = 19 ;
765 else if((clsX >=xcon[72]) && (clsX <= xcon[73]) &&
766 (clsY >= ycon[80]) && (clsY <= ycon[84]))smn = 20 ;
768 else if((clsX >=xcon[74]) && (clsX <= xcon[75]) &&
769 (clsY >= ycon[80]) && (clsY <= ycon[84]))smn = 21;
771 else if((clsX >= xcon[72]) && (clsX <= xcon[73]) &&
772 (clsY >= ycon[88]) && (clsY <= ycon[92])) smn = 22 ;
774 else if((clsX >=xcon[74]) && (clsX <= xcon[75]) &&
775 (clsY >= ycon[88]) && (clsY <= ycon[92]))smn = 23 ;
779 //______________________________________________________________________________
780 void AliPMDQATask::DrawPMDBoundary() const
782 // Draw PMD boundaries
784 gStyle->SetLineWidth(2);
785 gStyle->SetLineColor(2);
787 l = new TLine(75.1333, 86.475, -75.1333, 86.475); l->Draw("same");
788 l = new TLine(-75.1333, 86.470,-75.1333, -86.475); l->Draw("same");
789 l = new TLine(-75.1333, -86.475,75.1333, -86.475); l->Draw("same");
790 l = new TLine(75.1333, -86.475,75.1333, 86.475); l->Draw("same");
793 //______________________________________________________________________________
794 void AliPMDQATask::DrawPMDBoundarySM1() const
796 // Draw boundaries of Super Module 1
798 gStyle->SetLineWidth(1);
799 gStyle->SetLineColor(4);
801 l = new TLine(-75.1333, 86.475, -10.447, 86.475); l->Draw("same");
802 l = new TLine(-10.447, 86.475, -10.446, -10.925); l->Draw("same");
803 l = new TLine(-10.446, -10.925, -75.1333,-10.925); l->Draw("same");
804 l = new TLine(-75.1333,-10.925, -75.1333, 86.475); l->Draw("same");
807 //______________________________________________________________________________
808 void AliPMDQATask::DrawPMDBoundarySM2() const
810 // Draw boundaries of Super Module 2
812 gStyle->SetLineWidth(1);
813 gStyle->SetLineColor(4);
815 l = new TLine(75.1333, -86.475, 10.446, -86.475); l->Draw("same");
816 l = new TLine(10.446, -86.475, 10.446, 10.925); l->Draw("same");
817 l = new TLine(10.446, 10.925, 75.1333, 10.925); l->Draw("same");
818 l = new TLine(75.1333, 10.925, 75.1333, -86.475); l->Draw("same");
822 //______________________________________________________________________________
823 void AliPMDQATask::DrawPMDBoundarySM3() const
825 // Draw boundaries of Super Module 3
827 gStyle->SetLineWidth(1);
828 gStyle->SetLineColor(1);
830 l = new TLine( -9.167, 86.475, 75.1333, 86.475); l->Draw("same");
831 l = new TLine(75.1333,86.475, 75.1333, 11.925); l->Draw("same");
832 l = new TLine(75.1333,11.925, -9.167, 11.925); l->Draw("same");
833 l = new TLine( -9.167, 11.925, -9.167, 86.475); l->Draw("same");
836 //______________________________________________________________________________
837 void AliPMDQATask::DrawPMDBoundarySM4() const
839 // Draw boundaries of Super Module 4
841 gStyle->SetLineWidth(1);
842 gStyle->SetLineColor(1);
844 l = new TLine(9.167, -86.475, -75.1333,-86.475); l->Draw("same");
845 l = new TLine(-75.1333,-86.475, -75.1333,-11.925); l->Draw("same");
846 l = new TLine(-75.1333,-11.925, 9.167, -11.925); l->Draw("same");
847 l = new TLine(9.167, -11.925, 9.167, -86.475); l->Draw("same");