Bug fix - Jira ticket ALIROOT-5665
[u/mrichter/AliRoot.git] / ITS / AliITSQASPDDataMakerSim.cxx
CommitLineData
379510c2 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 **************************************************************************/
15
16/* $Id$ */
17// *************************************************************
18// Checks the quality assurance
19// by comparing with reference data
20// contained in a DB
21// -------------------------------------------------------------
22// W. Ferrarese + P. Cerello INFN Torino Feb 2008
23// M. Nicassio D. Elia INFN Bari April 2008
24// maria.nicassio@ba.infn.it
25
26// --- ROOT system ---
27#include <TTree.h>
28#include <TH2.h>
29#include <TH1.h>
30// --- Standard library ---
31
32// --- AliRoot header files ---
33#include "AliRun.h"
34#include "AliITSQADataMakerSim.h"
35#include "AliITSQASPDDataMakerSim.h"
4e25ac79 36#include "AliQAv1.h"
379510c2 37#include "AliQAChecker.h"
38#include "AliITSdigit.h"
39#include "AliITSdigitSPD.h"
40#include "AliITS.h"
41#include "AliITSmodule.h"
42#include "AliITShit.h"
43#include "AliITSLoader.h"
44#include "AliRunLoader.h"
45
46ClassImp(AliITSQASPDDataMakerSim)
47
48//____________________________________________________________________________
49AliITSQASPDDataMakerSim::AliITSQASPDDataMakerSim(AliITSQADataMakerSim *aliITSQADataMakerSim) :
50TObject(),
51fAliITSQADataMakerSim(aliITSQADataMakerSim),
7a0e5776 52fSPDhHTask(0),
53fSPDhSTask(0),
54fSPDhDTask(0),
3f905799 55fGenOffsetH(0),
56fGenOffsetS(0),
57fGenOffsetD(0)
379510c2 58{
59 //ctor used to discriminate OnLine-Offline analysis
4a903927 60 fGenOffsetH= new Int_t[AliRecoParam::kNSpecies];
61 fGenOffsetS= new Int_t[AliRecoParam::kNSpecies];
62 fGenOffsetD= new Int_t[AliRecoParam::kNSpecies];
63 for(Int_t i=0; i<AliRecoParam::kNSpecies; i++) {
64 fGenOffsetH[i]= 0;
65 fGenOffsetS[i]= 0;
66 fGenOffsetD[i]= 0;
67 }
379510c2 68}
69
70//____________________________________________________________________________
71AliITSQASPDDataMakerSim::AliITSQASPDDataMakerSim(const AliITSQASPDDataMakerSim& qadm) :
72TObject(),
73fAliITSQADataMakerSim(qadm.fAliITSQADataMakerSim),
7a0e5776 74fSPDhHTask(qadm.fSPDhHTask),
75fSPDhSTask(qadm.fSPDhSTask),
76fSPDhDTask(qadm.fSPDhDTask),
3f905799 77fGenOffsetH(qadm.fGenOffsetH),
78fGenOffsetS(qadm.fGenOffsetS),
79fGenOffsetD(qadm.fGenOffsetD)
379510c2 80{
81 //copy ctor
82 fAliITSQADataMakerSim->SetName((const char*)qadm.fAliITSQADataMakerSim->GetName()) ;
83 fAliITSQADataMakerSim->SetTitle((const char*)qadm.fAliITSQADataMakerSim->GetTitle());
4a903927 84
85}
379510c2 86
87//__________________________________________________________________
88AliITSQASPDDataMakerSim& AliITSQASPDDataMakerSim::operator = (const AliITSQASPDDataMakerSim& qac )
89{
90 // Equal operator.
91 this->~AliITSQASPDDataMakerSim();
92 new(this) AliITSQASPDDataMakerSim(qac);
93 return *this;
94}
95
96//____________________________________________________________________________
97void AliITSQASPDDataMakerSim::StartOfDetectorCycle()
98{
99 //Detector specific actions at start of cycle
5379c4a3 100 AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of SPD Cycle\n");
379510c2 101}
102
103//____________________________________________________________________________
92664bc8 104void AliITSQASPDDataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t /*task*/, TObjArray** /*list*/)
379510c2 105{
106 // launch the QA checking
5379c4a3 107 AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n");
379510c2 108
4e25ac79 109 //AliQAChecker::Instance()->Run( AliQAv1::kITS , task, list);
379510c2 110}
111
112//____________________________________________________________________________
eca4fa66 113Int_t AliITSQASPDDataMakerSim::InitDigits()
379510c2 114{
115 // Initialization for DIGIT data - SPD -
7d297381 116 const Bool_t expert = kTRUE ;
117 const Bool_t image = kTRUE ;
eca4fa66 118 Int_t rv = 0 ;
119 //fGenOffsetD = (fAliITSQADataMakerSim->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
7a0e5776 120 //fSPDhDTask must be incremented by one unit every time a histogram is ADDED to the QA List
379510c2 121
e3c90d69 122 Char_t name[51];
123 Char_t title[51];
379510c2 124
26ee9565 125 TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
379510c2 126 hlayer->GetXaxis()->SetTitle("Layer number");
127 hlayer->GetYaxis()->SetTitle("Entries");
4a903927 128 rv = fAliITSQADataMakerSim->Add2DigitsList(hlayer,fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()], expert, !image);
7a0e5776 129 fSPDhDTask++;
379510c2 130
131 TH1F **hmod = new TH1F*[2];
132 for (Int_t iLay=0; iLay<2; iLay++) {
e3c90d69 133 snprintf(name,50,"SPDModPattern_SPD%d",iLay+1);
134 snprintf(title,50,"Module map - SPD Layer %d",iLay+1);
379510c2 135 hmod[iLay]=new TH1F(name,title,240,0,240);
136 hmod[iLay]->GetXaxis()->SetTitle("Module number");
137 hmod[iLay]->GetYaxis()->SetTitle("Entries");
4a903927 138 rv = fAliITSQADataMakerSim->Add2DigitsList(hmod[iLay],1+iLay+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image);
7a0e5776 139 fSPDhDTask++;
379510c2 140 }
141
26ee9565 142 TH1F *hcolumns = new TH1F("SPDColumns_SPD","Columns - SPD",160,0.,160.);
379510c2 143 hcolumns->GetXaxis()->SetTitle("Column number");
144 hcolumns->GetYaxis()->SetTitle("Entries");
4a903927 145 fAliITSQADataMakerSim->Add2DigitsList(hcolumns,3+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()], expert, !image);
7a0e5776 146 fSPDhDTask++;
379510c2 147
26ee9565 148 TH1F *hrows = new TH1F("SPDRows_SPD","Rows - SPD",256,0.,256.);
379510c2 149 hrows->GetXaxis()->SetTitle("Row number");
150 hrows->GetYaxis()->SetTitle("Entries");
4a903927 151 rv = fAliITSQADataMakerSim->Add2DigitsList(hrows,4+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()], expert, !image);
7a0e5776 152 fSPDhDTask++;
379510c2 153
154 TH1F** hMultSPDdigits = new TH1F*[2];
155 for (Int_t iLay=0; iLay<2; ++iLay) {
e3c90d69 156 snprintf(name,50,"SPDDigitMultiplicity_SPD%d",iLay+1);
157 snprintf(title,50,"Digit multiplicity - SPD Layer %d",iLay+1);
379510c2 158 hMultSPDdigits[iLay]=new TH1F(name,title,200,0.,200.);
159 hMultSPDdigits[iLay]->GetXaxis()->SetTitle("Digit multiplicity");
160 hMultSPDdigits[iLay]->GetYaxis()->SetTitle("Entries");
4a903927 161 rv = fAliITSQADataMakerSim->Add2DigitsList(hMultSPDdigits[iLay], 5+iLay+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image);
7a0e5776 162 fSPDhDTask++;
379510c2 163 }
164
954ef57a 165 TH2F *hMultSPDdig2MultSPDdig1
26ee9565 166 = new TH2F("SPDDigitMultCorrelation_SPD","Digit multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
379510c2 167 hMultSPDdig2MultSPDdig1->GetXaxis()->SetTitle("Digit multiplicity (Layer 1)");
168 hMultSPDdig2MultSPDdig1->GetYaxis()->SetTitle("Digit multiplicity (Layer 2)");
4a903927 169 rv = fAliITSQADataMakerSim->Add2DigitsList(hMultSPDdig2MultSPDdig1,7+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image);
7a0e5776 170 fSPDhDTask++;
379510c2 171
5379c4a3 172 AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Digits histograms booked\n",fSPDhDTask));
e3c90d69 173 delete [] hmod;
174 delete [] hMultSPDdigits;
eca4fa66 175 return rv ;
379510c2 176}
177
178//____________________________________________________________________________
eca4fa66 179Int_t AliITSQASPDDataMakerSim::MakeDigits(TTree *digits)
379510c2 180{
181 // Fill QA for DIGIT - SPD -
eca4fa66 182 Int_t rv = 0 ;
6252ceeb 183
379510c2 184 AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");
185 fITS->SetTreeAddress();
186 TClonesArray *iITSdigits = fITS->DigitsAddress(0); // 0->SPD
187
188 Int_t nDigitsL1=0;
189 Int_t nDigitsL2=0;
190
191 for (Int_t imod=0; imod<240; ++imod){
192 digits->GetEvent(imod);
193 Int_t ndigits = iITSdigits->GetEntries();
194 if (imod<80) {
92664bc8 195 fAliITSQADataMakerSim->FillDigitsData(0+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],0.5,ndigits);
196 fAliITSQADataMakerSim->FillDigitsData(1+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],imod,ndigits);
379510c2 197 nDigitsL1+=ndigits;
198 }
199 else {
92664bc8 200 fAliITSQADataMakerSim->FillDigitsData(0+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],1,ndigits);
201 fAliITSQADataMakerSim->FillDigitsData(2+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],imod,ndigits);
379510c2 202 nDigitsL2+=ndigits;
203 }
204 for (Int_t idig=0; idig<ndigits; ++idig) {
205 AliITSdigit *dig=(AliITSdigit*)iITSdigits->UncheckedAt(idig);
206 Int_t col=dig->GetCoord1(); // cell number z
207 Int_t row=dig->GetCoord2(); // cell number x
92664bc8 208 fAliITSQADataMakerSim->FillDigitsData(3+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],col);
209 fAliITSQADataMakerSim->FillDigitsData(4+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],row);
379510c2 210 }
211 }
92664bc8 212 fAliITSQADataMakerSim->FillDigitsData(5+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],nDigitsL1);
213 fAliITSQADataMakerSim->FillDigitsData(6+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],nDigitsL2);
214 fAliITSQADataMakerSim->FillDigitsData(7+fGenOffsetD[fAliITSQADataMakerSim->GetEventSpecie()],nDigitsL1,nDigitsL2);
215 //
eca4fa66 216 return rv ;
379510c2 217}
218
219//____________________________________________________________________________
eca4fa66 220Int_t AliITSQASPDDataMakerSim::InitSDigits()
379510c2 221{
222 // Initialization for SDIGIT data - SPD -
7d297381 223 const Bool_t expert = kTRUE ;
224 const Bool_t image = kTRUE ;
eca4fa66 225 Int_t rv = 0 ;
226 //fGenOffsetS = (fAliITSQADataMakerSim->fSDigitsQAList[AliRecoParam::kDefault])->GetEntries();
c71529b0 227 //printf("--W-- AliITSQASPDDataMakerSim::InitSDigits() fGenOffset= %d \n",fGenOffset);
7a0e5776 228 //fSPDhSTask must be incremented by one unit every time a histogram is ADDED to the QA List
c71529b0 229
e3c90d69 230 Char_t name[51];
231 Char_t title[51];
379510c2 232
26ee9565 233 TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.);
379510c2 234 hlayer->GetXaxis()->SetTitle("Layer number");
235 hlayer->GetYaxis()->SetTitle("Entries");
4a903927 236 rv = fAliITSQADataMakerSim->Add2SDigitsList(hlayer,fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()], expert, !image);
7a0e5776 237 fSPDhSTask++;
379510c2 238
239 TH1F **hmod = new TH1F*[2];
240 for (Int_t iLay=0; iLay<2; ++iLay) {
e3c90d69 241 snprintf(name,50,"SPDModPattern_SPD%d",iLay+1);
242 snprintf(title,50,"Module map - SPD Layer %d",iLay+1);
379510c2 243 hmod[iLay]=new TH1F(name,title,240,0,240);
244 hmod[iLay]->GetXaxis()->SetTitle("Module number");
245 hmod[iLay]->GetYaxis()->SetTitle("Entries");
4a903927 246 rv = fAliITSQADataMakerSim->Add2SDigitsList(hmod[iLay],1+iLay+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image);
7a0e5776 247 fSPDhSTask++;
379510c2 248 }
379510c2 249
5379c4a3 250 AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD SDigits histograms booked\n",fSPDhSTask));
e3c90d69 251 delete [] hmod;
eca4fa66 252 return rv ;
379510c2 253}
254
255//____________________________________________________________________________
eca4fa66 256Int_t AliITSQASPDDataMakerSim::MakeSDigits(TTree *sdigits)
379510c2 257{
258 // Fill QA for SDIGIT - SPD -
eca4fa66 259 Int_t rv = 0 ;
6252ceeb 260 static TClonesArray * sdig ;
261 if (! sdig )
262 sdig = new TClonesArray( "AliITSpListItem",1000 );
263
379510c2 264 TBranch *brchSDigits = sdigits->GetBranch("ITS");
265 for (Int_t imod=0; imod<240; ++imod){
379510c2 266 brchSDigits->SetAddress( &sdig );
267 brchSDigits->GetEvent(imod);
268 Int_t nsdig=sdig->GetEntries();
269 if (imod<80) {
92664bc8 270 fAliITSQADataMakerSim->FillSDigitsData(0+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()],0.5,nsdig);
271 fAliITSQADataMakerSim->FillSDigitsData(1+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()],imod,nsdig);
379510c2 272 }
273 else {
92664bc8 274 fAliITSQADataMakerSim->FillSDigitsData(0+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()],1,nsdig);
275 fAliITSQADataMakerSim->FillSDigitsData(2+fGenOffsetS[fAliITSQADataMakerSim->GetEventSpecie()],imod,nsdig);
379510c2 276 }
6252ceeb 277 sdig->Clear() ;
379510c2 278 }
92664bc8 279 //
eca4fa66 280 return rv ;
379510c2 281}
282
283//____________________________________________________________________________
eca4fa66 284Int_t AliITSQASPDDataMakerSim::InitHits()
379510c2 285{
286 // Initialization for HITS data - SPD -
7d297381 287 const Bool_t expert = kTRUE ;
288 const Bool_t image = kTRUE ;
eca4fa66 289 Int_t rv = 0 ;
7d297381 290
eca4fa66 291 //fGenOffsetH = (fAliITSQADataMakerSim->fHitsQAList[AliRecoParam::kDefault])->GetEntries();
c71529b0 292 //printf("--W-- AliITSQASPDDataMakerSim::InitHits() fGenOffset= %d \n",fGenOffset);
7a0e5776 293 //fSPDhHTask must be incremented by one unit every time a histogram is ADDED to the QA List
379510c2 294 Char_t name[50];
295 Char_t title[50];
296
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");
4a903927 300 rv = fAliITSQADataMakerSim->Add2HitsList(hlayer,fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()], expert, !image);
7a0e5776 301 fSPDhHTask++;
379510c2 302
303 TH1F **hmod = new TH1F*[2];
304 for (Int_t iLay=0; iLay<2; ++iLay) {
5e24ec01 305 snprintf(name,49,"SPDModPattern_SPD%d",iLay+1);
306 snprintf(title,49,"Module map - SPD Layer %d",iLay+1);
379510c2 307 hmod[iLay]=new TH1F(name,title,240,0,240);
308 hmod[iLay]->GetXaxis()->SetTitle("Module number");
309 hmod[iLay]->GetYaxis()->SetTitle("Entries");
4a903927 310 rv = fAliITSQADataMakerSim->Add2HitsList(hmod[iLay],1+iLay+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image);
7a0e5776 311 fSPDhHTask++;
379510c2 312 }
313
db72ff3b 314 TH1F *hhitlenght = new TH1F("SPDLenght_SPD","SPD Hit lenght along y_{loc} coord",210,0.,210.);
379510c2 315 hhitlenght->GetXaxis()->SetTitle("Hit lenght [#mum]");
316 hhitlenght->GetYaxis()->SetTitle("# hits");
4a903927 317 rv = fAliITSQADataMakerSim->Add2HitsList(hhitlenght,3+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image);
7a0e5776 318 fSPDhHTask++;
379510c2 319
db72ff3b 320 TH1F *hEdepos = new TH1F("SPDEnergyDeposit_SPD","SPD Deposited energy distribution (y_{loc}>180 #mum)",150,0.,300.);
379510c2 321 hEdepos->GetXaxis()->SetTitle("Deposited energy [keV]");
322 hEdepos->GetYaxis()->SetTitle("# hits");
4a903927 323 rv = fAliITSQADataMakerSim->Add2HitsList(hEdepos,4+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()], !expert, image);
7a0e5776 324 fSPDhHTask++;
379510c2 325
5379c4a3 326 AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Hits histograms booked\n",fSPDhHTask));
e3c90d69 327 delete [] hmod;
eca4fa66 328 return rv ;
379510c2 329}
330
331//____________________________________________________________________________
eca4fa66 332Int_t AliITSQASPDDataMakerSim::MakeHits(TTree *hits)
379510c2 333{
334 // Fill QA for HITS - SPD -
eca4fa66 335 Int_t rv = 0 ;
eca4fa66 336
379510c2 337 AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");
338 fITS->SetTreeAddress();
339 Int_t nmodules;
340 fITS->InitModules(-1,nmodules); //-1->number of modules taken from AliITSgeom class kept in fITSgeom
341 //nmodules is set
342
343 fITS->FillModules(hits,0);
344
345 for (Int_t imod=0; imod<240; ++imod){
346 AliITSmodule *module = fITS->GetModule(imod);
347 TObjArray *arrHits = module->GetHits();
348 Int_t nhits = arrHits->GetEntriesFast();
349 if (imod<80) {
92664bc8 350 fAliITSQADataMakerSim->FillHitsData(fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],0.5,nhits);
351 fAliITSQADataMakerSim->FillHitsData(1+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],imod,nhits);
379510c2 352 } else {
92664bc8 353 fAliITSQADataMakerSim->FillHitsData(fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],1,nhits);
354 fAliITSQADataMakerSim->FillHitsData(2+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],imod,nhits);
379510c2 355 }
379510c2 356 for (Int_t iHit=0; iHit<nhits; ++iHit) {
357 AliITShit *hit = (AliITShit*) arrHits->At(iHit);
358 Double_t xl,yl,zl,xl0,yl0,zl0;
359 Double_t tof,tof0;
360 hit->GetPositionL(xl,yl,zl,tof);
361 hit->GetPositionL0(xl0,yl0,zl0,tof0);
362 Float_t dyloc=TMath::Abs(yl-yl0)*10000.;
92664bc8 363 fAliITSQADataMakerSim->FillHitsData(3+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],dyloc);
379510c2 364 Float_t edep=hit->GetIonization()*1000000;
365 if(dyloc>180.){
92664bc8 366 fAliITSQADataMakerSim->FillHitsData(4+fGenOffsetH[fAliITSQADataMakerSim->GetEventSpecie()],edep);
379510c2 367 }
368 }
369 }
92664bc8 370 //
eca4fa66 371 return rv ;
379510c2 372}
7a0e5776 373
374
375//_______________________________________________________________
376
80b9610c 377Int_t AliITSQASPDDataMakerSim::GetOffset(AliQAv1::TASKINDEX_t task,Int_t specie){
7a0e5776 378 // Returns histogram offset according to the specified task
379 Int_t offset=0;
4e25ac79 380 if( task == AliQAv1::kHITS){
80b9610c 381 offset=fGenOffsetH[specie];
7a0e5776 382 }
4e25ac79 383 else if( task == AliQAv1::kSDIGITS) {
80b9610c 384 offset=fGenOffsetS[specie];
7a0e5776 385 }
4e25ac79 386 else if( task == AliQAv1::kDIGITS) {
80b9610c 387 offset=fGenOffsetD[specie];
7a0e5776 388 }
389 else {
390 AliInfo("No task has been selected. TaskHisto set to zero.\n");
391 }
392
393 return offset;
394}
395
eca4fa66 396//____________________________________________________________________________
4a903927 397void AliITSQASPDDataMakerSim::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset,Int_t specie ){
eca4fa66 398 // Returns histogram offset according to the specified task
399 if( task == AliQAv1::kHITS){
4a903927 400 fGenOffsetH[specie] = offset;
eca4fa66 401 }
402 else if( task == AliQAv1::kSDIGITS) {
4a903927 403 fGenOffsetS[specie] = offset;
eca4fa66 404 }
405 else if( task == AliQAv1::kDIGITS) {
4a903927 406 fGenOffsetD[specie] = offset;
eca4fa66 407 }
408 else {
409 AliInfo("No task has been selected. TaskHisto set to zero.\n");
410 }
411}
7a0e5776 412
413//_______________________________________________________________
414
4e25ac79 415Int_t AliITSQASPDDataMakerSim::GetTaskHisto(AliQAv1::TASKINDEX_t task) {
7a0e5776 416 // Returns the number of booked histograms for the selected task
417 Int_t histotot=0;
4e25ac79 418 if( task == AliQAv1::kHITS) {
7a0e5776 419 histotot=fSPDhHTask ;
420 }
4e25ac79 421 else if( task == AliQAv1::kSDIGITS) {
7a0e5776 422 histotot=fSPDhSTask;
423 }
4e25ac79 424 else if( task == AliQAv1::kDIGITS) {
7a0e5776 425 histotot=fSPDhDTask ;
426 }
427 else {
428 AliInfo("No task has been selected. TaskHisto set to zero.\n");
429 }
430 return histotot;
431
432}