removed printout
[u/mrichter/AliRoot.git] / T0 / AliT0QADataMakerRec.cxx
CommitLineData
04236e67 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/* $Id$ */
18
19//---
20// Produces the data needed to calculate the quality assurance.
1d7681da 21// Alla.Maevskaya@cern.ch
04236e67 22//---
23
24// --- ROOT system ---
25#include <TClonesArray.h>
26#include <TFile.h>
27#include <TH1F.h>
1d7681da 28#include <TH2F.h>
04236e67 29#include <TDirectory.h>
30// --- Standard library ---
31
32// --- AliRoot header files ---
33#include "AliESDEvent.h"
34#include "AliLog.h"
35#include "AliT0digit.h"
36#include "AliT0hit.h"
37#include "AliT0RecPoint.h"
38#include "AliT0QADataMakerRec.h"
39#include "AliQAChecker.h"
40#include "AliT0RawReader.h"
41
1d7681da 42#include "Riostream.h"
04236e67 43ClassImp(AliT0QADataMakerRec)
44
45//____________________________________________________________________________
46 AliT0QADataMakerRec::AliT0QADataMakerRec() :
4e25ac79 47AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kT0),
3c85c814 48 "T0 Quality Assurance Data Maker"),
49 fnEvent(0)
04236e67 50
51{
52 // ctor
1d7681da 53 for (Int_t i=0; i<6; i++) {
54 fNumTriggers[i]=0;
55 fNumTriggersCal[i]=0;
04236e67 56 }
b9024d69 57 for (Int_t i=0; i<24; i++)
58 {
59 feffC[i]=0;
60 feffA[i]=0;
394c1a6d 61 feffqtc[i]=0;
62 }
04236e67 63}
64
65//____________________________________________________________________________
66AliT0QADataMakerRec::AliT0QADataMakerRec(const AliT0QADataMakerRec& qadm) :
3c85c814 67 AliQADataMakerRec(),
68 fnEvent(0)
69
04236e67 70{
71 //copy ctor
1d7681da 72 SetName((const char*)qadm.GetName()) ;
04236e67 73 SetTitle((const char*)qadm.GetTitle());
74}
75
76//__________________________________________________________________
77AliT0QADataMakerRec& AliT0QADataMakerRec::operator = (const AliT0QADataMakerRec& qadm )
78{
79 // Equal operator.
80 this->~AliT0QADataMakerRec();
81 new(this) AliT0QADataMakerRec(qadm);
82 return *this;
83}
84//____________________________________________________________________________
4e25ac79 85void AliT0QADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
04236e67 86{
87 //Detector specific actions at end of cycle
88 // do the QA checking
4e25ac79 89 AliQAChecker::Instance()->Run(AliQAv1::kT0, task, list) ;
57acd2d2 90 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
6252ceeb 91 if (! IsValidEventSpecie(specie, list))
eca4fa66 92 continue ;
6252ceeb 93 SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ;
4e25ac79 94 if ( task == AliQAv1::kRAWS ) {
57acd2d2 95 const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"};
96 for (Int_t itr=0; itr<6; itr++) {
97 GetRawsData(197)->Fill(triggers[itr], fNumTriggersCal[itr]);
98 GetRawsData(197)->SetBinContent(itr+1, fNumTriggersCal[itr]);
99 }
57acd2d2 100 }
101 }
04236e67 102}
103
104//____________________________________________________________________________
105void AliT0QADataMakerRec::StartOfDetectorCycle()
106{
107 //Detector specific actions at start of cycle
b9024d69 108 fnEvent=0;
04236e67 109
110}
111
112//____________________________________________________________________________
113void AliT0QADataMakerRec::InitRaws()
114{
115 // create Raw histograms in Raw subdir
7d297381 116 const Bool_t expert = kTRUE ;
117 const Bool_t saveCorr = kTRUE ;
118 const Bool_t image = kTRUE ;
119
1d7681da 120 TString timename, ampname, qtcname, ledname;
121 TString timeCalname, ampCalname, ledCalname, qtcCalname;
04236e67 122
86c020af 123 TH1F* fhRefPoint = new TH1F("hRefPoint","Ref Point", 10,1252170, 1252180);
7d297381 124 Add2RawsList( fhRefPoint,0, !expert, image, !saveCorr);
86c020af 125
1d7681da 126 TH1F *fhRawCFD[24]; TH1F * fhRawLEDamp[24];
127 TH1F *fhRawQTC[24]; TH1F * fhRawLED[24];
128 TH1F *fhRawCFDcal[24]; TH1F * fhRawLEDampcal[24];
129 TH1F *fhRawQTCcal[24]; TH1F * fhRawLEDcal[24];
86c020af 130
04236e67 131 for (Int_t i=0; i<24; i++)
132 {
133 timename ="hRawCFD";
1d7681da 134 ledname = "hRawLED";
04236e67 135 qtcname = "hRawQTC";
1d7681da 136 ampname = "hRawLEDminCFD";
04236e67 137 timename += i;
138 ampname += i;
139 qtcname += i;
1d7681da 140 ledname += i;
394c1a6d 141 fhRawCFD[i] = new TH1F(timename.Data(), Form("%s;CFD [#channels];Counts", timename.Data()),10000,0,10000);
142 Add2RawsList( fhRawCFD[i],i+1, expert, !image, !saveCorr);
143 fhRawLED[i] = new TH1F(ledname.Data(), Form("%s;LED[#channels];Counts", ledname.Data()),10000,0,10000);
144 Add2RawsList( fhRawLED[i],i+24+1, expert, !image, !saveCorr);
145 fhRawLEDamp[i] = new TH1F(ampname.Data(), Form("%s;LED-CFD [#channels];Counts", ampname.Data()),10000,0,10000);
146 Add2RawsList( fhRawLEDamp[i],i+48+1, expert, !image, !saveCorr);
147 fhRawQTC[i] = new TH1F(qtcname.Data(), Form("%s;QTC[#channels];Counts", qtcname.Data()),700,0,7000);
148 Add2RawsList( fhRawQTC[i],i+72+1, expert, image, !saveCorr);
04236e67 149 }
db72ff3b 150 TH1F* fhRawTrigger = new TH1F("hRawTrigger"," phys triggers;Trigger #;Counts",5,0,5);
7d297381 151 Add2RawsList(fhRawTrigger ,97, !expert, image, !saveCorr);
1d7681da 152
394c1a6d 153 TH1F* fhRawMean = new TH1F("hRawMean","online mean signal, physics event;", 1000,10000,10000);
154 Add2RawsList( fhRawMean,98, expert, !image, !saveCorr);
155 TH1F* fhRawVertex = new TH1F("hRawVertex","online vertex signal; counts", 100,0,600);
156 Add2RawsList( fhRawVertex,99, expert, !image, !saveCorr);
157 TH1F* fhRawORA = new TH1F("hRawORA","online OR A; counts", 10000,0,10000);
158 Add2RawsList( fhRawORA,100, expert, !image, !saveCorr);
159 TH1F* fhRawORC = new TH1F("hRawORC","online OR C;counts", 10000,0,10000);
160 Add2RawsList( fhRawORC,101, expert, !image, !saveCorr);
1d7681da 161
5ed41460 162 for (Int_t i=0; i<24; i++)
163 {
164 // for events with trigger CALIBRATION_EVENT
165 timeCalname ="hRawCFDcal";
1d7681da 166 ledCalname = "hRawLEDcal";
167 ampCalname = "hRawLEDminCFDcal";
5ed41460 168 qtcCalname = "hRawQTCcal";
169 timeCalname += i;
1d7681da 170 ledCalname += i;
5ed41460 171 ampCalname += i;
172 qtcCalname += i;
394c1a6d 173 fhRawCFDcal[i] = new TH1F(timeCalname.Data(), Form("%s;Time [ns];Counts", timeCalname.Data()),10000,0,10000);
7d297381 174 Add2RawsList( fhRawCFDcal[i],101+i+1, !expert, image, !saveCorr);
394c1a6d 175 fhRawLEDcal[i] = new TH1F(ledCalname.Data(), Form("%s;Time [ns];Counts", ledCalname.Data()),10000,0,10000);
7d297381 176 Add2RawsList( fhRawLEDcal[i],101+i+24+1, !expert, image, !saveCorr);
394c1a6d 177 fhRawLEDampcal[i] = new TH1F(ampCalname.Data(), Form("%s;Amplitude [ADC counts];Counts", ampCalname.Data()),1000,0,1000);
7d297381 178 Add2RawsList( fhRawLEDampcal[i],101+i+48+1, !expert, image, !saveCorr);
db72ff3b 179 fhRawQTCcal[i] = new TH1F(qtcCalname.Data(), Form("%s;Charge [??];Counts",qtcCalname.Data()),1000,0,7000);
7d297381 180 Add2RawsList( fhRawQTCcal[i],101+i+72+1, !expert, image, !saveCorr);
5ed41460 181 }
1d7681da 182
183 TH1F* fhRawTriggerCal = new TH1F("hRawTriggerCal"," laser triggers",6,0,6);
394c1a6d 184 Add2RawsList(fhRawTriggerCal ,197 , !expert, image, saveCorr);
1d7681da 185
394c1a6d 186 TH1F* fhRawMeanCal = new TH1F("hRawMeanCal","online mean signal, calibration event",
54f32a55 187 10000,0,10000);
1d7681da 188 Add2RawsList( fhRawMeanCal,198);
394c1a6d 189 TH1F* fhRawVertexCal = new TH1F("hRawVertexCal","online vertex signal, calibration event ",
54f32a55 190 10000,0,10000);
394c1a6d 191 Add2RawsList( fhRawVertexCal,199, expert, !image, !saveCorr);
192 TH1F* fhRawORAcal = new TH1F("hRawORAcal","laser OR A; counts", 10000,0,10000);
193 Add2RawsList( fhRawORAcal,200, expert, !image, !saveCorr );
194 TH1F* fhRawORCcal = new TH1F("hRawORCcal","laserOR C;counts ", 10000,0,10000);
195 Add2RawsList( fhRawORCcal,201, expert, !image, !saveCorr);
db72ff3b 196 TH1F* fhMultcal = new TH1F("hMultcal","full mulltiplicity;Multiplicity;Entries", 10000,0,10000);
394c1a6d 197 Add2RawsList( fhMultcal,202, expert, !image, !saveCorr );
db72ff3b 198 TH1F* fhMultScal = new TH1F("hMultScal","full multiplicity with semi-central trigger;Multiplicity;Entries",
54f32a55 199 10000,0,10000);
394c1a6d 200 Add2RawsList( fhMultScal,203, expert, !image, !saveCorr);
db72ff3b 201 TH1F* fhMultCcal = new TH1F("hMultCcal","full multiplicity with central trigger;Multiplicity;Entries",
5ed41460 202 1000,0,10000);
394c1a6d 203 Add2RawsList( fhMultCcal,204, expert, !image, !saveCorr);
1d7681da 204
394c1a6d 205 TH2F* fhEffCFD = new TH2F("hEffCFD","#PMT; #CFD counts/nEvents",24, 0 ,24, 50, 0,5);
eca4fa66 206 fhEffCFD->SetOption("COLZ");
7d297381 207 Add2RawsList( fhEffCFD,205, !expert, !image, saveCorr);
394c1a6d 208 TH2F* fhEffLED = new TH2F("hEffLED","#PMT; #LED counts/nEvent",24, 0 ,24,
b9024d69 209 100, 0, 5);
eca4fa66 210 fhEffLED->SetOption("COLZ");
7d297381 211 Add2RawsList( fhEffLED,206, !expert, !image, saveCorr);
394c1a6d 212 TH2F* fhEffQTC = new TH2F("hEffQTC","#PMT; QTC efficiency%s;",24, 0 ,24, 100,0,5);
eca4fa66 213 fhEffQTC->SetOption("COLZ");
7d297381 214 Add2RawsList( fhEffQTC,207, !expert, !image, saveCorr);
394c1a6d 215
216 TH2F* fhCFDcal = new TH2F("hCFDcal","#PMT; CFD {#channnels}",25, 0 ,25, 1000,0,5000);
217 fhCFDcal->SetOption("COLZ");
218 Add2RawsList( fhCFDcal,208, !expert, image, !saveCorr);
219 TH2F* fhLEDcal = new TH2F("hLEDcal","#PMT; LED [#channnels]",25, 0 ,25, 1000,0,5000);
220 fhLEDcal->SetOption("COLZ");
221 Add2RawsList( fhLEDcal,209, !expert, image, !saveCorr);
222
223 const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"};
eca4fa66 224 for (Int_t itr=0; itr<6; itr++) {
225 GetRawsData(197)->Fill(triggers[itr], fNumTriggersCal[itr]);
226 GetRawsData(197)->SetBinContent(itr+1, fNumTriggersCal[itr]);
227 }
44ed7a66 228}
229
230//____________________________________________________________________________
231void AliT0QADataMakerRec::InitDigits()
232{
233 // create Digits histograms in Digits subdir
234 const Bool_t expert = kTRUE ;
235 const Bool_t image = kTRUE ;
236
f628b9d2 237 TH2F * fhDigCFD = new TH2F("fhDigCFD", " CFD digits; #PMT; CFD digits[#channels]",25,-0.5,24.5,100,0,1000);
eca4fa66 238 fhDigCFD->SetOption("COLZ");
f628b9d2 239 Add2DigitsList( fhDigCFD,0, !expert, image);
240 TH2F *fhDigLEDamp = new TH2F("fhDigLEDamp", " LED-CFD digits; #PMT; LED-CFD amplitude ",25,-0.5,24.5,100,100,1000);
eca4fa66 241 fhDigLEDamp->SetOption("COLZ");
394c1a6d 242 Add2DigitsList( fhDigLEDamp,1, !expert, !image);
f628b9d2 243 TH2F * fhDigQTC = new TH2F("fhDigQTC", " QTC digits; #PMT; QTC amplitude",25,-0.5,24.5,100,100,10000);
eca4fa66 244 fhDigQTC->SetOption("COLZ");
394c1a6d 245 Add2DigitsList( fhDigQTC,2, !expert, !image);}
04236e67 246
247//____________________________________________________________________________
248
249void AliT0QADataMakerRec::InitRecPoints()
250{
251 // create cluster histograms in RecPoint subdir
7d297381 252 const Bool_t expert = kTRUE ;
253 const Bool_t image = kTRUE ;
1d7681da 254
db72ff3b 255 TH2F* fhRecCFD = new TH2F("hRecCFD"," CFD time;Time [ns];Counts",24, 0 ,24,
b9024d69 256 100,-50,50);
eca4fa66 257 fhRecCFD->SetOption("COLZ");
7d297381 258 Add2RecPointsList ( fhRecCFD,0, !expert, image);
b9024d69 259
db72ff3b 260 TH2F* fhRecAmpDiff = new TH2F("hRecAmpDiff"," LED-CFD min QTC amplitude;Amplitude [ADC counts];Counts",
b9024d69 261 24, 0 ,24, 200,-10,10);
eca4fa66 262 fhRecAmpDiff->SetOption("COLZ");
7d297381 263 Add2RecPointsList (fhRecAmpDiff, 1, !expert, image);
04236e67 264
f628b9d2 265 TH1F *fhMean = new TH1F("hMean","online - rec mean;online - rec mean[#channels];",2000, -1000, 1000);
7d297381 266 Add2RecPointsList ( fhMean,2, !expert, image);
eca4fa66 267
268}
04236e67 269
270//____________________________________________________________________________
271void AliT0QADataMakerRec::InitESDs()
272{
273 //create ESDs histograms in ESDs subdir
7d297381 274 const Bool_t expert = kTRUE ;
275 const Bool_t image = kTRUE ;
276
f628b9d2 277 TH1F *fhESDMean = new TH1F("hESDmean"," ESD mean; mean time[%channels]",1000,0,1000);
7d297381 278 Add2ESDsList(fhESDMean, 0, !expert, image) ;
f628b9d2 279 TH1F * fhESDVertex = new TH1F("hESDvertex","ESDvertex; vertex[cm];",82,-30,30);
7d297381 280 Add2ESDsList(fhESDVertex, 1, !expert, image) ;
c724dd64 281
04236e67 282
283}
284
285//____________________________________________________________________________
286void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader)
287{
eca4fa66 288
78328afd 289 rawReader->Reset() ;
04236e67 290 //fills QA histos for RAW
5ed41460 291 Int_t shift=0;
394c1a6d 292 Float_t effic=0 ;
b9024d69 293
86c020af 294 AliT0RawReader *start = new AliT0RawReader(rawReader);
394c1a6d 295
86c020af 296 if (! start->Next())
5379c4a3 297 AliDebug(AliQAv1::GetQADebugLevel(),Form(" no raw data found!!"));
86c020af 298 else
299 {
b9024d69 300 fnEvent++;
301
5ed41460 302 UInt_t type =rawReader->GetType();
86c020af 303 Int_t allData[110][5];
304 for (Int_t i0=0; i0<105; i0++)
305 {
306 for (Int_t j0=0; j0<5; j0++) allData[i0][j0]=0;
04236e67 307 }
86c020af 308 for (Int_t i=0; i<105; i++)
309 for (Int_t iHit=0; iHit<5; iHit++)
310 allData[i][iHit]= start->GetData(i,iHit);
311
1d7681da 312 if (allData[0][0]>0) GetRawsData(0) -> Fill( allData[0][0]);
394c1a6d 313 Int_t refpoint = allData[0][0];
314 // allData[0][0] = allData[0][0] - 7000;
315 if (type == 8) {shift=101; refpoint=allData[0][0] - 5000;}
f6c2d5e2 316 if (type == 7) shift=0;
1d7681da 317
86c020af 318 for (Int_t ik = 0; ik<12; ik++){
394c1a6d 319 for (Int_t iHt=0; iHt<1; iHt++){
1d7681da 320 //cfd
394c1a6d 321 if(allData[ik+1][iHt]>0) {
1d7681da 322 GetRawsData(shift+ik+1) ->
394c1a6d 323 Fill(allData[ik+1][iHt]-refpoint);
324 if(type == 8 ) {
325 feffC[ik]++;
326 GetRawsData(208)->Fill(ik+1, allData[ik+1][iHt]-refpoint);
327 }
328 } //led
329 if(allData[ik+13][iHt] > 0) {
1d7681da 330 GetRawsData(shift+ik+24+1)->
394c1a6d 331 Fill(allData[ik+13][iHt]-refpoint);
332 if(type == 8 ) {
333 feffA[ik]++;
334 GetRawsData(209)->Fill(ik+1, allData[ik+13][iHt]-refpoint);
335 }
336 }
1d7681da 337 //led -cfd
338
339 if(allData[ik+13][iHt] > 0 && allData[ik+1][iHt] >0 )
340 GetRawsData(shift+ik+48+1)->
341 Fill(allData[ik+13][iHt]-allData[ik+1][iHt]);
342 //qtc
394c1a6d 343 if(allData[2*ik+25][iHt] > 0 || allData[2*ik+26][iHt] > 0) {
1d7681da 344 GetRawsData(shift+ik+72+1)->
394c1a6d 345 Fill(allData[2*ik+26][iHt]-allData[2*ik+25][iHt]);
346 if(type == 8 ) feffqtc[ik]++;
347 }
04236e67 348 }
394c1a6d 349 effic=0;
b9024d69 350 effic = Float_t(feffC[ik])/Float_t(fnEvent);
394c1a6d 351 GetRawsData(205)->Fill(ik+1,effic );
352 effic=0;
b9024d69 353 effic = Float_t(feffA[ik])/Float_t(fnEvent);
394c1a6d 354 GetRawsData(206)->Fill(ik+1,effic );
355 effic=0;
356 effic = Float_t(feffqtc[ik])/Float_t(fnEvent);
357 GetRawsData(207)->Fill(ik+1, effic);
86c020af 358 }
86c020af 359 for (Int_t ik = 12; ik<24; ik++) {
394c1a6d 360 for (Int_t iHt=0; iHt<1; iHt++) {
361 if(allData[ik+45][iHt]>0) {
1d7681da 362 //cfd
363 GetRawsData(shift+ik+1)->
394c1a6d 364 Fill(allData[ik+45][iHt]-refpoint);
365 if(type == 8 ) {
366 feffC[ik]++;
367 GetRawsData(208)->Fill(ik+1, allData[ik+45][iHt]-refpoint);
368 }
369 }
1d7681da 370 //led
394c1a6d 371 if(allData[ik+57][iHt] > 0 ) {
1d7681da 372 GetRawsData(shift+ik+24+1)->
394c1a6d 373 Fill(allData[ik+57][iHt]-refpoint);
374 if(type == 8 ) {
375 feffA[ik]++;
376 GetRawsData(209)->Fill(ik+1, allData[ik+57][iHt]-refpoint);
377 }
378 }
379 //qtc
380 if(allData[2*ik+57][iHt]>0 || allData[2*ik+58][iHt]>0)
381 {
382 GetRawsData(shift+ik+72+1)->
383 Fill(allData[2*ik+58][iHt]-allData[2*ik+57][iHt]);
384 if(type == 8 ) feffqtc[ik]++;
385 }
386 //led-cfd
1d7681da 387 if(allData[ik+57][iHt] > 0 &&allData[ik+45][iHt]>0)
388 GetRawsData(shift+ik+48+1)->
389 Fill(allData[ik+57][iHt]-allData[ik+45][iHt]);
86c020af 390 }
b9024d69 391 effic = Float_t(feffC[ik])/Float_t(fnEvent);
392 GetRawsData(205)->Fill(ik,effic );
393 effic = Float_t(feffA[ik])/Float_t(fnEvent);
394 GetRawsData(206)->Fill(ik,effic );
394c1a6d 395 effic=0;
396 effic = Float_t(feffqtc[ik])/Float_t(fnEvent);
397 GetRawsData(207)->Fill(ik+1, effic);
86c020af 398 }
b9024d69 399
1d7681da 400 Int_t trChannel[6] = {49,50,51,52,55,56};
394c1a6d 401
402 if(type == 7)
5ed41460 403 {
1d7681da 404 for (Int_t iHt=0; iHt<6; iHt++) {
405 for (Int_t itr=0; itr<6; itr++) {
406 if(allData[trChannel[itr]][iHt]>0) fNumTriggers[itr]++;
407 }
f6c2d5e2 408 }
5ed41460 409 }
394c1a6d 410
411 if(type == 8)
412 {
f6c2d5e2 413 for (Int_t iHt=0; iHt<5; iHt++) {
1d7681da 414 for (Int_t itr=0; itr<6; itr++) {
415 if(allData[trChannel[itr]][iHt]>0)
416 {
417
418 GetRawsData(198+itr)->Fill(allData[trChannel[itr]][iHt]-allData[1][0]);
419
420 fNumTriggersCal[itr]++;
421 }
422 }
b9024d69 423 if(allData[53][iHt]>0 && allData[54][iHt]>0)
424 GetRawsData(204)->Fill(allData[53][iHt]-allData[54][iHt]);
f6c2d5e2 425 }
1d7681da 426 }
394c1a6d 427
f628b9d2 428 delete start;
b9024d69 429 }
86c020af 430 }
1d7681da 431
432
04236e67 433
44ed7a66 434//____________________________________________________________________________
435void AliT0QADataMakerRec::MakeDigits( TTree *digitsTree)
436{
437 //fills QA histos for Digits
eca4fa66 438
44ed7a66 439 TArrayI *digCFD = new TArrayI(24);
440 TArrayI *digLED = new TArrayI(24);
441 TArrayI *digQT0 = new TArrayI(24);
442 TArrayI *digQT1 = new TArrayI(24);
443 Int_t refpoint=0;
444
445 TBranch *brDigits=digitsTree->GetBranch("T0");
446 AliT0digit *fDigits = new AliT0digit() ;
447 if (brDigits) {
448 brDigits->SetAddress(&fDigits);
449 }else{
450 AliError(Form("EXEC Branch T0 digits not found"));
451 return;
452 }
453 digitsTree->GetEvent(0);
454 digitsTree->GetEntry(0);
455 brDigits->GetEntry(0);
456 fDigits->GetTimeCFD(*digCFD);
457 fDigits->GetTimeLED(*digLED);
458 fDigits->GetQT0(*digQT0);
459 fDigits->GetQT1(*digQT1);
460 refpoint = fDigits->RefPoint();
461 for (Int_t i=0; i<24; i++)
462 {
463 if (digCFD->At(i)>0) {
464 Int_t cfd=digCFD->At(i)- refpoint;
465 GetDigitsData(0) ->Fill(i,cfd);
f628b9d2 466 GetDigitsData(1) -> Fill(i, (digLED->At(i) - digCFD->At(i)));
44ed7a66 467 GetDigitsData(2) -> Fill(i, (digQT1->At(i) - digQT0->At(i)));
468 }
469 }
470
471 delete digCFD;
472 delete digLED;
473 delete digQT0;
474 delete digQT1;
475
476}
477
04236e67 478//____________________________________________________________________________
479void AliT0QADataMakerRec::MakeRecPoints(TTree * clustersTree)
480{
481 //fills QA histos for clusters
482
446d6ec4 483 AliT0RecPoint* frecpoints= new AliT0RecPoint ();
f628b9d2 484 if (!frecpoints) {
394c1a6d 485 AliError(":MakeRecPoints >> no recpoints found");
04236e67 486 return;
487 }
488 TBranch *brRec =clustersTree ->GetBranch("T0");
489 if (brRec) {
490 brRec->SetAddress(&frecpoints);
491 }else{
f628b9d2 492 AliError(Form("EXEC Branch T0 rec not found "));
493 return;
04236e67 494 }
eca4fa66 495
04236e67 496 brRec->GetEntry(0);
f628b9d2 497
04236e67 498 for ( Int_t i=0; i<24; i++) {
1d7681da 499 if(i<12)
b9024d69 500 GetRecPointsData(0) -> Fill(i, frecpoints -> GetTime(i) - frecpoints -> GetTime(0));
1d7681da 501 if(i>11)
b9024d69 502 GetRecPointsData(0) -> Fill(i, frecpoints -> GetTime(i) - frecpoints -> GetTime(12));
503 GetRecPointsData(1) -> Fill( i, frecpoints -> GetAmp(i) - frecpoints->AmpLED(i));
04236e67 504 }
b9024d69 505 Double_t mmm=frecpoints->GetOnlineMean()- frecpoints->GetMeanTime();
f628b9d2 506 GetRecPointsData(2) ->Fill(mmm);
04236e67 507
508}
509
510//____________________________________________________________________________
511void AliT0QADataMakerRec::MakeESDs(AliESDEvent * esd)
512{
513 //fills QA histos for ESD
f628b9d2 514
04236e67 515 GetESDsData(0) -> Fill(esd->GetT0());
516 GetESDsData(1)-> Fill(esd->GetT0zVertex());
f628b9d2 517
04236e67 518}