Allow fetching of the default local logging level.
[u/mrichter/AliRoot.git] / ITS / AliITSQASPDDataMakerRec.cxx
CommitLineData
096292ae 1/**************************************************************************
2 * Copyright(c) 2007-2009, 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 **************************************************************************/
3f905799 15/* $Id$ */
096292ae 16// *************************************************************
17// Checks the quality assurance
18// by comparing with reference data
19// contained in a DB
20// -------------------------------------------------------------
21// W. Ferrarese + P. Cerello Feb 2008
22// INFN Torino
23// M. Nicassio D. Elia INFN Bari March 2008
24// maria.nicassio@ba.infn.it
25
26
27// --- ROOT system ---
28#include <TTree.h>
96d29da9 29#include <TH1I.h>
30#include <TH1F.h>
31#include <TH2F.h>
096292ae 32#include <TMath.h>
33// --- Standard library ---
34
35// --- AliRoot header files ---
36#include "AliITSQADataMakerRec.h"
37#include "AliITSQASPDDataMakerRec.h"
38#include "AliLog.h"
4e25ac79 39#include "AliQAv1.h"
096292ae 40#include "AliRawReader.h"
379510c2 41#include "AliITSRawStreamSPD.h"
42#include "AliITSRawStreamSPDErrorLog.h"
33626263 43#include "AliITSdigitSPD.h"
096292ae 44#include "AliITSRecPoint.h"
e62fe478 45#include "AliITSRecPointContainer.h"
379510c2 46
096292ae 47ClassImp(AliITSQASPDDataMakerRec)
48
49//____________________________________________________________________________
379510c2 50AliITSQASPDDataMakerRec::AliITSQASPDDataMakerRec(AliITSQADataMakerRec *aliITSQADataMakerRec, Bool_t kMode, Short_t ldc, AliITSRawStreamSPDErrorLog *aliITSRawStreamSPDErrorLog) :
096292ae 51TObject(),
52fAliITSQADataMakerRec(aliITSQADataMakerRec),
53fkOnline(kMode),
54fLDC(ldc),
7a0e5776 55fSPDhRawsTask(0),
44ed7a66 56fSPDhDigitsTask(0),
7a0e5776 57fSPDhRecPointsTask(0),
58fGenRawsOffset(0),
44ed7a66 59fGenDigitsOffset(0),
7a0e5776 60fGenRecPointsOffset(0),
379510c2 61fAdvLogger(aliITSRawStreamSPDErrorLog)
096292ae 62{
63 //ctor used to discriminate OnLine-Offline analysis
8b7e858c 64 //AliInfo(Form("AliRecoParam::kNSpecies %d\n",AliRecoParam::kNSpecies));
65 fGenRawsOffset = new Int_t[AliRecoParam::kNSpecies];
66 fGenRecPointsOffset = new Int_t[AliRecoParam::kNSpecies];
4a903927 67 fGenDigitsOffset = new Int_t[AliRecoParam::kNSpecies];
8b7e858c 68 for(Int_t i=0; i<AliRecoParam::kNSpecies;i++) {
69 fGenRawsOffset[i] = 0;
70 fGenRecPointsOffset[i] = 0;
4a903927 71 fGenDigitsOffset[i]=0;
8b7e858c 72 }
096292ae 73}
74
75//____________________________________________________________________________
76AliITSQASPDDataMakerRec::AliITSQASPDDataMakerRec(const AliITSQASPDDataMakerRec& qadm) :
77TObject(),
78fAliITSQADataMakerRec(qadm.fAliITSQADataMakerRec),
79fkOnline(qadm.fkOnline),
80fLDC(qadm.fLDC),
7a0e5776 81fSPDhRawsTask(qadm.fSPDhRawsTask),
44ed7a66 82fSPDhDigitsTask(qadm.fSPDhDigitsTask),
7a0e5776 83fSPDhRecPointsTask(qadm.fSPDhRecPointsTask),
84fGenRawsOffset(qadm.fGenRawsOffset),
44ed7a66 85fGenDigitsOffset(qadm.fGenDigitsOffset),
7a0e5776 86fGenRecPointsOffset(qadm.fGenRecPointsOffset),
379510c2 87fAdvLogger(qadm.fAdvLogger)
096292ae 88{
89 //copy ctor
90 fAliITSQADataMakerRec->SetName((const char*)qadm.fAliITSQADataMakerRec->GetName()) ;
91 fAliITSQADataMakerRec->SetTitle((const char*)qadm.fAliITSQADataMakerRec->GetTitle());
92 }
93
94//__________________________________________________________________
95AliITSQASPDDataMakerRec::~AliITSQASPDDataMakerRec(){
96 // destructor
379510c2 97// delete fAdvLogger;
096292ae 98}
99//__________________________________________________________________
100
101AliITSQASPDDataMakerRec& AliITSQASPDDataMakerRec::operator = (const AliITSQASPDDataMakerRec& qac )
102{
103 // Equal operator.
104 this->~AliITSQASPDDataMakerRec();
105 new(this) AliITSQASPDDataMakerRec(qac);
106 return *this;
107}
108
109//____________________________________________________________________________
110void AliITSQASPDDataMakerRec::StartOfDetectorCycle()
111{
112 //Detector specific actions at start of cycle
5379c4a3 113 AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of SPD Cycle\n");
096292ae 114}
115
116//____________________________________________________________________________
96d29da9 117void AliITSQASPDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray* list)
096292ae 118{
119 // launch the QA checking
5379c4a3 120 AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n");
96d29da9 121 if(!list){
122 AliError(" Histogram list is NULL");
123 return;
124 }
125
66133c2f 126 Int_t shift = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
127
128 if(task == AliQAv1::kRAWS) {
96d29da9 129 if(!list->At(0+shift)) {
130 AliError(" no histogram 0 at the end of detector cycle in raws");
131 return;
132 }
777d16ea 133 ((TH2I*)list->At(5+shift))->Reset(); // clean up MEB histo (needed at the first cycle for small statistics)
96d29da9 134
777d16ea 135 ((TH1F*)list->At(7+shift))->Divide(((TH1F*)list->At(1+shift)),((TH1F*)list->At(0+shift)));
136 ((TH1F*)list->At(8+shift))->Divide(((TH1F*)list->At(2+shift)),((TH1F*)list->At(0+shift)));
137 ((TH1F*)list->At(9+shift))->Divide(((TH1F*)list->At(3+shift)),((TH1F*)list->At(4+shift)));
138
139 for(Int_t i=0; i<1200; i++){
140 if(((TH1F*)list->At(8+shift))->GetBinContent(i+1)>0.5 && ((TH1F*)list->At(9+shift))->GetBinContent(i+1)>0.5){
141 Int_t eq=i/60;
142 Int_t hs=(i%60)/10;
143 Int_t chip = (i%60)%10;
144 Int_t sect = 999; Int_t chipbin = 999;
145 if(eq<10) {sect = eq; chipbin = 19-chip;}
146 else {sect = eq-10; chipbin = chip;}
147 ((TH2I*)list->At(5+shift))->Fill(sect*6+hs,chipbin);
96d29da9 148 }
66133c2f 149 }
777d16ea 150
151 } // QA Task Index == RAWS
096292ae 152}
153
154//____________________________________________________________________________
eca4fa66 155Int_t AliITSQASPDDataMakerRec::InitRaws()
096292ae 156{
96d29da9 157
096292ae 158 // Initialization for RAW data - SPD -
7d297381 159 const Bool_t expert = kTRUE ;
160 const Bool_t saveCorr = kTRUE ;
161 const Bool_t image = kTRUE ;
eca4fa66 162 Int_t rv = 0 ;
777d16ea 163
8bab7823 164 if(!fAdvLogger) fAdvLogger = new AliITSRawStreamSPDErrorLog();
5379c4a3 165 AliDebug(AliQAv1::GetQADebugLevel(), "Book Offline Histograms for SPD\n ");
439e7a8a 166
379510c2 167 Char_t name[50];
168 Char_t title[50];
66133c2f 169 // offset for online histogram numbering
170 Int_t shift = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
171
172
777d16ea 173 Float_t range[2] = {-0.5,1199.5};
096292ae 174
66133c2f 175// ********** online histo booking (shift is added) *********************
176
96d29da9 177 //0
178 TH1F *hFiredChips = new TH1F("SPDFiredChips_OnlineSPD","FiredChips - SPD",fgkSPDchips,range[0],range[1]);
66133c2f 179 hFiredChips->GetXaxis()->SetTitle("chip index (eq*60 + hs*10 + chip)");
180 hFiredChips->GetYaxis()->SetTitle("Fired Chip yield");
96d29da9 181 rv = fAliITSQADataMakerRec->Add2RawsList(hFiredChips, 0+shift, expert, !image, !saveCorr);
182 fSPDhRawsTask++;
183 // 1
184 TH1F *hFastOrFiredChips = new TH1F("SPDFastOrFiredChips_OnlineSPD","FastOr-Fired Chips (if pixel hit present) - SPD",fgkSPDchips,range[0],range[1]);
185 hFastOrFiredChips->GetXaxis()->SetTitle("chip index (eq*60 + hs*10 + chip)");
186 hFastOrFiredChips->GetYaxis()->SetTitle("FastOr-Fired Chip yield (per event)");
187 rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrFiredChips, 1+shift, expert, !image, !saveCorr);
66133c2f 188 fSPDhRawsTask++;
189// 2
96d29da9 190 TH1F *hFastOrMissing = new TH1F("SPDFastOrMissing_OnlineSPD","Missing FastOr signal - SPD",fgkSPDchips,range[0],range[1]);
66133c2f 191 hFastOrMissing->GetXaxis()->SetTitle("chip index (eq*60 + hs*10 + chip)");
192 hFastOrMissing->GetYaxis()->SetTitle("Missing Fast Or yield");
193 rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrMissing, 2+shift, expert, !image, !saveCorr);
194 fSPDhRawsTask++;
195// 3
96d29da9 196 TH1F *hFastOrNoisy = new TH1F("SPDFastOrNoisy_OnlineSPD","Noisy (no pixel hit present) FastOr signal - SPD",fgkSPDchips,range[0],range[1]);
66133c2f 197 hFastOrNoisy->GetXaxis()->SetTitle("chipkey");
198 hFastOrNoisy->GetYaxis()->SetTitle("Noisy Fast Or");
199 rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrNoisy, 3+shift, expert, !image, !saveCorr);
200 fSPDhRawsTask++;
201// 4
96d29da9 202 TH1F *hFastOrCumulative = new TH1F("SPDFastOrCumulative_OnlineSPD","Cumulative FastOr signal - SPD",fgkSPDchips,range[0],range[1]);
203 hFastOrCumulative->GetXaxis()->SetTitle("chipkey");
204 hFastOrCumulative->GetYaxis()->SetTitle("Cumulative Fast Or yield");
205 rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrCumulative, 4+shift, expert, !image, !saveCorr);
206 fSPDhRawsTask++;
66133c2f 207// 5
777d16ea 208
209 TH2I *hSPDChipsMEB = new TH2I("SPDChipsMEB_OnlineSPD","Chips with MEB problem - SPD",60,-0.5,59.5,20,-0.2,19.5);
210 hSPDChipsMEB->GetXaxis()->SetTitle("Stave");
211 hSPDChipsMEB->GetXaxis()->SetNdivisions(60,kFALSE);
212 hSPDChipsMEB->GetYaxis()->SetTitle("SIDE C -> SIDE A Chip");
213 hSPDChipsMEB->GetYaxis()->SetNdivisions(20,kFALSE);
214 hSPDChipsMEB->SetMarkerStyle(21);
215 hSPDChipsMEB->SetMarkerColor(kRed);
216 for(Int_t ibinx =0; ibinx< hSPDChipsMEB->GetNbinsX(); ibinx++){
217 if(ibinx%6==0) hSPDChipsMEB->GetXaxis()->SetBinLabel(ibinx+1,Form("Sector %i__%i",ibinx/6,ibinx%6));
218 else hSPDChipsMEB->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",ibinx%6));
219 }
220 for(Int_t ibiny =0; ibiny< hSPDChipsMEB->GetNbinsY(); ibiny++){
221 if(ibiny < 10) hSPDChipsMEB->GetYaxis()->SetBinLabel(ibiny+1,Form("%i",ibiny));
222 else hSPDChipsMEB->GetYaxis()->SetBinLabel(ibiny+1,Form("%i",19-ibiny));
223 }
224 rv = fAliITSQADataMakerRec->Add2RawsList(hSPDChipsMEB, 5+shift, !expert, image, !saveCorr);
225 fSPDhRawsTask++;
66133c2f 226// 6
96d29da9 227 TH2F *hFastOrCorrelation = new TH2F("SPDFastOrCorrelation_OnlineSPD","Fast Or multiplicity correlation - SPD",100,0.,100.,100,0,100);
228 hFastOrCorrelation->GetXaxis()->SetTitle("Layer 1");
229 hFastOrCorrelation->GetYaxis()->SetTitle("Layer 2");
777d16ea 230 rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrCorrelation, 6+shift, !expert, image, !saveCorr);
96d29da9 231 fSPDhRawsTask++;
777d16ea 232// 7
233 TH1F *hFastOrEfficiency, *hFastOrMissingRatio, *hFastOrNoisyRatio;
234
235 hFastOrEfficiency = new TH1F("SPDFastOrEfficiency_OnlineSPD","FastOr Efficiency : FastOr / fired chips (per event) - SPD",fgkSPDchips,range[0],range[1]);
236 hFastOrEfficiency->SetFillColor(kBlue);
237 hFastOrEfficiency->SetMaximum(1.05);
238 hFastOrEfficiency->GetXaxis()->SetTitle("chip index [eq*60+hs*10+chip]");
239 hFastOrEfficiency->GetYaxis()->SetTitle("FastOr Efficiency (per event)");
240 rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrEfficiency, 7+shift, expert, !image, !saveCorr);
96d29da9 241 fSPDhRawsTask++;
777d16ea 242// 8
243 hFastOrMissingRatio = new TH1F("SPDFastOrMissingRatio_OnlineSPD"," Missing FastOr / fired chips (per event) - SPD)",fgkSPDchips,range[0],range[1]);
244 hFastOrMissingRatio->SetFillColor(kBlue);
245 hFastOrMissingRatio->SetMaximum(1.05);
246 hFastOrMissingRatio->GetXaxis()->SetTitle("chip index [eq*60+hs*10+chip]");
247 hFastOrMissingRatio->GetYaxis()->SetTitle("ratio of Missing FastOr (per event)");
248 rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrMissingRatio, 8+shift, expert, !image, !saveCorr);
96d29da9 249 fSPDhRawsTask++;
777d16ea 250// 9
251 hFastOrNoisyRatio = new TH1F("SPDFastOrNoisyRatio_OnlineSPD","Noisy Fast Or / fired chips (per event) - SPD",fgkSPDchips,range[0],range[1]);
252 hFastOrNoisyRatio->SetFillColor(kBlue);
253 hFastOrNoisyRatio->SetMaximum(1.05);
254 hFastOrNoisyRatio->GetXaxis()->SetTitle("chip index [eq*60+hs*10+chip]");
255 hFastOrNoisyRatio->GetYaxis()->SetTitle("ratio of Noisy FastOr (per event)");
256 rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrNoisyRatio, 9+shift, expert, !image, !saveCorr);
96d29da9 257 fSPDhRawsTask++;
777d16ea 258// 10
259 TH2F *herrorsAll = new TH2F("SPDErrorsAll_OnlineSPD","Error codes - SPD",20,-0.5,19.5,22,-0.5,21.5);
66133c2f 260 herrorsAll->GetXaxis()->SetTitle("DDL");
777d16ea 261 herrorsAll->GetYaxis()->SetTitle("Error Type");
262 rv = fAliITSQADataMakerRec->Add2RawsList(herrorsAll, kAmoreFoOffset+shift, !expert, image, !saveCorr);
66133c2f 263 fSPDhRawsTask++;
777d16ea 264//11-30
69facbc2 265 TH1F * herrors[20];
66133c2f 266 for (Int_t iEq=0; iEq<20; iEq++) {
96d29da9 267 sprintf(name,"SPDErrors_Eq%d_OnlineSPD",iEq+1);
66133c2f 268 sprintf(title,"Error codes - SPD Eq %d",iEq+1);
269 herrors[iEq] = new TH1F (name,title,fAdvLogger->GetNrErrorCodes(),0,fAdvLogger->GetNrErrorCodes());
270 herrors[iEq]->SetXTitle("Error Code");
271 herrors[iEq]->SetYTitle("Nr of errors");
777d16ea 272 rv = fAliITSQADataMakerRec->Add2RawsList(herrors[iEq], 11+shift+iEq, expert, !image, !saveCorr);
66133c2f 273 fSPDhRawsTask++;
274 }
66133c2f 275// ********* offline histo booking (offset is added) ****************************
276
277 // offset for offline histogram numbering
278 Int_t offset = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()] + kAmoreFoOffset + kAmoreErrorsOffset;
96d29da9 279
280 // printf("now booking offline raw data : genrawoffset %i, kAmoreOffset %i , kAmoreErrorsOffset %i -> total %i , list numbering %i\n",fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()],(Int_t)kAmoreFoOffset,(Int_t)kAmoreErrorsOffset, offset,fSPDhRawsTask);
66133c2f 281// 0
26ee9565 282 TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
379510c2 283 hlayer->GetXaxis()->SetTitle("Layer number");
284 hlayer->GetYaxis()->SetTitle("Entries");
66133c2f 285 rv = fAliITSQADataMakerRec->Add2RawsList(hlayer, 0+offset, expert, !image, !saveCorr);
7a0e5776 286 fSPDhRawsTask++;
379510c2 287
69facbc2 288 TH1F * hmod[2];
289 TH2F * hhitMap[20];
66133c2f 290
291
292// 1-2
379510c2 293 for (Int_t iLay=0; iLay<2; iLay++) {
26ee9565 294 sprintf(name,"SPDModPattern_SPD%d",iLay+1);
379510c2 295 sprintf(title,"Module map - SPD Layer %d",iLay+1);
296 hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules);
297 hmod[iLay]->GetXaxis()->SetTitle("Module number");
298 hmod[iLay]->GetYaxis()->SetTitle("Entries");
66133c2f 299 rv = fAliITSQADataMakerRec->Add2RawsList(hmod[iLay], 1+iLay+offset, expert, !image, !saveCorr);
7a0e5776 300 fSPDhRawsTask++;
379510c2 301 }
66133c2f 302// 3
8ec28eb2 303 TH2F *hHitMapHalfStaveChipSideA
304 = new TH2F("SPDHitMapHalfStaveChipSideA_SPD","Hit map per HalfStave per Chip Side A - SPD",60,0.,60.,10,0.,10.);
305 hHitMapHalfStaveChipSideA->GetXaxis()->SetTitle("HalfStave");
306 hHitMapHalfStaveChipSideA->GetYaxis()->SetTitle("Chip");
66133c2f 307 rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapHalfStaveChipSideA, 3+offset, expert, !image, !saveCorr);
8ec28eb2 308 fSPDhRawsTask++;
66133c2f 309// 4
8ec28eb2 310 TH2F *hHitMapHalfStaveChipSideC
311 = new TH2F("SPDHitMapHalfStaveChipSideC_SPD","Hit map per HalfStave per Chip Side C - SPD",60,0.,60.,10,0.,10.);
312 hHitMapHalfStaveChipSideC->GetXaxis()->SetTitle("HalfStave");
313 hHitMapHalfStaveChipSideC->GetYaxis()->SetTitle("Chip");
66133c2f 314 rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapHalfStaveChipSideC, 4+offset, expert, !image, !saveCorr);
8ec28eb2 315 fSPDhRawsTask++;
66133c2f 316 //5-24
379510c2 317 for (Int_t iDDL=0; iDDL<20; iDDL++) {
26ee9565 318 sprintf(name,"SPDHitMap_SPD_DDL%d",iDDL+1);
379510c2 319 sprintf(title,"Hit map - SPD DDL %d",iDDL+1);
320 hhitMap[iDDL]=new TH2F(name,title,320,0,10*32,1536,0,6*256);
321 hhitMap[iDDL]->GetXaxis()->SetTitle("Column");
322 hhitMap[iDDL]->GetYaxis()->SetTitle("Row");
66133c2f 323 rv = fAliITSQADataMakerRec->Add2RawsList(hhitMap[iDDL], 5+iDDL+offset, expert, !image, !saveCorr);
7a0e5776 324 fSPDhRawsTask++;
66133c2f 325 }
326// 25-26
69facbc2 327 TH1F * hMultSPDhits[2];
379510c2 328 for (Int_t iLay=0; iLay<2; iLay++) {
26ee9565 329 sprintf(name,"SPDHitsMultiplicity_SPD%d",iLay+1);
379510c2 330 sprintf(title,"Hit multiplicity - SPD Layer %d",iLay+1);
331 hMultSPDhits[iLay]=new TH1F(name,title,200,0.,200.);
332 hMultSPDhits[iLay]->GetXaxis()->SetTitle("Hit multiplicity");
333 hMultSPDhits[iLay]->GetYaxis()->SetTitle("Entries");
66133c2f 334 rv = fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits[iLay], 25+iLay+offset, expert, !image, !saveCorr);
7a0e5776 335 fSPDhRawsTask++;
379510c2 336 }
66133c2f 337// 27
954ef57a 338 TH2F *hMultSPDhits2MultSPDhits1
26ee9565 339 = new TH2F("SPDHitMultCorrelation_SPD","Hit multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
379510c2 340 hMultSPDhits2MultSPDhits1->GetXaxis()->SetTitle("Hit multiplicity (Layer 1)");
341 hMultSPDhits2MultSPDhits1->GetYaxis()->SetTitle("Hit multiplicity (Layer 2)");
777d16ea 342 rv = fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits2MultSPDhits1, 27+offset, expert, !image, !saveCorr);
8ec28eb2 343 fSPDhRawsTask++;
66133c2f 344// 28
777d16ea 345 TH2F *hFastOrMapStaveChip
346 = new TH2F("SPDFastOrMapStaveChip_SPD","FastOr map per Stave per Chip - SPD",60,-0.5,59.5,20,-0.5,19.5);
347 hFastOrMapStaveChip->GetXaxis()->SetTitle("Stave");
348 hFastOrMapStaveChip->GetYaxis()->SetTitle("SIDE C -> SIDE A Chip");
349 for(Int_t ibinx =0; ibinx< hFastOrMapStaveChip->GetNbinsX(); ibinx++){
350 if(ibinx%6==0) hFastOrMapStaveChip->GetXaxis()->SetBinLabel(ibinx+1,Form("Sector %i__%i",ibinx/6,ibinx%6));
351 else hFastOrMapStaveChip->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",ibinx%6));
352 }
353 for(Int_t ibiny =0; ibiny< hFastOrMapStaveChip->GetNbinsY(); ibiny++){
354 if(ibiny < 10) hFastOrMapStaveChip->GetYaxis()->SetBinLabel(ibiny+1,Form("%i",ibiny));
355 else hFastOrMapStaveChip->GetYaxis()->SetBinLabel(ibiny+1,Form("%i",19-ibiny));
356 }
357 hFastOrMapStaveChip->SetDrawOption("colz");
358 rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrMapStaveChip, 28+offset, !expert, image, !saveCorr);
8ec28eb2 359 fSPDhRawsTask++;
66133c2f 360// 29
8ec28eb2 361 TH1F *hFastOrFiredMap = new TH1F("SPDFastOrPattern_SPD","FastOrFiredChip map - SPD",1200,0.,1200.);
362 hFastOrFiredMap->GetXaxis()->SetTitle("Chip number");
363 hFastOrFiredMap->GetYaxis()->SetTitle("Entries");
66133c2f 364 rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrFiredMap, 29+offset, expert, !image, !saveCorr);
8ec28eb2 365 fSPDhRawsTask++;
66133c2f 366// 30
8ec28eb2 367 TH2F *hHitMapHalfStaveChipInner
96d29da9 368 = new TH2F("SPDHitMapStaveChipInner_SPD","Hit map per Stave per Chip Inner Layer- SPD",20,0.,20.,20,0.,20.);
369 hHitMapHalfStaveChipInner->GetXaxis()->SetTitle("SIDE C SIDE A Chip");
370 hHitMapHalfStaveChipInner->GetYaxis()->SetTitle("Stave in Sector S");
371 for(Int_t ibinx =0; ibinx< hHitMapHalfStaveChipInner->GetNbinsX(); ibinx++){
372 if(ibinx < 10) hHitMapHalfStaveChipInner->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",ibinx));
373 else hHitMapHalfStaveChipInner->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",20-(ibinx+1)));
374 }
375 for(Int_t ibiny =0; ibiny< hHitMapHalfStaveChipInner->GetNbinsY(); ibiny++){
376 if(ibiny%2==1) hHitMapHalfStaveChipInner->GetYaxis()->SetBinLabel(ibiny+1,Form(" S %i - %i",ibiny/2,ibiny%2));
377 else hHitMapHalfStaveChipInner->GetYaxis()->SetBinLabel(ibiny+1,Form("%i",ibiny%2));
378 hHitMapHalfStaveChipInner->GetYaxis()->SetTitleOffset(1.4);
379 }
66133c2f 380 rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapHalfStaveChipInner, 30+offset, !expert, image, !saveCorr);
8ec28eb2 381 fSPDhRawsTask++;
66133c2f 382// 31
8ec28eb2 383 TH2F *hHitMapHalfStaveChipOuter
96d29da9 384 = new TH2F("SPDHitMapStaveChipOuter_SPD","Hit map per Stave per Chip Outer Layer - SPD",20,0.,20.,40,0.,40.);
385 hHitMapHalfStaveChipOuter->GetXaxis()->SetTitle("SIDE C SIDE A Chip");
386 hHitMapHalfStaveChipOuter->GetYaxis()->SetTitle("Stave in Sector S");
387 for(Int_t ibinx =0; ibinx< hHitMapHalfStaveChipOuter->GetNbinsX(); ibinx++){
388 if(ibinx < 10) hHitMapHalfStaveChipOuter->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",ibinx));
389 else hHitMapHalfStaveChipOuter->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",20-(ibinx+1)));
390 }
391 for(Int_t ibiny =0; ibiny< hHitMapHalfStaveChipOuter->GetNbinsY(); ibiny++){
392 if(ibiny%4==3) hHitMapHalfStaveChipOuter->GetYaxis()->SetBinLabel(ibiny+1,Form(" S %i - %i",ibiny/4,ibiny%4+2));
393 else hHitMapHalfStaveChipOuter->GetYaxis()->SetBinLabel(ibiny+1,Form("%i",ibiny%4+2));
394 hHitMapHalfStaveChipOuter->GetYaxis()->SetTitleOffset(1.4);
395 }
66133c2f 396 rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapHalfStaveChipOuter, 31+offset, !expert, image, !saveCorr);
8ec28eb2 397 fSPDhRawsTask++;
66133c2f 398// 32
8ec28eb2 399 TH1F *hHitMapChipInnerZ = new TH1F("SPDHitMapChipInnerZ_SPD","Hit map per ChipZ Inner - SPD",20,0.,20.);
400 hHitMapChipInnerZ->GetXaxis()->SetTitle("Chip");
401 hHitMapChipInnerZ->GetYaxis()->SetTitle("Entries");
777d16ea 402 rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapChipInnerZ, 32+offset, expert, !image, !saveCorr);
8ec28eb2 403 fSPDhRawsTask++;
66133c2f 404// 33
8ec28eb2 405 TH1F *hHitMapChipOuterZ = new TH1F("SPDHitMapChipOuterZ_SPD","Hit map per ChipZ Outer - SPD",20,0.,20.);
406 hHitMapChipOuterZ->GetXaxis()->SetTitle("Chip");
407 hHitMapChipOuterZ->GetYaxis()->SetTitle("Entries");
777d16ea 408 rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapChipOuterZ, 33+offset, expert, !image, !saveCorr);
8ec28eb2 409 fSPDhRawsTask++;
66133c2f 410// 34
96d29da9 411 TH1F *hHitMapStaveInnerPhi = new TH1F("SPDHitMapChipInnerPhi_SPD","Hit map per Stave in Phi Inner - SPD",20,0.,20.);
412 hHitMapStaveInnerPhi->GetXaxis()->SetTitle("Stave");
413 hHitMapStaveInnerPhi->GetYaxis()->SetTitle("Entries");
414 for(Int_t ibinx =0; ibinx< hHitMapStaveInnerPhi->GetNbinsX(); ibinx++){
415 if(ibinx%2==0) hHitMapStaveInnerPhi->GetXaxis()->SetBinLabel(ibinx+1,Form("%i___Sector %i",ibinx%2,ibinx/2));
416 else hHitMapStaveInnerPhi->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",ibinx%2));
417 }
777d16ea 418 rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapStaveInnerPhi, 34+offset, expert, !image, !saveCorr);
8ec28eb2 419 fSPDhRawsTask++;
66133c2f 420// 35
96d29da9 421 TH1F *hHitMapStaveOuterPhi = new TH1F("SPDHitMapChipOuterPhi_SPD","Hit map per Stave in Phi Outer - SPD",40,0.,40.);
422 hHitMapStaveOuterPhi->GetXaxis()->SetTitle("Stave");
423 hHitMapStaveOuterPhi->GetYaxis()->SetTitle("Entries");
424 for(Int_t ibinx =0; ibinx< hHitMapStaveOuterPhi->GetNbinsX(); ibinx++){
425 if(ibinx%4==0) hHitMapStaveOuterPhi->GetXaxis()->SetBinLabel(ibinx+1,Form("%i___Sector %i ",ibinx%4+2,ibinx/4));
426 else hHitMapStaveOuterPhi->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",ibinx%4+2));
427 }
777d16ea 428 rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapStaveOuterPhi, 35+offset, expert, !image, !saveCorr);
8ec28eb2 429 fSPDhRawsTask++;
66133c2f 430
96d29da9 431 //AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Raws histograms booked\n",fSPDhRawsTask));
432 //printf("------------------ %d SPD Raws histograms booked \n",fSPDhRawsTask);
eca4fa66 433 return rv ;
096292ae 434}
435
096292ae 436//____________________________________________________________________________
eca4fa66 437Int_t AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader)
096292ae 438{
439 // Fill QA for RAW - SPD -
eca4fa66 440 Int_t rv = 0 ;
96d29da9 441 if(!rawReader) {
442 AliError("rawReader is NULL");
443 return -1;
444 }
eca4fa66 445
379510c2 446 rawReader->Reset();
66eae3f0 447 AliITSRawStreamSPD rawStreamSPD(rawReader);
448 rawStreamSPD.ActivateAdvancedErrorLog(kTRUE,fAdvLogger);
66133c2f 449
450 // shift for online histos
451 Int_t shift = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
452
96d29da9 453 // shift for offline histos
66133c2f 454 Int_t offset = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()] + kAmoreFoOffset+kAmoreErrorsOffset;
379510c2 455
456 Int_t nDigitsL1 = 0;
457 Int_t nDigitsL2 = 0;
458 Int_t iEq;
459 Int_t iLayer;
460 Int_t iHalfStave, iChip;
8bab7823 461 Int_t chipKey;
379510c2 462 Int_t col, row;
463 UInt_t module, colM, rowM;
8ec28eb2 464 Bool_t isFiredChip[1200];
465 for(Int_t ichK=0; ichK<1200; ichK++) isFiredChip[ichK] = kFALSE;
66133c2f 466 Bool_t isOnlineFiredChip[1200];
467 for(Int_t iOnlineKey=0; iOnlineKey<1200; iOnlineKey++) isOnlineFiredChip[iOnlineKey] = kFALSE;
468 UInt_t nFastOr[2]={0,0};
8ec28eb2 469
66eae3f0 470 while(rawStreamSPD.Next()) {
379510c2 471
472 iEq = rawReader->GetDDLID();
473 if (iEq>=0 && iEq<20) {
66eae3f0 474 iHalfStave = rawStreamSPD.GetHalfStaveNr();
475 iChip = rawStreamSPD.GetChipAddr();
66133c2f 476 col = rawStreamSPD.GetChipCol();
477 row = rawStreamSPD.GetChipRow();
478 isOnlineFiredChip[iEq*60+iHalfStave*10+iChip] = kTRUE;
8ec28eb2 479 chipKey = rawStreamSPD.GetOfflineChipKeyFromOnline(iEq,iHalfStave,iChip);
480 isFiredChip[chipKey] = kTRUE;
481
66eae3f0 482 rawStreamSPD.OnlineToOffline(iEq, iHalfStave, iChip, col, row, module, colM, rowM);
379510c2 483
484 if (iHalfStave>=0 && iHalfStave<2) iLayer=0;
485 else iLayer=1;
486
66133c2f 487 fAliITSQADataMakerRec->GetRawsData(0+offset)->Fill(iLayer);
379510c2 488 if (iLayer==0) {
66133c2f 489 fAliITSQADataMakerRec->GetRawsData(1+offset)->Fill(module);
379510c2 490 nDigitsL1++;
491 } else {
66133c2f 492 fAliITSQADataMakerRec->GetRawsData(2+offset)->Fill(module);
379510c2 493 nDigitsL2++;
494 }
495
8ec28eb2 496 if(iEq<10) {
66133c2f 497 fAliITSQADataMakerRec->GetRawsData(3+offset)->Fill(iHalfStave+iEq*6,iChip);
8ec28eb2 498 }
499 else {
66133c2f 500 fAliITSQADataMakerRec->GetRawsData(4+offset)->Fill(iHalfStave+(iEq-10)*6,iChip);
8ec28eb2 501 }
8bab7823 502
8ec28eb2 503 if(iLayer==0) {
504 if(iEq<10) {
777d16ea 505 fAliITSQADataMakerRec->GetRawsData(30+offset)->Fill(19-iChip,iHalfStave+iEq*2);
66133c2f 506 fAliITSQADataMakerRec->GetRawsData(32+offset)->Fill(19-iChip);
777d16ea 507 fAliITSQADataMakerRec->GetRawsData(34+offset)->Fill(iHalfStave+iEq*2);
8ec28eb2 508 }
509 else {
777d16ea 510 fAliITSQADataMakerRec->GetRawsData(30+offset)->Fill(iChip,iHalfStave+(iEq-10)*2);
66133c2f 511 fAliITSQADataMakerRec->GetRawsData(32+offset)->Fill(iChip);
777d16ea 512 fAliITSQADataMakerRec->GetRawsData(34+offset)->Fill(iHalfStave+(iEq-10)*2);
8ec28eb2 513 }
514 }
515 else {
516 if(iEq<10) {
66133c2f 517 fAliITSQADataMakerRec->GetRawsData(31+offset)->Fill(19-iChip,iHalfStave-2+iEq*4);
518 fAliITSQADataMakerRec->GetRawsData(33+offset)->Fill(19-iChip);
519 fAliITSQADataMakerRec->GetRawsData(35+offset)->Fill(iHalfStave-2+iEq*4);
8ec28eb2 520 }
521 else {
66133c2f 522 fAliITSQADataMakerRec->GetRawsData(31+offset)->Fill(iChip,iHalfStave-2+(iEq-10)*4);
523 fAliITSQADataMakerRec->GetRawsData(33+offset)->Fill(iChip);
524 fAliITSQADataMakerRec->GetRawsData(35+offset)->Fill(iHalfStave-2+(iEq-10)*4);
8ec28eb2 525 }
526 }
66133c2f 527 fAliITSQADataMakerRec->GetRawsData(5+iEq+offset)->Fill(colM+(module%2)*160,rowM+iHalfStave*256);
379510c2 528 }
379510c2 529 }
8bab7823 530
8ec28eb2 531 UInt_t nErrorsDDL[20];
8b7e858c 532 for (Int_t ieq=0; ieq<20; ieq++) {
8ec28eb2 533 nErrorsDDL[ieq] = 0;
8ec28eb2 534 for (UInt_t ierr=0; ierr<fAdvLogger->GetNrErrorCodes(); ierr++) {
66133c2f 535 fAliITSQADataMakerRec->GetRawsData(ieq+(kAmoreFoOffset+1)+shift)->Fill(ierr,fAdvLogger->GetNrErrors(ierr,ieq));
777d16ea 536 if(ierr>0) {
537 nErrorsDDL[ieq] = nErrorsDDL[ieq] + fAdvLogger->GetNrErrors(ierr,ieq);
538 }
539 ((TH2F*)fAliITSQADataMakerRec->GetRawsData(kAmoreFoOffset+shift))->Fill(ieq,ierr,fAdvLogger->GetNrErrors(ierr,ieq));
96d29da9 540 }
8bab7823 541 for (Int_t ihs=0; ihs<6; ihs++) {
542 for (Int_t ichip=0; ichip<10; ichip++) {
96d29da9 543 if(isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->GetRawsData(0+shift)->Fill(ieq*60+ihs*10+ichip); // online
544 if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip)) fAliITSQADataMakerRec->GetRawsData(4+shift)->Fill(ieq*60+ihs*10+ichip); // online
545 // now filling the 3 possibile combinations
546 if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip) && isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->GetRawsData(1+shift)->Fill(ieq*60+ihs*10+ichip); // online
66133c2f 547 if(!rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip) && isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->GetRawsData(2+shift)->Fill(ieq*60+ihs*10+ichip); // online
548 if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip) && !isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->GetRawsData(3+shift)->Fill(ieq*60+ihs*10+ichip); // online
549
8ec28eb2 550 chipKey = rawStreamSPD.GetOfflineChipKeyFromOnline(ieq,ihs,ichip);
777d16ea 551 Int_t sect = 999;
552 Int_t chipbin = 999;
553
66eae3f0 554 if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip)) {
66133c2f 555 if(ihs <2) nFastOr[0]++; // online
556 else nFastOr[1]++; // online
777d16ea 557 if(ieq<10) {sect = ieq; chipbin = 19-ichip;}
558 else {sect = ieq-10; chipbin = ichip;}
559
560 fAliITSQADataMakerRec->GetRawsData(28+offset)->Fill(sect*6+ihs,chipbin);
66133c2f 561 fAliITSQADataMakerRec->GetRawsData(29+offset)->Fill(chipKey);
8bab7823 562 }
563 }
564 }
66133c2f 565
566
8bab7823 567 }
96d29da9 568 if(fAliITSQADataMakerRec->GetRawsData(6+shift)) {
569 fAliITSQADataMakerRec->GetRawsData(6+shift)->Fill(nFastOr[0],nFastOr[1]); // online
570 }
571
379510c2 572 fAdvLogger->Reset();
66133c2f 573 fAliITSQADataMakerRec->GetRawsData(25+offset)->Fill(nDigitsL1);
574 fAliITSQADataMakerRec->GetRawsData(26+offset)->Fill(nDigitsL2);
575 fAliITSQADataMakerRec->GetRawsData(27+offset)->Fill(nDigitsL1,nDigitsL2);
379510c2 576
5379c4a3 577 AliDebug(AliQAv1::GetQADebugLevel(),Form("Event completed, %d raw digits read",nDigitsL1+nDigitsL2));
eca4fa66 578 return rv ;
096292ae 579}
580
581//____________________________________________________________________________
eca4fa66 582Int_t AliITSQASPDDataMakerRec::InitDigits()
44ed7a66 583{
584 // Initialization for DIGIT data - SPD -
585 const Bool_t expert = kTRUE ;
586 const Bool_t image = kTRUE ;
eca4fa66 587 Int_t rv = 0 ;
588// fGenDigitsOffset = (fAliITSQADataMakerRec->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
44ed7a66 589 //fSPDhDigitsTask must be incremented by one unit every time a histogram is ADDED to the QA List
590
591 Char_t name[50];
592 Char_t title[50];
593
594 TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
595 hlayer->GetXaxis()->SetTitle("Layer number");
596 hlayer->GetYaxis()->SetTitle("Entries");
4a903927 597 rv = fAliITSQADataMakerRec->Add2DigitsList(hlayer,fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
44ed7a66 598 fSPDhDigitsTask++;
599
69facbc2 600 TH1F * hmod[2];
44ed7a66 601 for (Int_t iLay=0; iLay<2; iLay++) {
602 sprintf(name,"SPDModPattern_SPD%d",iLay+1);
603 sprintf(title,"Module map - SPD Layer %d",iLay+1);
604 hmod[iLay]=new TH1F(name,title,240,0,240);
605 hmod[iLay]->GetXaxis()->SetTitle("Module number");
606 hmod[iLay]->GetYaxis()->SetTitle("Entries");
4a903927 607 rv = fAliITSQADataMakerRec->Add2DigitsList(hmod[iLay],1+iLay+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);
44ed7a66 608 fSPDhDigitsTask++;
609 }
610
611 TH1F *hcolumns = new TH1F("SPDColumns_SPD","Columns - SPD",160,0.,160.);
612 hcolumns->GetXaxis()->SetTitle("Column number");
613 hcolumns->GetYaxis()->SetTitle("Entries");
4a903927 614 rv = fAliITSQADataMakerRec->Add2DigitsList(hcolumns,3+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
44ed7a66 615 fSPDhDigitsTask++;
616
617 TH1F *hrows = new TH1F("SPDRows_SPD","Rows - SPD",256,0.,256.);
618 hrows->GetXaxis()->SetTitle("Row number");
619 hrows->GetYaxis()->SetTitle("Entries");
4a903927 620 rv = fAliITSQADataMakerRec->Add2DigitsList(hrows,4+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
44ed7a66 621 fSPDhDigitsTask++;
622
69facbc2 623 TH1F * hMultSPDdigits[2];
44ed7a66 624 for (Int_t iLay=0; iLay<2; ++iLay) {
625 sprintf(name,"SPDDigitMultiplicity_SPD%d",iLay+1);
626 sprintf(title,"Digit multiplicity - SPD Layer %d",iLay+1);
627 hMultSPDdigits[iLay]=new TH1F(name,title,200,0.,200.);
628 hMultSPDdigits[iLay]->GetXaxis()->SetTitle("Digit multiplicity");
629 hMultSPDdigits[iLay]->GetYaxis()->SetTitle("Entries");
4a903927 630 rv = fAliITSQADataMakerRec->Add2DigitsList(hMultSPDdigits[iLay], 5+iLay+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);
44ed7a66 631 fSPDhDigitsTask++;
632 }
633
634 TH2F *hMultSPDdig2MultSPDdig1
635 = new TH2F("SPDDigitMultCorrelation_SPD","Digit multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
636 hMultSPDdig2MultSPDdig1->GetXaxis()->SetTitle("Digit multiplicity (Layer 1)");
637 hMultSPDdig2MultSPDdig1->GetYaxis()->SetTitle("Digit multiplicity (Layer 2)");
4a903927 638 rv = fAliITSQADataMakerRec->Add2DigitsList(hMultSPDdig2MultSPDdig1,7+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);
44ed7a66 639 fSPDhDigitsTask++;
640
641 AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Digits histograms booked\n",fSPDhDigitsTask));
eca4fa66 642 return rv ;
44ed7a66 643}
644
645//____________________________________________________________________________
eca4fa66 646Int_t AliITSQASPDDataMakerRec::MakeDigits(TTree *digits)
44ed7a66 647{
648 // Fill QA for DIGIT - SPD -
eca4fa66 649 Int_t rv = 0 ;
eca4fa66 650
44ed7a66 651// AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");
652// fITS->SetTreeAddress();
653// TClonesArray *iITSdigits = fITS->DigitsAddress(0); // 0->SPD
33626263 654 TBranch *branchD = digits->GetBranch("ITSDigitsSPD");
44ed7a66 655 if (!branchD) {
33626263 656 AliError("can't get the branch with the SPD ITS digits !");
eca4fa66 657 return rv;
44ed7a66 658 }
33626263 659 static TClonesArray statDigits("AliITSdigitSPD");
44ed7a66 660 TClonesArray *iITSdigits = &statDigits;
661 branchD->SetAddress(&iITSdigits);
662 Int_t nDigitsL1=0;
663 Int_t nDigitsL2=0;
664
665 for (Int_t imod=0; imod<240; ++imod){
666 digits->GetEvent(imod);
667 Int_t ndigits = iITSdigits->GetEntries();
668 if (imod<80) {
4a903927 669 fAliITSQADataMakerRec->GetDigitsData(0+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(0.5,ndigits);
670 fAliITSQADataMakerRec->GetDigitsData(1+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(imod,ndigits);
44ed7a66 671 nDigitsL1+=ndigits;
672 }
673 else {
4a903927 674 fAliITSQADataMakerRec->GetDigitsData(0+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(1,ndigits);
675 fAliITSQADataMakerRec->GetDigitsData(2+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(imod,ndigits);
44ed7a66 676 nDigitsL2+=ndigits;
677 }
678 for (Int_t idig=0; idig<ndigits; ++idig) {
679 AliITSdigit *dig=(AliITSdigit*)iITSdigits->UncheckedAt(idig);
680 Int_t col=dig->GetCoord1(); // cell number z
681 Int_t row=dig->GetCoord2(); // cell number x
4a903927 682 fAliITSQADataMakerRec->GetDigitsData(3+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(col);
683 fAliITSQADataMakerRec->GetDigitsData(4+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(row);
44ed7a66 684 }
685 }
4a903927 686 fAliITSQADataMakerRec->GetDigitsData(5+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nDigitsL1);
687 fAliITSQADataMakerRec->GetDigitsData(6+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nDigitsL2);
688 fAliITSQADataMakerRec->GetDigitsData(7+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nDigitsL1,nDigitsL2);
eca4fa66 689 return rv ;
44ed7a66 690}
691
692//____________________________________________________________________________
eca4fa66 693Int_t AliITSQASPDDataMakerRec::InitRecPoints()
096292ae 694{
695 // Initialization for RECPOINTS - SPD -
7d297381 696 const Bool_t expert = kTRUE ;
697 const Bool_t image = kTRUE ;
eca4fa66 698 Int_t rv = 0 ;
8b7e858c 699 //AliInfo(Form("fAliITSQADataMakerRec->GetEventSpecie() %d\n",fAliITSQADataMakerRec->GetEventSpecie()));
700 //AliInfo(Form("fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()] %d\n",fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]));
eca4fa66 701// fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
26ee9565 702 TH1F* hlayer= new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
096292ae 703 hlayer->GetXaxis()->SetTitle("Layer number");
704 hlayer->GetYaxis()->SetTitle("Entries");
8b7e858c 705 rv = fAliITSQADataMakerRec->Add2RecPointsList(hlayer, 0+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
7a0e5776 706 fSPDhRecPointsTask++;
096292ae 707
69facbc2 708 TH1F * hmod[2];
709 TH1F * hxl[2];
710 TH1F * hzl[2];
711 TH1F * hxg[2];
712 TH1F * hyg[2];
713 TH1F * hzg[2];
714 TH1F * hr[2];
715 TH1F * hphi[2];
716 TH1F * hMultSPDcl[2];
717 TH2F * hNyNz[2]; // y and z cluster length
718 TH1F * hNpixels[2]; // cluster size in number of pixels
719 TH1F * hType[2]; // cluster type according to conventional table
720 TH2F * hPhiZ[2];
096292ae 721
722 Float_t xlim[2]={4.5,8.};
723 Float_t zlim[2]={15.,15.};
724
725 Char_t name[50];
726 Char_t title[50];
727 for (Int_t iLay=0;iLay<2;iLay++) {
26ee9565 728 sprintf(name,"SPDModPattern_SPD%d",iLay+1);
096292ae 729 sprintf(title,"Module map - SPD Layer %d",iLay+1);
730 hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules);
731 hmod[iLay]->GetXaxis()->SetTitle("Module number");
732 hmod[iLay]->GetYaxis()->SetTitle("Entries");
8bab7823 733 rv = fAliITSQADataMakerRec->Add2RecPointsList(hmod[iLay], 1+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
7a0e5776 734 fSPDhRecPointsTask++;
096292ae 735
26ee9565 736 sprintf(name,"SPDxLoc_SPD%d",iLay+1);
096292ae 737 sprintf(title,"Local x coordinate - SPD Layer %d",iLay+1);
738 hxl[iLay]=new TH1F(name,title,100,-4.,4.);
739 hxl[iLay]->GetXaxis()->SetTitle("Local x [cm]");
740 hxl[iLay]->GetYaxis()->SetTitle("Entries");
8bab7823 741 rv = fAliITSQADataMakerRec->Add2RecPointsList(hxl[iLay], 2+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
7a0e5776 742 fSPDhRecPointsTask++;
096292ae 743
26ee9565 744 sprintf(name,"SPDzLoc_SPD%d",iLay+1);
096292ae 745 sprintf(title,"Local z coordinate - SPD Layer %d",iLay+1);
746 hzl[iLay]=new TH1F(name,title,100,-4.,4.);
747 hzl[iLay]->GetXaxis()->SetTitle("Local z [cm]");
748 hzl[iLay]->GetYaxis()->SetTitle("Entries");
8bab7823 749 rv = fAliITSQADataMakerRec->Add2RecPointsList(hzl[iLay], 3+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
7a0e5776 750 fSPDhRecPointsTask++;
096292ae 751
26ee9565 752 sprintf(name,"SPDxGlob_SPD%d",iLay+1);
096292ae 753 sprintf(title,"Global x coordinate - SPD Layer %d",iLay+1);
754 hxg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]);
755 hxg[iLay]->GetXaxis()->SetTitle("Global x [cm]");
756 hxg[iLay]->GetYaxis()->SetTitle("Entries");
8bab7823 757 rv = fAliITSQADataMakerRec->Add2RecPointsList(hxg[iLay],4+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
7a0e5776 758 fSPDhRecPointsTask++;
096292ae 759
26ee9565 760 sprintf(name,"SPDyGlob_SPD%d",iLay+1);
096292ae 761 sprintf(title,"Global y coordinate - SPD Layer %d",iLay+1);
762 hyg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]);
763 hyg[iLay]->GetXaxis()->SetTitle("Global y [cm]");
764 hyg[iLay]->GetYaxis()->SetTitle("Entries");
8bab7823 765 rv = fAliITSQADataMakerRec->Add2RecPointsList(hyg[iLay], 5+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
7a0e5776 766 fSPDhRecPointsTask++;
096292ae 767
26ee9565 768 sprintf(name,"SPDzGlob_SPD%d",iLay+1);
096292ae 769 sprintf(title,"Global z coordinate - SPD Layer %d",iLay+1);
770 hzg[iLay]=new TH1F(name,title,150,-zlim[iLay],zlim[iLay]);
771 hzg[iLay]->GetXaxis()->SetTitle("Global z [cm]");
772 hzg[iLay]->GetYaxis()->SetTitle("Entries");
8bab7823 773 rv = fAliITSQADataMakerRec->Add2RecPointsList(hzg[iLay], 6+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
7a0e5776 774 fSPDhRecPointsTask++;
096292ae 775
26ee9565 776 sprintf(name,"SPDr_SPD%d",iLay+1);
096292ae 777 sprintf(title,"Radius - SPD Layer %d",iLay+1);
778 hr[iLay]=new TH1F(name,title,100,0.,10.);
779 hr[iLay]->GetXaxis()->SetTitle("r [cm]");
780 hr[iLay]->GetYaxis()->SetTitle("Entries");
8bab7823 781 rv = fAliITSQADataMakerRec->Add2RecPointsList(hr[iLay], 7+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
7a0e5776 782 fSPDhRecPointsTask++;
096292ae 783
26ee9565 784 sprintf(name,"SPDphi_SPD%d",iLay+1);
096292ae 785 sprintf(title,"#varphi - SPD Layer %d",iLay+1);
439e7a8a 786 hphi[iLay]=new TH1F(name,title,1000,0.,2*TMath::Pi());
096292ae 787 hphi[iLay]->GetXaxis()->SetTitle("#varphi [rad]");
788 hphi[iLay]->GetYaxis()->SetTitle("Entries");
8bab7823 789 rv = fAliITSQADataMakerRec->Add2RecPointsList(hphi[iLay], 8+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
7a0e5776 790 fSPDhRecPointsTask++;
096292ae 791
26ee9565 792 sprintf(name,"SPDSizeYvsZ_SPD%d",iLay+1);
096292ae 793 sprintf(title,"Cluster dimension - SPD Layer %d",iLay+1);
794 hNyNz[iLay]=new TH2F(name,title,100,0.,100.,100,0.,100.);
795 hNyNz[iLay]->GetXaxis()->SetTitle("z length");
796 hNyNz[iLay]->GetYaxis()->SetTitle("y length");
8bab7823 797 rv = fAliITSQADataMakerRec->Add2RecPointsList(hNyNz[iLay], 9+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
798 fSPDhRecPointsTask++;
799
800 sprintf(name,"SPDSizeTot_SPD%d",iLay+1);
801 sprintf(title,"Cluster size - SPD Layer %d",iLay+1);
802 hNpixels[iLay]=new TH1F(name,title,100,0.,100.);
803 hNpixels[iLay]->GetXaxis()->SetTitle("Cluster size");
804 hNpixels[iLay]->GetYaxis()->SetTitle("Entries");
805 rv = fAliITSQADataMakerRec->Add2RecPointsList(hNpixels[iLay], 10+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
806 fSPDhRecPointsTask++;
807
808 sprintf(name,"SPDType_SPD%d",iLay+1);
809 sprintf(title,"Cluster type - SPD Layer %d",iLay+1);
810 hType[iLay]=new TH1F(name,title,20,0.,20.);
811 hType[iLay]->GetXaxis()->SetTitle("Cluster type");
812 hType[iLay]->GetYaxis()->SetTitle("Entries");
813 rv = fAliITSQADataMakerRec->Add2RecPointsList(hType[iLay], 11+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);
7a0e5776 814 fSPDhRecPointsTask++;
096292ae 815
26ee9565 816 sprintf(name,"SPDphi_z_SPD%d",iLay+1);
096292ae 817 sprintf(title,"#varphi vs z - SPD Layer %d",iLay+1);
439e7a8a 818 hPhiZ[iLay]=new TH2F(name,title,150,-zlim[iLay],zlim[iLay],200,0.,2*TMath::Pi());
096292ae 819 hPhiZ[iLay]->GetXaxis()->SetTitle("Global z [cm]");
820 hPhiZ[iLay]->GetYaxis()->SetTitle("#varphi [rad]");
8bab7823 821 rv = fAliITSQADataMakerRec->Add2RecPointsList(hPhiZ[iLay], 12+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);
7a0e5776 822 fSPDhRecPointsTask++;
096292ae 823
824 }
825
26ee9565 826 TH2F *hrPhi=new TH2F("SPDr_phi_SPD","#varphi vs r - SPD",100,0.,10.,100,0.,2*TMath::Pi());
096292ae 827 hrPhi->GetXaxis()->SetTitle("r [cm]");
828 hrPhi->GetYaxis()->SetTitle("#varphi [rad]");
8bab7823 829 rv = fAliITSQADataMakerRec->Add2RecPointsList(hrPhi, 25+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image);
7a0e5776 830 fSPDhRecPointsTask++;
096292ae 831
26ee9565 832 TH2F *hxy=new TH2F("SPDx_y_SPD","Global y vs x - SPD",200,-10.,10.,200,-10.,10.);
096292ae 833 hxy->GetXaxis()->SetTitle("Global x [cm]");
834 hxy->GetYaxis()->SetTitle("Global y [cm]");
8bab7823 835 rv = fAliITSQADataMakerRec->Add2RecPointsList(hxy, 26+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);
7a0e5776 836 fSPDhRecPointsTask++;
096292ae 837
838 for (Int_t iLay=0;iLay<2;iLay++) {
26ee9565 839 sprintf(name,"SPDMultiplicity_SPD%d",iLay+1);
096292ae 840 sprintf(title,"Cluster multiplicity - SPD Layer %d",iLay+1);
841 hMultSPDcl[iLay]=new TH1F(name,title,200,0.,200.);
842 hMultSPDcl[iLay]->GetXaxis()->SetTitle("Cluster multiplicity");
843 hMultSPDcl[iLay]->GetYaxis()->SetTitle("Entries");
8bab7823 844 rv = fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl[iLay], 27+iLay+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);
7a0e5776 845 fSPDhRecPointsTask++;
096292ae 846 }
847
848 TH2F *hMultSPDcl2MultSPDcl1 =
26ee9565 849 new TH2F("SPDMultCorrelation_SPD","Cluster multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
096292ae 850 hMultSPDcl2MultSPDcl1->GetXaxis()->SetTitle("Clusters multiplicity (Layer 1)");
851 hMultSPDcl2MultSPDcl1->GetYaxis()->SetTitle("Clusters multiplicity (Layer 2)");
8bab7823 852 rv = fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl2MultSPDcl1, 29+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image);
7a0e5776 853 fSPDhRecPointsTask++;
096292ae 854
5379c4a3 855 AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Recs histograms booked\n",fSPDhRecPointsTask));
096292ae 856
eca4fa66 857 return rv ;
096292ae 858}
859
860//____________________________________________________________________________
eca4fa66 861Int_t AliITSQASPDDataMakerRec::MakeRecPoints(TTree * clusterTree)
096292ae 862{
863 // Fill QA for RecPoints - SPD -
8ec28eb2 864 Int_t rv = 0 ;
e62fe478 865 AliITSRecPointContainer* rpcont=AliITSRecPointContainer::Instance();
8ec28eb2 866 TClonesArray *recpoints = rpcont->FetchClusters(0,clusterTree);
e62fe478 867 if(!rpcont->GetStatusOK() || !rpcont->IsSPDActive()){
868 AliError("can't get SPD clusters !");
eca4fa66 869 return rv;
3647765c 870 }
8ec28eb2 871
8b7e858c 872 //AliInfo(Form("fAliITSQADataMakerRec->GetEventSpecie() %d\n",fAliITSQADataMakerRec->GetEventSpecie()));
873 //AliInfo(Form("fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()] %d\n",fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()]));
e62fe478 874 Int_t nSPDmod = AliITSgeomTGeo::GetModuleIndex(3,1,1);
8ec28eb2 875
3647765c 876 Float_t cluGlo[3] = {0.,0.,0.};
877 Int_t nClusters[2] = {0,0};
8ec28eb2 878
e62fe478 879 for (Int_t iIts=0; iIts < nSPDmod; iIts++) {
880 recpoints = rpcont->UncheckedGetClusters(iIts);
881 Int_t nCluster = recpoints->GetEntriesFast();
882 if(nCluster == 0)continue;
3647765c 883 // loop over clusters
884 while(nCluster--) {
8ec28eb2 885 AliITSRecPoint* cluster =
e62fe478 886 (AliITSRecPoint*)recpoints->UncheckedAt(nCluster);
887 if (cluster->GetLayer()>1)continue;
3647765c 888 Int_t lay=cluster->GetLayer();
8b7e858c 889 fAliITSQADataMakerRec->GetRecPointsData(0 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(lay);
3647765c 890 cluster->GetGlobalXYZ(cluGlo);
891 Float_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]);
096292ae 892 Float_t phi= TMath::Pi() + TMath::ATan2(-cluGlo[1],-cluGlo[0]);
893 if (lay==0) {
8ec28eb2 894 fAliITSQADataMakerRec->GetRecPointsData(1 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(iIts);
895 fAliITSQADataMakerRec->GetRecPointsData(2 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetDetLocalX());
896 fAliITSQADataMakerRec->GetRecPointsData(3 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetDetLocalZ());
897 fAliITSQADataMakerRec->GetRecPointsData(4 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[0]);
898 fAliITSQADataMakerRec->GetRecPointsData(5 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[1]);
899 fAliITSQADataMakerRec->GetRecPointsData(6 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[2]);
900 fAliITSQADataMakerRec->GetRecPointsData(7 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(rad);
901 fAliITSQADataMakerRec->GetRecPointsData(8 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(phi);
902 fAliITSQADataMakerRec->GetRecPointsData(9 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetNz(),cluster->GetNy());
903 fAliITSQADataMakerRec->GetRecPointsData(10 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetNpixels());
904 fAliITSQADataMakerRec->GetRecPointsData(11 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetSPDclusterType());
905 fAliITSQADataMakerRec->GetRecPointsData(12 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[2],phi);
906 } else {
8bab7823 907 fAliITSQADataMakerRec->GetRecPointsData(13 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(iIts);
908 fAliITSQADataMakerRec->GetRecPointsData(14 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetDetLocalX());
909 fAliITSQADataMakerRec->GetRecPointsData(15 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetDetLocalZ());
910 fAliITSQADataMakerRec->GetRecPointsData(16 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[0]);
911 fAliITSQADataMakerRec->GetRecPointsData(17 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[1]);
912 fAliITSQADataMakerRec->GetRecPointsData(18 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[2]);
913 fAliITSQADataMakerRec->GetRecPointsData(19 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(rad);
914 fAliITSQADataMakerRec->GetRecPointsData(20 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(phi);
915 fAliITSQADataMakerRec->GetRecPointsData(21 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetNz(),cluster->GetNy());
916 fAliITSQADataMakerRec->GetRecPointsData(22 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetNpixels());
917 fAliITSQADataMakerRec->GetRecPointsData(23 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetSPDclusterType());
918 fAliITSQADataMakerRec->GetRecPointsData(24 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[2],phi);
096292ae 919 }
8bab7823 920 fAliITSQADataMakerRec->GetRecPointsData(25 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(rad,phi);
921 fAliITSQADataMakerRec->GetRecPointsData(26 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[0],cluGlo[1]);
8ec28eb2 922
923 nClusters[lay]++;
3647765c 924 } // end of cluster loop
925 } // end of its "subdetector" loop
8ec28eb2 926
3647765c 927 for (Int_t iLay=0; iLay<2; iLay++)
8bab7823 928 fAliITSQADataMakerRec->GetRecPointsData(27 +iLay +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nClusters[iLay]);
8ec28eb2 929
8bab7823 930 fAliITSQADataMakerRec->GetRecPointsData(29 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nClusters[0],nClusters[1]);
8ec28eb2 931
eca4fa66 932 return rv ;
096292ae 933}
7a0e5776 934
935
936
937//_______________________________________________________________
938
96d29da9 939Int_t AliITSQASPDDataMakerRec::GetOffset(AliQAv1::TASKINDEX_t task,Int_t specie) const {
7a0e5776 940 // Returns offset number according to the specified task
941 Int_t offset=0;
4e25ac79 942 if( task == AliQAv1::kRAWS ) {
80b9610c 943 offset=fGenRawsOffset[specie];
7a0e5776 944 }
eca4fa66 945 else if( task == AliQAv1::kDIGITSR ) {
80b9610c 946 offset=fGenDigitsOffset[specie];
eca4fa66 947 }
4e25ac79 948 else if( task == AliQAv1::kRECPOINTS ) {
80b9610c 949 offset=fGenRecPointsOffset[specie];
7a0e5776 950 }
7a0e5776 951
952 return offset;
953}
954
955//_______________________________________________________________
956
8b7e858c 957void AliITSQASPDDataMakerRec::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset, Int_t specie) {
eca4fa66 958 // Returns offset number according to the specified task
959 if( task == AliQAv1::kRAWS ) {
8b7e858c 960 fGenRawsOffset[specie]=offset;
eca4fa66 961 }
962 else if( task == AliQAv1::kDIGITSR ) {
4a903927 963 fGenDigitsOffset[specie]=offset;
eca4fa66 964 }
965 else if( task == AliQAv1::kRECPOINTS ) {
8b7e858c 966 fGenRecPointsOffset[specie]=offset;
eca4fa66 967 }
968}
969
970//_______________________________________________________________
971
96d29da9 972Int_t AliITSQASPDDataMakerRec::GetTaskHisto(AliQAv1::TASKINDEX_t task) const {
7a0e5776 973 // Returns the number of histograms associated to the specified task
eca4fa66 974
7a0e5776 975 Int_t histotot=0;
976
4e25ac79 977 if( task == AliQAv1::kRAWS ) {
7a0e5776 978 histotot=fSPDhRawsTask;
979 }
eca4fa66 980 else if( task == AliQAv1::kDIGITSR ) {
981 histotot=fSPDhDigitsTask;
982 }
4e25ac79 983 else if( task == AliQAv1::kRECPOINTS ){
7a0e5776 984 histotot=fSPDhRecPointsTask;
985 }
4a903927 986
a1287af5 987 return histotot;
7a0e5776 988}
96d29da9 989