ATO-98 - function returns also status value
[u/mrichter/AliRoot.git] / PMD / AliPMDQADataMakerRec.cxx
CommitLineData
a9523c3e 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16
17/*
18 Produces the data needed to calculate the quality assurance.
19 All data must be mergeable objects.
20 B.K. Nandi
21*/
22
23// --- ROOT system ---
24#include <TClonesArray.h>
6d4a951b 25#include <TFile.h>
26#include <TH1D.h>
a9523c3e 27#include <TH1F.h>
28#include <TH1I.h>
29#include <TH2F.h>
30
31// --- Standard library ---
32
33// --- AliRoot header files ---
34
35#include "AliESDEvent.h"
36#include "AliLog.h"
37#include "AliPMDQADataMakerRec.h"
38#include "AliQAChecker.h"
5192f264 39#include "AliPMDdigit.h"
a9523c3e 40#include "AliPMDrecpoint1.h"
41#include "AliPMDRawStream.h"
42#include "AliPMDddldata.h"
43#include "AliPMDUtility.h"
44#include "AliESDPmdTrack.h"
78328afd 45//#include "AliPMDRecoParam.h"
a9523c3e 46
47ClassImp(AliPMDQADataMakerRec)
48
49//____________________________________________________________________________
50 AliPMDQADataMakerRec::AliPMDQADataMakerRec() :
4e25ac79 51 AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kPMD), "PMD Quality Assurance Data Maker")
a9523c3e 52{
53 // ctor
54}
55
56//____________________________________________________________________________
57AliPMDQADataMakerRec::AliPMDQADataMakerRec(const AliPMDQADataMakerRec& qadm) :
58 AliQADataMakerRec()
59{
60 //copy ctor
61 SetName((const char*)qadm.GetName()) ;
62 SetTitle((const char*)qadm.GetTitle());
63}
64
65//__________________________________________________________________
66AliPMDQADataMakerRec& AliPMDQADataMakerRec::operator = (const AliPMDQADataMakerRec& qadm )
67{
68 // Equal operator.
69 this->~AliPMDQADataMakerRec();
70 new(this) AliPMDQADataMakerRec(qadm);
71 return *this;
72}
73
74
75//____________________________________________________________________________
6d4a951b 76void AliPMDQADataMakerRec::InitRaws() {
a9523c3e 77 // create Raws histograms in Raws subdir
a9523c3e 78
7d297381 79 const Bool_t expert = kTRUE ;
80 const Bool_t saveCorr = kTRUE ;
81 const Bool_t image = kTRUE ;
6fb728a5 82
6d4a951b 83
84 TH1F *h0 = new TH1F("hDdl2304","Cell Wise Frequency for PRE Plane DDL 2304;DDL2304;Frequency",50000 ,0,50000.0);
85 TH1F *h1 = new TH1F("hDdl2305","Cell Wise Frequency for PRE Plane DDL 2305;DDL2305;Frequency",50000 ,0,50000.0);
86 TH1F *h2 = new TH1F("hDdl2308","Cell Wise Frequency for CPV Plane DDL 2308;DDL2308;Frequency",50000 ,0,50000.0);
87 TH1F *h3 = new TH1F("hDdl2309","Cell Wise Frequency for CPV Plane DDL 2309;DDL2309;Frequency",50000 ,0,50000.0);
88
89 for(int i = 0; i < 50; i++ ) {
90 h0->GetXaxis()->SetBinLabel(i*1000+300,Form("%2d",i+1));
91 h1->GetXaxis()->SetBinLabel(i*1000+300,Form("%2d",i+1));
92 h2->GetXaxis()->SetBinLabel(i*1000+300,Form("%2d",i+1));
93 h3->GetXaxis()->SetBinLabel(i*1000+300,Form("%2d",i+1));
94 }
2c1131dd 95
2c1131dd 96
6d4a951b 97 Add2RawsList(h0, 0, expert, image, saveCorr);
98 Add2RawsList(h1, 1, expert, image, saveCorr);
99 Add2RawsList(h2, 2, expert, image, saveCorr);
100 Add2RawsList(h3, 3, expert, image, saveCorr);
101
2c1131dd 102
6d4a951b 103 TH2F *hPreXY = new TH2F("hPreXY","PRE plane;X [cm];Y [cm]",200,-100.,100.,200,-100.,100.);
104 Add2RawsList(hPreXY, 4, expert, !image, saveCorr);
6fb728a5 105
6d4a951b 106 TH2F *hCpvXY = new TH2F("hCpvXY","CPV plane;X [cm];Y [cm]",200,-100.,100.,200,-100.,100.);
107 Add2RawsList(hCpvXY, 5, expert, !image, saveCorr);
6fb728a5 108
6d4a951b 109 TH1F *hQuality1 = new TH1F("hPmdQualityWAdc","Quality Plot SumWAdc/SumWAdc;#eta Bins (PRE <---> CPV);Quality",25,0,25);
110 TH1F *hQuality2 = new TH1F("hPmdQualityHit","Quality Plot Hit/Hit;#eta Bins (PRE <---> CPV);Quality",25,0,25);
2c1131dd 111
6d4a951b 112 for(int i = 0; i < 10; i++ ) {
113 hQuality1->GetXaxis()->SetBinLabel(i+3,Form("%2d",i+1));
114 hQuality2->GetXaxis()->SetBinLabel(i+3,Form("%2d",i+1));
2c1131dd 115
6d4a951b 116 hQuality1->GetXaxis()->SetBinLabel(i+15,Form("%2d",i+1));
117 hQuality2->GetXaxis()->SetBinLabel(i+15,Form("%2d",i+1));
118 }
2c1131dd 119
6d4a951b 120 Add2RawsList(hQuality1, 6, !expert, image, saveCorr);
121 Add2RawsList(hQuality2, 7, !expert, image, saveCorr);
122
123 TH1F *hMP = new TH1F("hPmdMultiplicityP"," Cell Hit Distribution with adc>40; Multiplicity; Entries",1000,0,7000);
124 TH1F *hMC = new TH1F("hPmdMultiplicityC"," Cell Hit Distribution with adc>40; Multiplicity; Entries",1000,0,7000);
125 Add2RawsList(hMP, 8, expert, !image, saveCorr);
126 Add2RawsList(hMC, 9, expert, !image, saveCorr);
6fb728a5 127
6d4a951b 128
129
130
92664bc8 131 ClonePerTrigClass(AliQAv1::kRAWS); // this should be the last line
a9523c3e 132}
44ed7a66 133
134//____________________________________________________________________________
135void AliPMDQADataMakerRec::InitDigits()
136{
137 // create Digits histograms in Digits subdir
138 const Bool_t expert = kTRUE ;
139 const Bool_t image = kTRUE ;
140
db72ff3b 141 TH1F *h0 = new TH1F("hPreDigitsEdep","Digits energy distribution in PRE(PMD);Amplitude [ADC counts];Counts", 100, 0., 2000.);
44ed7a66 142 h0->Sumw2();
143 Add2DigitsList(h0, 0, !expert, image);
144
db72ff3b 145 TH1F *h1 = new TH1F("hCpvDigitsEdep","Digits energy distribution in CPV(PMD);Amplitude [ADC counts];Counts", 100, 0., 2000.);
44ed7a66 146 h1->Sumw2();
147 Add2DigitsList(h1, 1, !expert, image);
148
db72ff3b 149 TH1I *h2 = new TH1I("hPreDigitsMult","Digits multiplicity distribution in PRE(PMD);# of Digits;Entries", 500, 0, 1000) ;
44ed7a66 150 h2->Sumw2();
151 Add2DigitsList(h2, 2, !expert, image);
152
db72ff3b 153 TH1I *h3 = new TH1I("hCpvDigitsMult","Digits multiplicity distribution in CPV(PMD);# of Digits;Entries", 500, 0, 1000);
44ed7a66 154 h3->Sumw2();
db72ff3b 155 Add2DigitsList(h3, 3, !expert, image);
92664bc8 156 //
157 ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
44ed7a66 158}
159
a9523c3e 160//____________________________________________________________________________
161void AliPMDQADataMakerRec::InitRecPoints()
162{
163 // create Reconstructed Points histograms in RecPoints subdir
2c1131dd 164
165 /*
a9523c3e 166 TH2F * h0 = new TH2F("hPreXY","RecPoints Y vs X PRE(PMD)", 100,-100.,100.,100,-100.,100.);
2c1131dd 167 Add2RecPointsList(h0,0);
168
a9523c3e 169 TH2F * h1 = new TH2F("hCpvXY","RecPoints Y vs X CPV(PMD)", 100,-100.,100.,100,-100.,100.);
2c1131dd 170 Add2RecPointsList(h1,1);
171 */
a9523c3e 172
2c1131dd 173 // Ncell distribution in a cluster
174
b5144d1f 175 // PRE plane
176
7d297381 177 const Bool_t expert = kTRUE ;
178 const Bool_t image = kTRUE ;
179
db72ff3b 180 TH1F * h0 = new TH1F("hPreDdl0Ncell","PRE: Ddl0 Ncell in a cluster;# of cells;Counts",50,0.,50.);
2c1131dd 181 h0->Sumw2();
7d297381 182 Add2RecPointsList(h0, 0, !expert, image);
a9523c3e 183
a9523c3e 184
db72ff3b 185 TH1F * h1 = new TH1F("hPreDdl1Ncell","PRE: Ddl1 Ncell in a cluste;# of cells;Countsr",50,0.,50.);
2c1131dd 186 h1->Sumw2();
7d297381 187 Add2RecPointsList(h1, 1, !expert, image);
2c1131dd 188
189
db72ff3b 190 TH1F * h2 = new TH1F("hPreDdl2Ncell","PRE: Ddl2 Ncell in a cluster;# of cells;Counts",50,0.,50.);
2c1131dd 191 h2->Sumw2();
7d297381 192 Add2RecPointsList(h2, 2, !expert, image);
2c1131dd 193
194
db72ff3b 195 TH1F * h3 = new TH1F("hPreDdl3Ncell","PRE: Ddl3 Ncell in a cluster;# of cells;Counts",50,0.,50.);
2c1131dd 196 h3->Sumw2();
7d297381 197 Add2RecPointsList(h3, 3, !expert, image);
2c1131dd 198
b5144d1f 199 // CPV plane
200
db72ff3b 201 TH1F * h4 = new TH1F("hCpvDdl4Ncell","CPV: Ddl4 Ncell in a cluster;# of cells;Counts",50,0.,50.);
2c1131dd 202 h4->Sumw2();
7d297381 203 Add2RecPointsList(h4, 4, !expert, image);
2c1131dd 204
db72ff3b 205 TH1F * h5 = new TH1F("hCpvDdl5Ncell","CPV: Ddl5 Ncell in a cluster;# of cells;Counts",50,0.,50.);
2c1131dd 206 h5->Sumw2();
7d297381 207 Add2RecPointsList(h5, 5, !expert, image);
2c1131dd 208
209 // Correlation plot
210
db72ff3b 211 TH2I *h6 = new TH2I("hPre10","Cluster - DDL1 vs DDL0;DDL0;DDL1", 100,0,200,100,0,200);
7d297381 212 Add2RecPointsList(h6,6, !expert, image);
2c1131dd 213
db72ff3b 214 TH2I *h7 = new TH2I("hPre32","Cluster - DDL3 vs DDL2;DDL2;DDL3", 100,0,200,100,0,200);
7d297381 215 Add2RecPointsList(h7,7, !expert, image);
2c1131dd 216
6d4a951b 217
db72ff3b 218 TH2I *h8 = new TH2I("hCpv54","Cluster - DDL5 vs DDL4;DDL4;DDL5", 100,0,200,100,0,200);
7d297381 219 Add2RecPointsList(h8,8, !expert, image);
92664bc8 220 //
221 ClonePerTrigClass(AliQAv1::kRECPOINTS); // this should be the last line
a9523c3e 222}
223
224//____________________________________________________________________________
225
226void AliPMDQADataMakerRec::InitESDs()
227{
228 //Create histograms to controll ESD
2c1131dd 229
7d297381 230 const Bool_t expert = kTRUE ;
231 const Bool_t image = kTRUE ;
232
db72ff3b 233 TH1F *h0 = new TH1F("hPreClADC","Cluster ADC of PRE plane;# of clusters;Counts",500,0.,10000.);
a9523c3e 234 h0->Sumw2();
7d297381 235 Add2ESDsList(h0, 0, !expert, image) ;
a9523c3e 236
db72ff3b 237 TH1F *h1 = new TH1F("hCpvClADC","Cluster ADC of CPV plane;# of clusters;Counts",500,0.,10000.);
a9523c3e 238 h1->Sumw2();
7d297381 239 Add2ESDsList(h1, 1, !expert, image) ;
a9523c3e 240
db72ff3b 241 TH2I *h2 = new TH2I("hPmdClMult","Cluster Multiplicity: PRE vs. CPVplane;CPV multiplicity;PRE Multiplicity",100,0,1000,100,0,1000);
a9523c3e 242 h2->Sumw2();
7d297381 243 Add2ESDsList(h2, 2, !expert, image) ;
a9523c3e 244
92664bc8 245 /*
246 TH1I * h3 = new TH1I("hCpvClMult","Cluster Multiplicity of CPV plane",100,0.,1000.);
247 h3->Sumw2();
248 Add2ESDsList(h3, 3, !expert, image) ;
249 */
250 //
251 ClonePerTrigClass(AliQAv1::kESDS); // this should be the last line
a9523c3e 252}
253
254//____________________________________________________________________________
255void AliPMDQADataMakerRec::MakeRaws(AliRawReader* rawReader)
256{
92664bc8 257 //Fill prepared histograms with Raw digit properties
a9523c3e 258
eca4fa66 259 TObjArray *pmdddlcont = 0x0;
2c1131dd 260 pmdddlcont = new TObjArray();
a9523c3e 261 AliPMDRawStream stream(rawReader);
262
2c1131dd 263 AliPMDddldata *pmdddl = 0x0;
a9523c3e 264
6d4a951b 265 Int_t iddl = 1;
266 Int_t sddl = -1;
be8b7039 267 Float_t xx = 0., yy = 0.;
a9523c3e 268
6d4a951b 269 Double_t eta;
270 Int_t etaindex = 0;
271
272 Float_t nDdl1[10] = {0,0,0,0,0,0,0,0,0,0};
273 Float_t nDdl2[10] = {1,1,1,1,1,1,1,1,1,1};
274 Float_t nDdl3[10] = {0,0,0,0,0,0,0,0,0,0};
275 Float_t nDdl4[10] = {1,1,1,1,1,1,1,1,1,1};
276
277 Float_t nDdl1a[10] = {1,1,1,1,1,1,1,1,1,1};
278 Float_t nDdl2a[10] = {1,1,1,1,1,1,1,1,1,1};
279 Float_t nDdl3a[10] = {1,1,1,1,1,1,1,1,1,1};
280 Float_t nDdl4a[10] = {1,1,1,1,1,1,1,1,1,1};
281
282 Float_t nDdl11[10] = {1,1,1,1,1,1,1,1,1,1};
283 Float_t nDdl22[10] = {1,1,1,1,1,1,1,1,1,1};
284 Float_t nDdl33[10] = {1,1,1,1,1,1,1,1,1,1};
285 Float_t nDdl44[10] = {1,1,1,1,1,1,1,1,1,1};
286
287 Float_t nddlp = 0;
288 Float_t nddlc = 0;
289
2c1131dd 290 AliPMDUtility cc;
291
6d4a951b 292
293
2c1131dd 294 while ((iddl = stream.DdlData(pmdddlcont)) >=0)
a9523c3e 295 {
2c1131dd 296 Int_t ientries = pmdddlcont->GetEntries();
a9523c3e 297 //printf(" ======= DDLNO = %d ientries = %d \n", iddl, ientries);
6d4a951b 298 if(iddl == 0 || iddl == 1) sddl = iddl;
299 if(iddl == 4 ) sddl = 2;
300 if(iddl == 5 ) sddl = 3;
2c1131dd 301
a9523c3e 302 for (Int_t ient = 0; ient < ientries; ient++)
2c1131dd 303 {
2c1131dd 304 pmdddl = (AliPMDddldata*)pmdddlcont->UncheckedAt(ient);
305
6d4a951b 306 Int_t det = pmdddl->GetDetector();
307 Int_t smn = pmdddl->GetSMN();
308 Int_t mcm = pmdddl->GetMCM();
309 Int_t chno = pmdddl->GetChannel();
310 Int_t pbus = pmdddl->GetPatchBusId();
311 Int_t row = pmdddl->GetRow();
312 Int_t col = pmdddl->GetColumn();
313 Int_t sig = pmdddl->GetSignal();
314
f15229be 315 if (mcm == 0) continue;
6d4a951b 316
f15229be 317 if (det < 0 || det > 1) continue;
318 if (smn < 0 || smn > 23) continue;
319 if (row < 0 || row > 47) continue;
320 if (col < 0 || col > 95) continue;
6d4a951b 321
322 Int_t rc = pbus*1000 + mcm*64 + chno;
2c1131dd 323
6d4a951b 324 if(sddl == 0) FillRawsData(0,rc);
325 else if(sddl == 1) FillRawsData(1,rc);
326 else if(sddl == 2) FillRawsData(2,rc);
327 else if(sddl == 3) FillRawsData(3,rc);
6fb728a5 328
6d4a951b 329 cc.GetEtaIndexXY(smn,row,col,xx,yy,eta,etaindex);
330
cbbd7bab 331 if(etaindex >= 0 && etaindex <10) {
6d4a951b 332
333 if(sddl == 0) {
334 nDdl1a[etaindex] += 1;
335 nDdl1[etaindex] += sig;
336 if(sig >40) {
337 nDdl11[etaindex] += 1;
338 nddlp += 1;
2c1131dd 339 }
6d4a951b 340
341 }
342 else if(sddl == 1) {
343 nDdl2a[etaindex] += 1;
344 nDdl2[etaindex] += sig;
345 if(sig >40) {
346 nDdl22[etaindex] += 1;
347 nddlp += 1;
2c1131dd 348 }
6d4a951b 349
6fb728a5 350
6d4a951b 351 }
352 else if(sddl == 2) {
353 nDdl3a[etaindex] += 1;
354 nDdl3[etaindex] += sig;
355 if(sig >40) {
356 nDdl33[etaindex] += 1;
357 nddlc += 1;
358 }
359 }
360 else if(sddl == 3) {
361 nDdl4a[etaindex] += 1;
362 nDdl4[etaindex] += sig;
363 if(sig >40) {
364 nDdl44[etaindex] += 1;
365 nddlc += 1;
2c1131dd 366 }
6d4a951b 367 }
2c1131dd 368
369 }
370
6d4a951b 371 if (det == 0) FillRawsData(4,xx,yy);
372 else if (det == 1) FillRawsData(5,xx,yy);
373
2c1131dd 374 }
375
376 pmdddlcont->Delete();
a9523c3e 377 }
2c1131dd 378
6d4a951b 379
2c1131dd 380 delete pmdddlcont;
381 pmdddlcont = 0x0;
6d4a951b 382
383 if(nddlp != 0) FillRawsData(8,nddlp);
384 if(nddlc != 0) FillRawsData(9,nddlc);
385
386
387 ResetRawsData(6);
388 ResetRawsData(7);
389 for (Int_t i = 0; i < 10; i++) {
390
391 Float_t prerC = nDdl11[i]/nDdl22[i];
392 Float_t cpvrC = nDdl33[i]/nDdl44[i];
393
394 Float_t prera =(nDdl1[i]/nDdl1a[i])/(nDdl2[i]/nDdl2a[i]);
395 Float_t cpvra =(nDdl3[i]/nDdl3a[i])/(nDdl4[i]/nDdl4a[i]);
396
397
398 FillRawsData(6,i+2,prera);
399 FillRawsData(6,i+14,cpvra);
400 FillRawsData(7,i+2,prerC);
401 FillRawsData(7,i+14,cpvrC);
402 }
403
92664bc8 404 IncEvCountCycleRaws();
405 IncEvCountTotalRaws();
6d4a951b 406
92664bc8 407 //
a9523c3e 408}
409//____________________________________________________________________________
6252ceeb 410void AliPMDQADataMakerRec::MakeDigits()
44ed7a66 411{
412 // makes data from Digits
413
6252ceeb 414 Int_t cpvmul = 0, premul = 0;
44ed7a66 415
6252ceeb 416 TIter next(fDigitsArray) ;
44ed7a66 417 AliPMDdigit * digit ;
418 while ( (digit = dynamic_cast<AliPMDdigit *>(next())) )
419 {
420 if(digit->GetDetector() == 0)
421 {
92664bc8 422 FillDigitsData(0, digit->GetADC()) ;
44ed7a66 423 premul++;
424 }
425 if(digit->GetDetector() == 1)
426 {
92664bc8 427 FillDigitsData(1, digit->GetADC());
44ed7a66 428 cpvmul++;
429 }
430 }
431
92664bc8 432 if (premul > 0) FillDigitsData(2,premul);
433 if (cpvmul > 0) FillDigitsData(3,cpvmul);
44ed7a66 434
435
436}
437
438//____________________________________________________________________________
439void AliPMDQADataMakerRec::MakeDigits(TTree * digitTree)
440{
441 // makes data from Digit Tree
442
6252ceeb 443 if (fDigitsArray)
444 fDigitsArray->Clear() ;
445 else
446 fDigitsArray = new TClonesArray("AliPMDdigit", 1000) ;
44ed7a66 447
448 TBranch * branch = digitTree->GetBranch("PMDDigit") ;
92664bc8 449 if ( ! branch ) {AliWarning("PMD branch in Digit Tree not found"); return;}
450 //
451 branch->SetAddress(&fDigitsArray) ;
452 for (Int_t ient = 0; ient < branch->GetEntries(); ient++) {
453 branch->GetEntry(ient) ;
454 MakeDigits() ;
455 }
456 //
457 IncEvCountCycleDigits();
458 IncEvCountTotalDigits();
459 //
44ed7a66 460}
461
462//____________________________________________________________________________
a9523c3e 463void AliPMDQADataMakerRec::MakeRecPoints(TTree * clustersTree)
464{
465 // makes data from RecPoints
466
eca4fa66 467 Int_t multDdl0 = 0, multDdl1 = 0, multDdl2 = 0;
db06ef51 468 Int_t multDdl3 = 0, multDdl4 = 0, multDdl5 = 0;
469
470 AliPMDrecpoint1 * recpoint;
471
6252ceeb 472 if (fRecPointsArray)
473 fRecPointsArray->Clear() ;
474 else
475 fRecPointsArray = new TClonesArray("AliPMDrecpoint1", 1000) ;
db06ef51 476
477 TBranch * branch = clustersTree->GetBranch("PMDRecpoint") ;
a9523c3e 478
db06ef51 479 if ( ! branch )
a9523c3e 480 {
db06ef51 481 AliWarning("PMD branch in Recpoints Tree not found") ;
a9523c3e 482 }
db06ef51 483 else
a9523c3e 484 {
db06ef51 485 branch->SetAddress(&fRecPointsArray) ;
486
487 for (Int_t imod = 0; imod < branch->GetEntries(); imod++)
a9523c3e 488 {
db06ef51 489 branch->GetEntry(imod) ;
490
491 TIter next(fRecPointsArray) ;
492
493 while ( (recpoint = dynamic_cast<AliPMDrecpoint1 *>(next())) )
494 {
495 //Float_t xpos = recpoint->GetClusX();
496 //Float_t ypos = recpoint->GetClusY();
497 //Int_t smn = recpoint->GetSMNumber();
498
499 if(recpoint->GetDetector() == 0)
500 {
501 if(recpoint->GetSMNumber() >= 0 && recpoint->GetSMNumber() < 6)
502 {
92664bc8 503 FillRecPointsData(0,recpoint->GetClusCells());
db06ef51 504 multDdl0++;
505 }
506 if(recpoint->GetSMNumber() >= 6 && recpoint->GetSMNumber() < 12)
507 {
92664bc8 508 FillRecPointsData(1,recpoint->GetClusCells());
db06ef51 509 multDdl1++;
510 }
511 if(recpoint->GetSMNumber() >= 12 && recpoint->GetSMNumber() < 18)
512 {
92664bc8 513 FillRecPointsData(2,recpoint->GetClusCells());
db06ef51 514 multDdl2++;
515 }
516 if(recpoint->GetSMNumber() >= 18 && recpoint->GetSMNumber() < 24)
517 {
92664bc8 518 FillRecPointsData(3,recpoint->GetClusCells());
db06ef51 519 multDdl3++;
520 }
521 }
522
523 if(recpoint->GetDetector() == 1)
524 {
525 if((recpoint->GetSMNumber() >= 0 && recpoint->GetSMNumber() < 6) ||
526 (recpoint->GetSMNumber() >= 18 && recpoint->GetSMNumber() < 24))
527 {
92664bc8 528 FillRecPointsData(4,recpoint->GetClusCells());
db06ef51 529 multDdl4++;
530 }
531 if(recpoint->GetSMNumber() >= 6 && recpoint->GetSMNumber() < 18 )
532 {
92664bc8 533 FillRecPointsData(5,recpoint->GetClusCells());
db06ef51 534 multDdl5++;
535 }
536 }
537 }
a9523c3e 538 }
539 }
db06ef51 540
92664bc8 541 FillRecPointsData(6,multDdl0,multDdl1);
542 FillRecPointsData(7,multDdl2,multDdl3);
543 FillRecPointsData(8,multDdl4,multDdl5);
544 //
545 IncEvCountCycleRecPoints();
546 IncEvCountTotalRecPoints();
547 //
a9523c3e 548}
549
550//____________________________________________________________________________
551
552void AliPMDQADataMakerRec::MakeESDs(AliESDEvent * esd)
553{
554 // make QA data from ESDs
555
eca4fa66 556 Int_t premul = 0, cpvmul = 0;
2c1131dd 557
558 for (Int_t icl = 0; icl < esd->GetNumberOfPmdTracks(); icl++)
a9523c3e 559 {
2c1131dd 560 AliESDPmdTrack *pmdtr = esd->GetPmdTrack(icl);
561
562 //Int_t det = pmdtr->GetDetector();
563 //Float_t clsX = pmdtr->GetClusterX();
564 //Float_t clsY = pmdtr->GetClusterY();
565 //Float_t clsZ = pmdtr->GetClusterZ();
566 //Float_t ncell = pmdtr->GetClusterCells();
567 Float_t adc = pmdtr->GetClusterADC();
568 //Float_t pid = pmdtr->GetClusterPID();
569
570 if (pmdtr->GetDetector() == 0)
a9523c3e 571 {
92664bc8 572 FillESDsData(0,adc);
2c1131dd 573 premul++;
a9523c3e 574 }
2c1131dd 575 if (pmdtr->GetDetector() == 1)
a9523c3e 576 {
92664bc8 577 FillESDsData(1,adc) ;
2c1131dd 578 cpvmul++;
a9523c3e 579 }
580 }
2c1131dd 581
92664bc8 582 FillESDsData(2,cpvmul,premul) ;
583 //FillESDsData(3,cpvmul) ;
584 //
585 IncEvCountCycleESDs();
586 IncEvCountTotalESDs();
587 //
a9523c3e 588}
589
590//____________________________________________________________________________
591
592void AliPMDQADataMakerRec::StartOfDetectorCycle()
593{
594 //Detector specific actions at start of cycle
595
596}
597//____________________________________________________________________________
4e25ac79 598void AliPMDQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
a9523c3e 599{
600 //Detector specific actions at end of cycle
601 // do the QA checking
4e25ac79 602 AliQAChecker::Instance()->Run(AliQAv1::kPMD, task, list) ;
a9523c3e 603}