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