Debug printout removed.
[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>
25#include <TFile.h>
26#include <TH1F.h>
27#include <TH1I.h>
28#include <TH2F.h>
29
30// --- Standard library ---
31
32// --- AliRoot header files ---
33
34#include "AliESDEvent.h"
35#include "AliLog.h"
36#include "AliPMDQADataMakerRec.h"
37#include "AliQAChecker.h"
38#include "AliPMDrecpoint1.h"
39#include "AliPMDRawStream.h"
40#include "AliPMDddldata.h"
41#include "AliPMDUtility.h"
42#include "AliESDPmdTrack.h"
78328afd 43//#include "AliPMDRecoParam.h"
a9523c3e 44
45ClassImp(AliPMDQADataMakerRec)
46
47//____________________________________________________________________________
48 AliPMDQADataMakerRec::AliPMDQADataMakerRec() :
4e25ac79 49 AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kPMD), "PMD Quality Assurance Data Maker")
a9523c3e 50{
51 // ctor
52}
53
54//____________________________________________________________________________
55AliPMDQADataMakerRec::AliPMDQADataMakerRec(const AliPMDQADataMakerRec& qadm) :
56 AliQADataMakerRec()
57{
58 //copy ctor
59 SetName((const char*)qadm.GetName()) ;
60 SetTitle((const char*)qadm.GetTitle());
61}
62
63//__________________________________________________________________
64AliPMDQADataMakerRec& AliPMDQADataMakerRec::operator = (const AliPMDQADataMakerRec& qadm )
65{
66 // Equal operator.
67 this->~AliPMDQADataMakerRec();
68 new(this) AliPMDQADataMakerRec(qadm);
69 return *this;
70}
71
72
73//____________________________________________________________________________
74void AliPMDQADataMakerRec::InitRaws()
75{
76 // create Raws histograms in Raws subdir
a9523c3e 77
7d297381 78 const Bool_t expert = kTRUE ;
79 const Bool_t saveCorr = kTRUE ;
80 const Bool_t image = kTRUE ;
81 // Preshower plane
2c1131dd 82
83 TH1I * h0 = new TH1I("hPreEdepM0","ADC Distribution PRE - Module 0", 100, 0, 2000);
84 h0->Sumw2();
7d297381 85 Add2RawsList(h0, 0, !expert, image, !saveCorr);
2c1131dd 86
87 TH1I * h1 = new TH1I("hPreEdepM1","ADC Distribution PRE - Module 1", 100, 0, 2000);
88 h1->Sumw2();
7d297381 89 Add2RawsList(h1, 1, !expert, image, !saveCorr);
a9523c3e 90
2c1131dd 91 TH1I * h2 = new TH1I("hPreEdepM2","ADC Distribution PRE - Module 2", 100, 0, 2000);
92 h2->Sumw2();
7d297381 93 Add2RawsList(h2, 2, !expert, image, !saveCorr);
2c1131dd 94
95 TH1I * h3 = new TH1I("hPreEdepM3","ADC Distribution PRE - Module 3", 100, 0, 2000);
96 h3->Sumw2();
7d297381 97 Add2RawsList(h3, 3, !expert, image, !saveCorr);
a9523c3e 98
2c1131dd 99 TH1I * h4 = new TH1I("hPreEdepM4","ADC Distribution PRE - Module 4", 100, 0, 2000);
100 h4->Sumw2();
7d297381 101 Add2RawsList(h4, 4, !expert, image, !saveCorr);
a9523c3e 102
2c1131dd 103 TH1I * h5 = new TH1I("hPreEdepM5","ADC Distribution PRE - Module 5", 100, 0, 2000);
104 h5->Sumw2();
7d297381 105 Add2RawsList(h5, 5, !expert, image, !saveCorr);
2c1131dd 106
107 TH1I * h6 = new TH1I("hPreEdepM6","ADC Distribution PRE - Module 6", 100, 0, 2000);
108 h6->Sumw2();
7d297381 109 Add2RawsList(h6, 6, !expert, image, !saveCorr);
2c1131dd 110
111 TH1I * h7 = new TH1I("hPreEdepM7","ADC Distribution PRE - Module 7", 100, 0, 2000);
112 h7->Sumw2();
7d297381 113 Add2RawsList(h7, 7, !expert, image, !saveCorr);
2c1131dd 114
115 TH1I * h8 = new TH1I("hPreEdepM8","ADC Distribution PRE - Module 8", 100, 0, 2000);
116 h8->Sumw2();
7d297381 117 Add2RawsList(h8, 8, !expert, image, !saveCorr);
2c1131dd 118
119 TH1I * h9 = new TH1I("hPreEdepM9","ADC Distribution PRE - Module 9", 100, 0, 2000);
120 h9->Sumw2();
7d297381 121 Add2RawsList(h9, 9, !expert, image, !saveCorr);
2c1131dd 122
123 TH1I * h10 = new TH1I("hPreEdepM10","ADC Distribution PRE - Module 10", 100, 0, 2000);
124 h10->Sumw2();
7d297381 125 Add2RawsList(h10, 10, !expert, image, !saveCorr);
2c1131dd 126
127 TH1I * h11 = new TH1I("hPreEdepM11","ADC Distribution PRE - Module 11", 100, 0, 2000);
128 h11->Sumw2();
7d297381 129 Add2RawsList(h11, 11, !expert, image, !saveCorr);
2c1131dd 130
131 TH1I * h12 = new TH1I("hPreEdepM12","ADC Distribution PRE - Module 12", 100, 0, 2000);
132 h12->Sumw2();
7d297381 133 Add2RawsList(h12, 12, !expert, image, !saveCorr);
2c1131dd 134
135 TH1I * h13 = new TH1I("hPreEdepM13","ADC Distribution PRE - Module 13", 100, 0, 2000);
136 h13->Sumw2();
7d297381 137 Add2RawsList(h13, 13, !expert, image, !saveCorr);
2c1131dd 138
139 TH1I * h14 = new TH1I("hPreEdepM14","ADC Distribution PRE - Module 14", 100, 0, 2000);
140 h14->Sumw2();
7d297381 141 Add2RawsList(h14, 14, !expert, image, !saveCorr);
2c1131dd 142
143 TH1I * h15 = new TH1I("hPreEdepM15","ADC Distribution PRE - Module 15", 100, 0, 2000);
144 h15->Sumw2();
7d297381 145 Add2RawsList(h15, 15, !expert, image, !saveCorr);
2c1131dd 146
147 TH1I * h16 = new TH1I("hPreEdepM16","ADC Distribution PRE - Module 16", 100, 0, 2000);
148 h16->Sumw2();
7d297381 149 Add2RawsList(h16, 16, !expert, image, !saveCorr);
2c1131dd 150
151 TH1I * h17 = new TH1I("hPreEdepM17","ADC Distribution PRE - Module 17", 100, 0, 2000);
152 h17->Sumw2();
7d297381 153 Add2RawsList(h17, 17, !expert, image, !saveCorr);
2c1131dd 154
155 TH1I * h18 = new TH1I("hPreEdepM18","ADC Distribution PRE - Module 18", 100, 0, 2000);
156 h18->Sumw2();
7d297381 157 Add2RawsList(h18, 18, !expert, image, !saveCorr);
2c1131dd 158
159 TH1I * h19 = new TH1I("hPreEdepM19","ADC Distribution PRE - Module 19", 100, 0, 2000);
160 h19->Sumw2();
7d297381 161 Add2RawsList(h19, 19, !expert, image, !saveCorr);
2c1131dd 162
163 TH1I * h20 = new TH1I("hPreEdepM20","ADC Distribution PRE - Module 20", 100, 0, 2000);
164 h20->Sumw2();
7d297381 165 Add2RawsList(h20, 20, !expert, image, !saveCorr);
2c1131dd 166
167 TH1I * h21 = new TH1I("hPreEdepM21","ADC Distribution PRE - Module 21", 100, 0, 2000);
168 h21->Sumw2();
7d297381 169 Add2RawsList(h21, 21, !expert, image, !saveCorr);
2c1131dd 170
171 TH1I * h22 = new TH1I("hPreEdepM22","ADC Distribution PRE - Module 22", 100, 0, 2000);
172 h22->Sumw2();
7d297381 173 Add2RawsList(h22, 22, !expert, image, !saveCorr);
2c1131dd 174
175 TH1I * h23 = new TH1I("hPreEdepM23","ADC Distribution PRE - Module 23", 100, 0, 2000);
176 h23->Sumw2();
7d297381 177 Add2RawsList(h23, 23, !expert, image, !saveCorr);
2c1131dd 178
179 // CPV histos
180
181 TH1I * h24 = new TH1I("hCpvEdepM24","ADC Distribution CPV - Module 24", 100, 0, 2000);
182 h24->Sumw2();
7d297381 183 Add2RawsList(h24, 24, !expert, image, !saveCorr);
2c1131dd 184
185 TH1I * h25 = new TH1I("hCpvEdepM25","ADC Distribution CPV - Module 25", 100, 0, 2000);
186 h25->Sumw2();
7d297381 187 Add2RawsList(h25, 25, !expert, image, !saveCorr);
2c1131dd 188
189 TH1I * h26 = new TH1I("hCpvEdepM26","ADC Distribution CPV - Module 26", 100, 0, 2000);
190 h26->Sumw2();
7d297381 191 Add2RawsList(h26, 26, !expert, image, !saveCorr);
2c1131dd 192
193 TH1I * h27 = new TH1I("hCpvEdepM27","ADC Distribution CPV - Module 27", 100, 0, 2000);
194 h27->Sumw2();
7d297381 195 Add2RawsList(h27, 27, !expert, image, !saveCorr);
2c1131dd 196
197 TH1I * h28 = new TH1I("hCpvEdepM28","ADC Distribution CPV - Module 28", 100, 0, 2000);
198 h28->Sumw2();
7d297381 199 Add2RawsList(h28, 28, !expert, image, !saveCorr);
2c1131dd 200
201 TH1I * h29 = new TH1I("hCpvEdepM29","ADC Distribution CPV - Module 29", 100, 0, 2000);
202 h29->Sumw2();
7d297381 203 Add2RawsList(h29, 29, !expert, image, !saveCorr);
2c1131dd 204
205 TH1I * h30 = new TH1I("hCpvEdepM30","ADC Distribution CPV - Module 30", 100, 0, 2000);
206 h30->Sumw2();
7d297381 207 Add2RawsList(h30, 30, !expert, image, !saveCorr);
2c1131dd 208
209 TH1I * h31 = new TH1I("hCpvEdepM31","ADC Distribution CPV - Module 31", 100, 0, 2000);
210 h31->Sumw2();
7d297381 211 Add2RawsList(h31, 31, !expert, image, !saveCorr);
2c1131dd 212
213 TH1I * h32 = new TH1I("hCpvEdepM32","ADC Distribution CPV - Module 32", 100, 0, 2000);
214 h32->Sumw2();
7d297381 215 Add2RawsList(h32, 32, !expert, image, !saveCorr);
2c1131dd 216
217 TH1I * h33 = new TH1I("hCpvEdepM33","ADC Distribution CPV - Module 33", 100, 0, 2000);
218 h33->Sumw2();
7d297381 219 Add2RawsList(h33, 33, !expert, image, !saveCorr);
2c1131dd 220
221 TH1I * h34 = new TH1I("hCpvEdepM34","ADC Distribution CPV - Module 34", 100, 0, 2000);
222 h34->Sumw2();
7d297381 223 Add2RawsList(h34, 34, !expert, image, !saveCorr);
2c1131dd 224
225 TH1I * h35 = new TH1I("hCpvEdepM35","ADC Distribution CPV - Module 35", 100, 0, 2000);
226 h35->Sumw2();
7d297381 227 Add2RawsList(h35, 35, !expert, image, !saveCorr);
2c1131dd 228
229 TH1I * h36 = new TH1I("hCpvEdepM36","ADC Distribution CPV - Module 36", 100, 0, 2000);
230 h36->Sumw2();
7d297381 231 Add2RawsList(h36, 36, !expert, image, !saveCorr);
2c1131dd 232
233 TH1I * h37 = new TH1I("hCpvEdepM37","ADC Distribution CPV - Module 37", 100, 0, 2000);
234 h37->Sumw2();
7d297381 235 Add2RawsList(h37, 37, !expert, image, !saveCorr);
2c1131dd 236
237 TH1I * h38 = new TH1I("hCpvEdepM38","ADC Distribution CPV - Module 38", 100, 0, 2000);
238 h38->Sumw2();
7d297381 239 Add2RawsList(h38, 38, !expert, image, !saveCorr);
2c1131dd 240
241 TH1I * h39 = new TH1I("hCpvEdepM39","ADC Distribution CPV - Module 39", 100, 0, 2000);
242 h39->Sumw2();
7d297381 243 Add2RawsList(h39, 39, !expert, image, !saveCorr);
2c1131dd 244
245 TH1I * h40 = new TH1I("hCpvEdepM40","ADC Distribution CPV - Module 40", 100, 0, 2000);
246 h40->Sumw2();
7d297381 247 Add2RawsList(h40, 40, !expert, image, !saveCorr);
2c1131dd 248
249 TH1I * h41 = new TH1I("hCpvEdepM41","ADC Distribution CPV - Module 41", 100, 0, 2000);
250 h41->Sumw2();
7d297381 251 Add2RawsList(h41, 41, !expert, image, !saveCorr);
2c1131dd 252
253 TH1I * h42 = new TH1I("hCpvEdepM42","ADC Distribution CPV - Module 42", 100, 0, 2000);
254 h42->Sumw2();
7d297381 255 Add2RawsList(h42, 42, !expert, image, !saveCorr);
2c1131dd 256
257 TH1I * h43 = new TH1I("hCpvEdepM43","ADC Distribution CPV - Module 43", 100, 0, 2000);
258 h43->Sumw2();
7d297381 259 Add2RawsList(h43, 43, !expert, image, !saveCorr);
2c1131dd 260
261 TH1I * h44 = new TH1I("hCpvEdepM44","ADC Distribution CPV - Module 44", 100, 0, 2000);
262 h44->Sumw2();
7d297381 263 Add2RawsList(h44, 44, !expert, image, !saveCorr);
2c1131dd 264
265 TH1I * h45 = new TH1I("hCpvEdepM45","ADC Distribution CPV - Module 45", 100, 0, 2000);
266 h45->Sumw2();
7d297381 267 Add2RawsList(h45, 45, !expert, image, !saveCorr);
2c1131dd 268
269 TH1I * h46 = new TH1I("hCpvEdepM46","ADC Distribution CPV - Module 46", 100, 0, 2000);
270 h46->Sumw2();
7d297381 271 Add2RawsList(h46, 46, !expert, image, !saveCorr);
2c1131dd 272
273 TH1I * h47 = new TH1I("hCpvEdepM47","ADC Distribution CPV - Module 47", 100, 0, 2000);
274 h47->Sumw2();
7d297381 275 Add2RawsList(h47, 47, !expert, image, !saveCorr);
2c1131dd 276
277
278 // Y vs. X for PRE and CPV planes
279
280 TH2F * h48 = new TH2F("hPreXY","PRE plane",200,-100.,100.,200,-100.,100.);
7d297381 281 Add2RawsList(h48, 48, !expert, !image, saveCorr);//Ajay
5f7ce82b 282 //Add2RawsList(h48, 48);//Ajay
2c1131dd 283 TH2F * h49 = new TH2F("hCpvXY","CPV plane",200,-100.,100.,200,-100.,100.);
7d297381 284 Add2RawsList(h49, 49, !expert, !image, saveCorr);//Ajay
5f7ce82b 285 //Add2RawsList(h49, 49);//Ajay
a9523c3e 286
a9523c3e 287}
288//____________________________________________________________________________
289void AliPMDQADataMakerRec::InitRecPoints()
290{
291 // create Reconstructed Points histograms in RecPoints subdir
2c1131dd 292
293 /*
a9523c3e 294 TH2F * h0 = new TH2F("hPreXY","RecPoints Y vs X PRE(PMD)", 100,-100.,100.,100,-100.,100.);
2c1131dd 295 Add2RecPointsList(h0,0);
296
a9523c3e 297 TH2F * h1 = new TH2F("hCpvXY","RecPoints Y vs X CPV(PMD)", 100,-100.,100.,100,-100.,100.);
2c1131dd 298 Add2RecPointsList(h1,1);
299 */
a9523c3e 300
2c1131dd 301 // Ncell distribution in a cluster
302
b5144d1f 303 // PRE plane
304
7d297381 305 const Bool_t expert = kTRUE ;
306 const Bool_t image = kTRUE ;
307
2c1131dd 308 TH1F * h0 = new TH1F("hPreDdl0Ncell","PRE: Ddl0 Ncell in a cluster",50,0.,50.);
309 h0->Sumw2();
7d297381 310 Add2RecPointsList(h0, 0, !expert, image);
a9523c3e 311
a9523c3e 312
2c1131dd 313 TH1F * h1 = new TH1F("hPreDdl1Ncell","PRE: Ddl1 Ncell in a cluster",50,0.,50.);
314 h1->Sumw2();
7d297381 315 Add2RecPointsList(h1, 1, !expert, image);
2c1131dd 316
317
318 TH1F * h2 = new TH1F("hPreDdl2Ncell","PRE: Ddl2 Ncell in a cluster",50,0.,50.);
319 h2->Sumw2();
7d297381 320 Add2RecPointsList(h2, 2, !expert, image);
2c1131dd 321
322
323 TH1F * h3 = new TH1F("hPreDdl3Ncell","PRE: Ddl3 Ncell in a cluster",50,0.,50.);
324 h3->Sumw2();
7d297381 325 Add2RecPointsList(h3, 3, !expert, image);
2c1131dd 326
b5144d1f 327 // CPV plane
328
329 TH1F * h4 = new TH1F("hCpvDdl4Ncell","CPV: Ddl4 Ncell in a cluster",50,0.,50.);
2c1131dd 330 h4->Sumw2();
7d297381 331 Add2RecPointsList(h4, 4, !expert, image);
2c1131dd 332
b5144d1f 333 TH1F * h5 = new TH1F("hCpvDdl5Ncell","CPV: Ddl5 Ncell in a cluster",50,0.,50.);
2c1131dd 334 h5->Sumw2();
7d297381 335 Add2RecPointsList(h5, 5, !expert, image);
2c1131dd 336
337 // Correlation plot
338
339 TH2I *h6 = new TH2I("hPre10","Cluster - DDL1 vs DDL0", 100,0,200,100,0,200);
7d297381 340 Add2RecPointsList(h6,6, !expert, image);
2c1131dd 341
342 TH2I *h7 = new TH2I("hPre32","Cluster - DDL3 vs DDL2", 100,0,200,100,0,200);
7d297381 343 Add2RecPointsList(h7,7, !expert, image);
2c1131dd 344
345 TH2I *h8 = new TH2I("hCpv54","Cluster - DDL5 vs DDL4", 100,0,200,100,0,200);
7d297381 346 Add2RecPointsList(h8,8, !expert, image);
a9523c3e 347
a9523c3e 348
349
350}
351
352//____________________________________________________________________________
353
354void AliPMDQADataMakerRec::InitESDs()
355{
356 //Create histograms to controll ESD
2c1131dd 357
7d297381 358 const Bool_t expert = kTRUE ;
359 const Bool_t image = kTRUE ;
360
2c1131dd 361 TH1F *h0 = new TH1F("hPreClADC","Cluster ADC of PRE plane",500,0.,10000.);
a9523c3e 362 h0->Sumw2();
7d297381 363 Add2ESDsList(h0, 0, !expert, image) ;
a9523c3e 364
2c1131dd 365 TH1F *h1 = new TH1F("hCpvClADC","Cluster ADC of CPV plane",500,0.,10000.);
a9523c3e 366 h1->Sumw2();
7d297381 367 Add2ESDsList(h1, 1, !expert, image) ;
a9523c3e 368
2c1131dd 369 TH2I *h2 = new TH2I("hPmdClMult","Cluster Multiplicity: PRE vs. CPVplane",100,0,1000,100,0,1000);
a9523c3e 370 h2->Sumw2();
7d297381 371 Add2ESDsList(h2, 2, !expert, image) ;
a9523c3e 372
2c1131dd 373/*
374 TH1I * h3 = new TH1I("hCpvClMult","Cluster Multiplicity of CPV plane",100,0.,1000.);
a9523c3e 375 h3->Sumw2();
7d297381 376 Add2ESDsList(h3, 3, !expert, image) ;
2c1131dd 377*/
a9523c3e 378
379}
380
381//____________________________________________________________________________
382void AliPMDQADataMakerRec::MakeRaws(AliRawReader* rawReader)
383{
384 //Fill prepared histograms with Raw digit properties
385
5f7ce82b 386 TObjArray *pmdddlcont = 0x0;
2c1131dd 387 pmdddlcont = new TObjArray();
a9523c3e 388 AliPMDRawStream stream(rawReader);
389
2c1131dd 390 AliPMDddldata *pmdddl = 0x0;
a9523c3e 391
2c1131dd 392 Int_t iddl = -1;
393 Int_t xpad = -1;
394 Int_t ypad = -1;
395 Float_t xx, yy;
a9523c3e 396
2c1131dd 397 AliPMDUtility cc;
398
399 while ((iddl = stream.DdlData(pmdddlcont)) >=0)
a9523c3e 400 {
2c1131dd 401 Int_t ientries = pmdddlcont->GetEntries();
a9523c3e 402 //printf(" ======= DDLNO = %d ientries = %d \n", iddl, ientries);
2c1131dd 403
a9523c3e 404 for (Int_t ient = 0; ient < ientries; ient++)
2c1131dd 405 {
406 //AliPMDddldata *pmdddl = (AliPMDddldata*)pmdddlcont->UncheckedAt(ient);
407 pmdddl = (AliPMDddldata*)pmdddlcont->UncheckedAt(ient);
408
409 Int_t det = pmdddl->GetDetector();
410 Int_t smn = pmdddl->GetSMN();
411 Int_t mcm = pmdddl->GetMCM();
a9523c3e 412 //Int_t chno = pmdddl->GetChannel();
2c1131dd 413 Int_t row = pmdddl->GetRow();
414 Int_t col = pmdddl->GetColumn();
a9523c3e 415 Int_t sig = pmdddl->GetSignal();
a9523c3e 416
2c1131dd 417 if (mcm == 0 || smn == -1) continue;
418
419 if (det == 0)
420 {
421 GetRawsData(smn)->Fill(sig);
422 if(smn < 12)
423 {
424 xpad = col;
425 ypad = row;
426 }
427 else if(smn >= 12 && smn < 24)
428 {
429 xpad = row;
430 ypad = col;
431 }
432 cc.RectGeomCellPos(smn,xpad,ypad,xx,yy);
433 GetRawsData(48)->Fill(xx,yy);
434 }
435 if (det == 1)
436 {
437 GetRawsData(24+smn)->Fill(sig);
438 if(smn < 12)
439 {
440 xpad = col;
441 ypad = row;
442 }
443 else if(smn >= 12 && smn < 24)
444 {
445 xpad = row;
446 ypad = col;
447 }
448
449 cc.RectGeomCellPos(smn,xpad,ypad,xx,yy);
450 GetRawsData(49)->Fill(xx,yy);
451
452 }
453
454 }
455
456 pmdddlcont->Delete();
a9523c3e 457 }
2c1131dd 458
459 delete pmdddlcont;
460 pmdddlcont = 0x0;
461
a9523c3e 462}
463//____________________________________________________________________________
464void AliPMDQADataMakerRec::MakeRecPoints(TTree * clustersTree)
465{
466 // makes data from RecPoints
467
b5144d1f 468 Int_t multDdl0 = 0, multDdl1 = 0, multDdl2 = 0;
469 Int_t multDdl3 = 0, multDdl4 = 0, multDdl5 = 0;
2c1131dd 470
a9523c3e 471 AliPMDrecpoint1 * recpoint;
472
2c1131dd 473 TClonesArray * recpoints = 0x0;
474 recpoints = new TClonesArray("AliPMDrecpoint1", 1000) ;
a9523c3e 475
476 TBranch * branch = clustersTree->GetBranch("PMDRecpoint") ;
477 branch->SetAddress(&recpoints) ;
478
479 if ( ! branch )
480 {
b5144d1f 481 AliWarning("PMD branch in Recpoints Tree not found") ;
a9523c3e 482 }
483 else
484 {
485 for (Int_t imod = 0; imod < branch->GetEntries(); imod++)
486 {
487 branch->GetEntry(imod) ;
488
489 TIter next(recpoints) ;
490
491 while ( (recpoint = dynamic_cast<AliPMDrecpoint1 *>(next())) )
2c1131dd 492 {
a9523c3e 493 //Float_t xpos = recpoint->GetClusX();
494 //Float_t ypos = recpoint->GetClusY();
2c1131dd 495 //Int_t smn = recpoint->GetSMNumber();
496
497 if(recpoint->GetDetector() == 0)
498 {
499 if(recpoint->GetSMNumber() >= 0 && recpoint->GetSMNumber() < 6)
500 {
501 GetRecPointsData(0)->Fill(recpoint->GetClusCells());
b5144d1f 502 multDdl0++;
2c1131dd 503 }
504 if(recpoint->GetSMNumber() >= 6 && recpoint->GetSMNumber() < 12)
505 {
506 GetRecPointsData(1)->Fill(recpoint->GetClusCells());
b5144d1f 507 multDdl1++;
2c1131dd 508 }
509 if(recpoint->GetSMNumber() >= 12 && recpoint->GetSMNumber() < 18)
510 {
511 GetRecPointsData(2)->Fill(recpoint->GetClusCells());
b5144d1f 512 multDdl2++;
2c1131dd 513 }
514 if(recpoint->GetSMNumber() >= 18 && recpoint->GetSMNumber() < 24)
515 {
b5144d1f 516 GetRecPointsData(3)->Fill(recpoint->GetClusCells());
517 multDdl3++;
2c1131dd 518 }
519 }
a9523c3e 520
2c1131dd 521 if(recpoint->GetDetector() == 1)
522 {
d6cc2277 523 if((recpoint->GetSMNumber() >= 0 && recpoint->GetSMNumber() < 6) ||
524 (recpoint->GetSMNumber() >= 18 && recpoint->GetSMNumber() < 24))
2c1131dd 525 {
526 GetRecPointsData(4)->Fill(recpoint->GetClusCells());
b5144d1f 527 multDdl4++;
2c1131dd 528 }
529 if(recpoint->GetSMNumber() >= 6 && recpoint->GetSMNumber() < 18 )
530 {
531 GetRecPointsData(5)->Fill(recpoint->GetClusCells());
b5144d1f 532 multDdl5++;
2c1131dd 533 }
534 }
535 }
a9523c3e 536 }
537 }
2c1131dd 538
b5144d1f 539 GetRecPointsData(6)->Fill(multDdl0,multDdl1);
540 GetRecPointsData(7)->Fill(multDdl2,multDdl3);
541 GetRecPointsData(8)->Fill(multDdl4,multDdl5);
2c1131dd 542
543 delete recpoints;
a9523c3e 544
a9523c3e 545}
546
547//____________________________________________________________________________
548
549void AliPMDQADataMakerRec::MakeESDs(AliESDEvent * esd)
550{
551 // make QA data from ESDs
552
553 Int_t premul = 0, cpvmul = 0;
2c1131dd 554
555 for (Int_t icl = 0; icl < esd->GetNumberOfPmdTracks(); icl++)
a9523c3e 556 {
2c1131dd 557 AliESDPmdTrack *pmdtr = esd->GetPmdTrack(icl);
558
559 //Int_t det = pmdtr->GetDetector();
560 //Float_t clsX = pmdtr->GetClusterX();
561 //Float_t clsY = pmdtr->GetClusterY();
562 //Float_t clsZ = pmdtr->GetClusterZ();
563 //Float_t ncell = pmdtr->GetClusterCells();
564 Float_t adc = pmdtr->GetClusterADC();
565 //Float_t pid = pmdtr->GetClusterPID();
566
567 if (pmdtr->GetDetector() == 0)
a9523c3e 568 {
2c1131dd 569 GetESDsData(0)->Fill(adc);
570 premul++;
a9523c3e 571 }
2c1131dd 572 if (pmdtr->GetDetector() == 1)
a9523c3e 573 {
2c1131dd 574 GetESDsData(1)->Fill(adc) ;
575 cpvmul++;
a9523c3e 576 }
577 }
2c1131dd 578
579 GetESDsData(2)->Fill(cpvmul,premul) ;
580 //GetESDsData(3)->Fill(cpvmul) ;
a9523c3e 581}
582
583//____________________________________________________________________________
584
585void AliPMDQADataMakerRec::StartOfDetectorCycle()
586{
587 //Detector specific actions at start of cycle
588
589}
590//____________________________________________________________________________
4e25ac79 591void AliPMDQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
a9523c3e 592{
593 //Detector specific actions at end of cycle
594 // do the QA checking
4e25ac79 595 AliQAChecker::Instance()->Run(AliQAv1::kPMD, task, list) ;
a9523c3e 596}