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