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