vplot_tpc.C
[u/mrichter/AliRoot.git] / ITS / AliITSQADataMakerRec.cxx
CommitLineData
04236e67 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// *************************************************************
19// Checks the quality assurance
20// by comparing with reference data
21// contained in a DB
22// -------------------------------------------------------------
8c823e5a 23// W. Ferrarese + P. Cerello Feb 2008
04236e67 24// INFN Torino
25
26// --- ROOT system ---
e23412ab 27#include <TH2.h>
04236e67 28#include <TTree.h>
04236e67 29// --- Standard library ---
30
31// --- AliRoot header files ---
32#include "AliITSQADataMakerRec.h"
8c823e5a 33#include "AliITSQASPDDataMakerRec.h"
34#include "AliITSQASDDDataMakerRec.h"
35#include "AliITSQASSDDataMakerRec.h"
04236e67 36#include "AliLog.h"
37#include "AliQA.h"
38#include "AliQAChecker.h"
c71529b0 39#include "AliITSQAChecker.h"
04236e67 40#include "AliRawReader.h"
a90a332e 41#include "AliESDEvent.h"
42#include "AliESDtrack.h"
43#include "AliESDVertex.h"
44#include "AliMultiplicity.h"
04236e67 45
46ClassImp(AliITSQADataMakerRec)
47
48//____________________________________________________________________________
8c823e5a 49AliITSQADataMakerRec::AliITSQADataMakerRec(Bool_t kMode, Short_t subDet, Short_t ldc) :
50AliQADataMakerRec(AliQA::GetDetName(AliQA::kITS), "ITS Quality Assurance Data Maker"),
1aa7c4f5 51fkOnline(kMode),
e41192d7 52fHLTMode(0),
8c823e5a 53fSubDetector(subDet),
1aa7c4f5 54fLDC(ldc),
8c823e5a 55fSPDDataMaker(NULL),
56fSDDDataMaker(NULL),
57fSSDDataMaker(NULL)
1aa7c4f5 58{
1aa7c4f5 59 //ctor used to discriminate OnLine-Offline analysis
8c823e5a 60 if(fSubDetector < 0 || fSubDetector > 3) {
61 AliError("Error: fSubDetector number out of range; return\n");
62 }
63
64 // Initialization for RAW data
65 if(fSubDetector == 0 || fSubDetector == 1) {
66 AliDebug(1,"AliITSQADM::Create SPD DataMakerRec\n");
67 fSPDDataMaker = new AliITSQASPDDataMakerRec(this,fkOnline);
68 }
69 if(fSubDetector == 0 || fSubDetector == 2) {
70 AliDebug(1,"AliITSQADM::Create SDD DataMakerRec\n");
71 fSDDDataMaker = new AliITSQASDDDataMakerRec(this,fkOnline);
e41192d7 72 if(fkOnline){SetHLTMode(fSDDDataMaker->GetHLTMode()); }
8c823e5a 73 }
74 if(fSubDetector == 0 || fSubDetector == 3) {
75 AliDebug(1,"AliITSQADM::Create SSD DataMakerRec\n");
76 fSSDDataMaker = new AliITSQASSDDataMakerRec(this,fkOnline);
77 }
1aa7c4f5 78}
79
80//____________________________________________________________________________
8c823e5a 81AliITSQADataMakerRec::~AliITSQADataMakerRec(){
82 // destructor
83 if(fSPDDataMaker)delete fSPDDataMaker;
84 if(fSDDDataMaker)delete fSDDDataMaker;
85 if(fSSDDataMaker)delete fSSDDataMaker;
04236e67 86}
87
88//____________________________________________________________________________
89AliITSQADataMakerRec::AliITSQADataMakerRec(const AliITSQADataMakerRec& qadm) :
8c823e5a 90AliQADataMakerRec(),
9db10425 91fkOnline(qadm.fkOnline),
e41192d7 92fHLTMode(qadm.fHLTMode),
8c823e5a 93fSubDetector(qadm.fSubDetector),
9db10425 94fLDC(qadm.fLDC),
8c823e5a 95fSPDDataMaker(NULL),
96fSDDDataMaker(NULL),
97fSSDDataMaker(NULL)
04236e67 98{
99 //copy ctor
100 SetName((const char*)qadm.GetName()) ;
8c823e5a 101 SetTitle((const char*)qadm.GetTitle());
04236e67 102}
103
104//__________________________________________________________________
105AliITSQADataMakerRec& AliITSQADataMakerRec::operator = (const AliITSQADataMakerRec& qac )
106{
107 // Equal operator.
108 this->~AliITSQADataMakerRec();
109 new(this) AliITSQADataMakerRec(qac);
110 return *this;
111}
112
113//____________________________________________________________________________
8c823e5a 114void AliITSQADataMakerRec::StartOfDetectorCycle()
04236e67 115{
116 //Detector specific actions at start of cycle
117 AliDebug(1,"AliITSQADM::Start of ITS Cycle\n");
8c823e5a 118 if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->StartOfDetectorCycle();
119 if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->StartOfDetectorCycle();
120 if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->StartOfDetectorCycle();
04236e67 121}
122
123//____________________________________________________________________________
57acd2d2 124void AliITSQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray** list)
04236e67 125{
126 // launch the QA checking
57acd2d2 127
128 for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
129 SetEventSpecie(specie) ;
130 AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list[specie])\n");
131 if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list[specie]);
132 if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list[specie]);
133 if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list[specie]);
134 }
04236e67 135
c71529b0 136 AliQAChecker *qac = AliQAChecker::Instance();
137 AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
614c7e17 138 Int_t subdet=GetSubDet();
139 qacb->SetSubDet(subdet);
140
141 if(subdet== 0 ){
7a0e5776 142 qacb->SetTaskOffset(fSPDDataMaker->GetOffset(task), fSDDDataMaker->GetOffset(task), fSSDDataMaker->GetOffset(task)); //Setting the offset for the QAChecker list
3647765c 143 }
614c7e17 144 else
145 if(subdet!=0){
146 Int_t offset=GetDetTaskOffset(subdet, task);
147 qacb->SetDetTaskOffset(subdet,offset);
148 }
149
c71529b0 150 qac->Run( AliQA::kITS , task, list); //temporary skipping the checking
04236e67 151}
152
153//____________________________________________________________________________
8c823e5a 154void AliITSQADataMakerRec::EndOfDetectorCycle(const char * /*fgDataName*/)
04236e67 155{
8c823e5a 156 //eventually used for different AliQAChecker::Instance()->Run
04236e67 157}
158
159//____________________________________________________________________________
160void AliITSQADataMakerRec::InitRaws()
161{
8c823e5a 162 // Initialization for RAW data
163 if(fSubDetector == 0 || fSubDetector == 1) {
164 AliDebug(1,"AliITSQADM:: SPD InitRaws\n");
165 fSPDDataMaker->InitRaws();
1aa7c4f5 166 }
8c823e5a 167 if(fSubDetector == 0 || fSubDetector == 2) {
168 AliDebug(1,"AliITSQADM:: SDD InitRaws\n");
169 fSDDDataMaker->InitRaws();
04236e67 170 }
8c823e5a 171 if(fSubDetector == 0 || fSubDetector == 3) {
172 AliDebug(1,"AliITSQADM:: SSD InitRaws\n");
173 fSSDDataMaker->InitRaws();
04236e67 174 }
1aa7c4f5 175}
176
04236e67 177//____________________________________________________________________________
178void AliITSQADataMakerRec::MakeRaws(AliRawReader* rawReader)
179{
8c823e5a 180 // Fill QA for RAW
181 if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeRaws(rawReader);
182 if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeRaws(rawReader);
183 if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRaws(rawReader);
1aa7c4f5 184}
04236e67 185
186//____________________________________________________________________________
187void AliITSQADataMakerRec::InitRecPoints()
188{
1aa7c4f5 189 // Initialization for RECPOINTS
8c823e5a 190 if(fSubDetector == 0 || fSubDetector == 1) {
191 AliDebug(1,"AliITSQADM:: SPD InitRecPoints\n");
192 fSPDDataMaker->InitRecPoints();
04236e67 193 }
8c823e5a 194 if(fSubDetector == 0 || fSubDetector == 2) {
195 AliDebug(1,"AliITSQADM:: SDD InitRecPoints\n");
196 fSDDDataMaker->InitRecPoints();
1aa7c4f5 197 }
8c823e5a 198 if(fSubDetector == 0 || fSubDetector == 3) {
199 AliDebug(1,"AliITSQADM:: SSD InitRecPoints\n");
200 fSSDDataMaker->InitRecPoints();
1aa7c4f5 201 }
1aa7c4f5 202}
04236e67 203
204//____________________________________________________________________________
205void AliITSQADataMakerRec::MakeRecPoints(TTree * clustersTree)
206{
1aa7c4f5 207 // Fill QA for recpoints
8c823e5a 208 if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeRecPoints(clustersTree);
209 if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeRecPoints(clustersTree);
210 if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRecPoints(clustersTree);
04236e67 211}
212
d7d87ceb 213
a90a332e 214//____________________________________________________________________________
215void AliITSQADataMakerRec::InitESDs()
216{
217 // Create ESDs histograms in ESDs subdir
218
585a6e79 219 Bool_t expertHistogram = kTRUE;
220
a90a332e 221 TH1F *hESDClustersMI =
222 new TH1F("hESDClustersMI", "N ITS clusters per track (MI); N clusters; Counts",
223 7, -0.5, 6.5);
224 hESDClustersMI->Sumw2();
225 hESDClustersMI->SetMinimum(0);
226 Add2ESDsList(hESDClustersMI, 0);
227
228 TH1F *hESDClusterMapMI =
d7d87ceb 229 new TH1F("hESDClusterMapMI", "N tracks with point Layer (MI); Layer; N tracks",
a90a332e 230 6, -0.5, 5.5);
231 hESDClusterMapMI->Sumw2();
232 hESDClusterMapMI->SetMinimum(0);
585a6e79 233 Add2ESDsList(hESDClusterMapMI, 1, expertHistogram);
a90a332e 234
235 TH1F *hESDClustersSA =
236 new TH1F("hESDClustersSA", "N ITS clusters per track (SA); N clusters; Counts",
237 7, -0.5, 6.5);
238 hESDClustersSA->Sumw2();
239 hESDClustersSA->SetMinimum(0);
240 Add2ESDsList(hESDClustersSA, 2);
241
242 TH1F *hESDClusterMapSA =
d7d87ceb 243 new TH1F("hESDClusterMapSA", "N tracks with point Layer (SA); Layer; N tracks",
a90a332e 244 6, -0.5, 5.5);
245 hESDClusterMapSA->Sumw2();
246 hESDClusterMapSA->SetMinimum(0);
585a6e79 247 Add2ESDsList(hESDClusterMapSA, 3, expertHistogram);
a90a332e 248
249 TH1F *hSPDVertexX =
250 new TH1F("hSPDVertexX","SPD Vertex x; x [cm]; N events",
251 10000,-2,2);
252 hSPDVertexX->Sumw2();
253 Add2ESDsList(hSPDVertexX, 4);
254
255 TH1F *hSPDVertexY =
256 new TH1F("hSPDVertexY","SPD Vertex y; y [cm]; N events",
257 10000,-2,2);
258 hSPDVertexY->Sumw2();
259 Add2ESDsList(hSPDVertexY, 5);
260
261 TH1F *hSPDVertexZ =
d7d87ceb 262 new TH1F("hSPDVertexZ","SPD Vertex Z; z [cm]; N events",
a90a332e 263 10000,-20,20);
264 hSPDVertexZ->Sumw2();
265 Add2ESDsList(hSPDVertexZ, 6);
266
267 TH1F *hSPDVertexContrOverMult =
268 new TH1F("hSPDVertexContrOverMult","SPD Vertex: contributors / multiplicity; N contributors / SPD multiplicity; N events",
269 100,-4,20);
270 hSPDVertexContrOverMult->Sumw2();
585a6e79 271 Add2ESDsList(hSPDVertexContrOverMult, 7, expertHistogram);
a90a332e 272
273 TH1F *hTrkVertexX =
274 new TH1F("hTrkVertexX","ITS+TPC Trk Vertex x; x [cm]; N events",
275 10000,-2,2);
276 hTrkVertexX->Sumw2();
585a6e79 277 Add2ESDsList(hTrkVertexX, 8, expertHistogram);
a90a332e 278
279 TH1F *hTrkVertexY =
280 new TH1F("hTrkVertexY","ITS+TPC Trk Vertex y; y [cm]; N events",
281 10000,-2,2);
282 hTrkVertexY->Sumw2();
585a6e79 283 Add2ESDsList(hTrkVertexY, 9, expertHistogram);
a90a332e 284
285 TH1F *hTrkVertexZ =
d7d87ceb 286 new TH1F("hTrkVertexZ","ITS+TPC Trk Vertex Z; z [cm]; N events",
a90a332e 287 10000,-20,20);
288 hTrkVertexZ->Sumw2();
585a6e79 289 Add2ESDsList(hTrkVertexZ, 10, expertHistogram);
a90a332e 290
d7d87ceb 291 TH1F *hTrkVertexContrOverITSrefit5 =
292 new TH1F("hTrkVertexContrOverITSrefit5","ITS+TPC Trk Vertex: contributors / tracks; N contributors / N trks kITSrefit with 5 or 6 clusters; N events",
293 100,-4,2);
294 hTrkVertexContrOverITSrefit5->Sumw2();
585a6e79 295 Add2ESDsList(hTrkVertexContrOverITSrefit5, 11, expertHistogram);
a90a332e 296
297 TH1F *hSPDTrkVertexDeltaX =
298 new TH1F("hSPDTrkVertexDeltaX","Comparison of SPD and Trk vertices: x; xSPD-xTrk [cm]; N events",
299 1000,-1,1);
300 hSPDTrkVertexDeltaX->Sumw2();
585a6e79 301 Add2ESDsList(hSPDTrkVertexDeltaX, 12, expertHistogram);
a90a332e 302
303 TH1F *hSPDTrkVertexDeltaY =
304 new TH1F("hSPDTrkVertexDeltaY","Comparison of SPD and Trk vertices: y; ySPD-yTrk [cm]; N events",
305 1000,-1,1);
306 hSPDTrkVertexDeltaY->Sumw2();
585a6e79 307 Add2ESDsList(hSPDTrkVertexDeltaY, 13, expertHistogram);
a90a332e 308
309 TH1F *hSPDTrkVertexDeltaZ =
310 new TH1F("hSPDTrkVertexDeltaZ","Comparison of SPD and Trk vertices: z; zSPD-zTrk [cm]; N events",
311 1000,-1,1);
312 hSPDTrkVertexDeltaZ->Sumw2();
313 Add2ESDsList(hSPDTrkVertexDeltaZ, 14);
314
a8100152 315 // SPD Tracklets
316
317 TH1F* hSPDTracklets =
318 new TH1F("hSPDTracklets","N SPD Tracklets; N tracklets; Counts",300,0.,300.);
319 hSPDTracklets->Sumw2();
320 Add2ESDsList(hSPDTracklets, 15);
e23412ab 321
322 TH2F* hSPDTrackletsvsFiredChips0 =
323 new TH2F("hSPDTrackletsvsFiredChips0","N SPD Tracklets vs N FiredChips Layer0",
324 300,0.,300.,300,0.,300.);
325 hSPDTrackletsvsFiredChips0->GetXaxis()->SetTitle("N SPD Tracklets");
326 hSPDTrackletsvsFiredChips0->GetYaxis()->SetTitle("N FiredChips Layer0");
327 hSPDTrackletsvsFiredChips0->Sumw2();
328 Add2ESDsList(hSPDTrackletsvsFiredChips0, 16, expertHistogram );
329
330 TH2F* hSPDTrackletsvsFiredChips1 =
331 new TH2F("hSPDTrackletsvsFiredChips1","N SPD Tracklets vs N FiredChips Layer1",
332 300,0.,300.,300,0.,300.);
333 hSPDTrackletsvsFiredChips1->GetXaxis()->SetTitle("N SPD Tracklets");
334 hSPDTrackletsvsFiredChips1->GetYaxis()->SetTitle("N FiredChips Layer1");
335 hSPDTrackletsvsFiredChips1->Sumw2();
336 Add2ESDsList(hSPDTrackletsvsFiredChips1, 17, expertHistogram);
a8100152 337
338 TH1F* hSPDTrackletsDePhi =
339 new TH1F("hSPDTrackletsDePhi","DeltaPhi SPD Tracklets; DeltaPhi [rad]; N events",200,-0.2,0.2);
340 hSPDTrackletsDePhi->Sumw2();
e23412ab 341 Add2ESDsList(hSPDTrackletsDePhi, 18);
a8100152 342
343 TH1F* hSPDTrackletsPhi =
344 new TH1F("hSPDTrackletsPhi","Phi SPD Tracklets; Phi [rad]; N events",1000,0.,2*TMath::Pi());
345 hSPDTrackletsPhi->Sumw2();
e23412ab 346 Add2ESDsList(hSPDTrackletsPhi, 19);
a8100152 347
348 TH1F* hSPDTrackletsTheta =
349 new TH1F("hSPDTrackletsTheta","Theta SPD Tracklets; Theta [rad]; N events",500,0.,TMath::Pi());
350 hSPDTrackletsTheta->Sumw2();
e23412ab 351 Add2ESDsList(hSPDTrackletsTheta, 20);
a8100152 352
882ac7f1 353 // map of layers skipped by tracking (set in AliITSRecoParam)
354 TH1F *hESDSkippedLayers =
355 new TH1F("hESDSkippedLayers", "Map of layers skipped by tracking; Layer; Skipped",
356 6, -0.5, 5.5);
357 hESDSkippedLayers->Sumw2();
358 hESDSkippedLayers->SetMinimum(0);
e23412ab 359 Add2ESDsList(hESDSkippedLayers, 21, expertHistogram);
882ac7f1 360
361
a90a332e 362 return;
363}
364
365//____________________________________________________________________________
366void AliITSQADataMakerRec::MakeESDs(AliESDEvent *esd)
367{
368 // Make QA data from ESDs
369
370 const Int_t nESDTracks = esd->GetNumberOfTracks();
d7d87ceb 371 Int_t nITSrefit5 = 0;
a90a332e 372
882ac7f1 373 Int_t idet,status;
374 Float_t xloc,zloc;
375
a90a332e 376 // loop on tracks
377 for(Int_t i = 0; i < nESDTracks; i++) {
378
379 AliESDtrack *track = esd->GetTrack(i);
380
381 Int_t nclsITS = track->GetNcls(0);
382
383 Bool_t itsrefit=kFALSE,tpcin=kFALSE;
384 if ((track->GetStatus() & AliESDtrack::kITSrefit)) itsrefit=kTRUE;
385 if ((track->GetStatus() & AliESDtrack::kTPCin)) tpcin=kTRUE;
d7d87ceb 386 if(nclsITS>=5 && itsrefit) nITSrefit5++;
a90a332e 387
388 if(tpcin) {
389 GetESDsData(0)->Fill(nclsITS);
390 } else {
391 GetESDsData(2)->Fill(nclsITS);
392 }
393
394 for(Int_t layer=0; layer<6; layer++) {
395
396 if(TESTBIT(track->GetITSClusterMap(),layer)) {
397 if(tpcin) {
398 GetESDsData(1)->Fill(layer);
399 } else {
400 GetESDsData(3)->Fill(layer);
401 }
402 }
882ac7f1 403 track->GetITSModuleIndexInfo(layer,idet,status,xloc,zloc);
e23412ab 404 if(status==3) GetESDsData(21)->SetBinContent(layer,1);
a90a332e 405 }
406
407 } // end loop on tracks
408
409 // vertices
410 const AliESDVertex *vtxSPD = esd->GetPrimaryVertexSPD();
411 const AliESDVertex *vtxTrk = esd->GetPrimaryVertex();
412
a90a332e 413 Int_t mult = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetNumberOfTracklets();
414 if(mult>0)
415 GetESDsData(7)->Fill((Float_t)(vtxSPD->GetNContributors())/(Float_t)mult);
416
d7d87ceb 417 if(nITSrefit5>0)
418 GetESDsData(11)->Fill((Float_t)(vtxTrk->GetNIndices())/(Float_t)nITSrefit5);
a90a332e 419
d7d87ceb 420 if(vtxSPD->GetNContributors()>0) {
421 GetESDsData(4)->Fill(vtxSPD->GetXv());
422 GetESDsData(5)->Fill(vtxSPD->GetYv());
423 GetESDsData(6)->Fill(vtxSPD->GetZv());
424 }
a90a332e 425
d7d87ceb 426 if(vtxTrk->GetNContributors()>0) {
427 GetESDsData(8)->Fill(vtxTrk->GetXv());
428 GetESDsData(9)->Fill(vtxTrk->GetYv());
429 GetESDsData(10)->Fill(vtxTrk->GetZv());
430 }
431
432 if(vtxSPD->GetNContributors()>0 &&
433 vtxTrk->GetNContributors()>0) {
434 GetESDsData(12)->Fill(vtxSPD->GetXv()-vtxTrk->GetXv());
435 GetESDsData(13)->Fill(vtxSPD->GetYv()-vtxTrk->GetYv());
436 GetESDsData(14)->Fill(vtxSPD->GetZv()-vtxTrk->GetZv());
437 }
a90a332e 438
a8100152 439 // SPD Tracklets
e23412ab 440 GetESDsData(15)->Fill(mult);
441
442 Short_t nFiredChips0 = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetNumberOfFiredChips(0);
443 Short_t nFiredChips1 = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetNumberOfFiredChips(1);
444 GetESDsData(16)->Fill(nFiredChips0,mult);
445 GetESDsData(17)->Fill(nFiredChips1,mult);
a8100152 446
447 // Loop over tracklets
a8100152 448 for (Int_t itr=0; itr<mult; ++itr) {
449 Float_t dePhiTr = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetDeltaPhi(itr);
450 Float_t phiTr = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetPhi(itr);
451 Float_t thetaTr = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetTheta(itr);
e23412ab 452 GetESDsData(18)->Fill(dePhiTr);
453 GetESDsData(19)->Fill(phiTr);
454 GetESDsData(20)->Fill(thetaTr);
a8100152 455 } // end loop on tracklets
456
a90a332e 457 return;
458}
614c7e17 459
460//_________________________________________________________________
461Int_t AliITSQADataMakerRec::GetDetTaskOffset(Int_t subdet,AliQA::TASKINDEX_t task)
462{
463 switch(subdet)
464 {
465
466 Int_t offset;
467 case 1:
468 offset=fSPDDataMaker->GetOffset(task);
469 return offset;
470 break;
471 case 2:
472 offset=fSDDDataMaker->GetOffset(task);
473 return offset;
474 break;
475 case 3:
476 offset=fSSDDataMaker->GetOffset(task);
477 return offset;
478 break;
479 default:
480 AliWarning("No specific subdetector (SPD, SDD, SSD) selected!! Offset set to zero \n");
481 offset=0;
482 return offset;
483 break;
484 }
485 //return offset;
486}