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