]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCPad.cxx
loading beam type from GRP and read configuration object according to it
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCPad.cxx
1 // $Id$
2
3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project        * 
5 //* ALICE Experiment at CERN, All rights reserved.                         *
6 //*                                                                        *
7 //* Primary Authors: Timm Steinbeck, Matthias Richter                      *
8 //* Developers:      Kenneth Aamodt <kenneth.aamodt@student.uib.no>        *
9 //*                  for The ALICE HLT Project.                            *
10 //*                                                                        *
11 //* Permission to use, copy, modify and distribute this software and its   *
12 //* documentation strictly for non-commercial purposes is hereby granted   *
13 //* without fee, provided that the above copyright notice appears in all   *
14 //* copies and that both the copyright notice and this permission notice   *
15 //* appear in the supporting documentation. The authors make no claims     *
16 //* about the suitability of this software for any purpose. It is          *
17 //* provided "as is" without express or implied warranty.                  *
18 //**************************************************************************
19
20 /** @file   AliHLTTPCPad.cxx
21     @author Matthias Richter, Kenneth Aamodt
22     @date   
23     @brief  Container Class for TPC Pads.
24 */
25
26 #if __GNUC__>= 3
27 using namespace std;
28 #endif
29
30 #include <cerrno>
31 #include "AliHLTTPCPad.h"
32 #include "AliHLTStdIncludes.h"
33
34
35 //added by kenneth
36 #include "AliHLTTPCTransform.h"
37 #include "AliHLTTPCClusters.h"
38 #include <sys/time.h>
39 #include "TMath.h"
40 #include "TFile.h"
41 //------------------------------
42
43 /** margin for the base line be re-avaluated */
44 #define ALIHLTPAD_BASELINE_MARGIN (2*fAverage)
45
46 /** ROOT macro for the implementation of ROOT specific class methods */
47 ClassImp(AliHLTTPCPad)
48
49 AliHLTTPCPad::AliHLTTPCPad()
50   :
51   fClusterCandidates(),
52   fUsedClusterCandidates(),
53   fSelectedPad(kFALSE),
54   fHWAddress(0),
55   fRowNo(-1),
56   fPadNo(-1),
57   fThreshold(0),
58   fAverage(-1),
59   fNofEvents(0),
60   fSum(0),
61   fCount(0),
62   fTotal(0),
63   fBLMax(-1),
64   fBLMaxBin(-1),
65   fBLMin(-1),
66   fBLMinBin(-1),
67   fFirstBLBin(0),
68   fNofBins(0),
69   fReadPos(0),
70   fpRawData(NULL),
71   fDataSignals(NULL),
72   fSignalPositionArray(NULL),
73   fSizeOfSignalPositionArray(0),
74   fNGoodSignalsSent(0),
75   fCandidateDigitsVector()
76 {
77   // see header file for class documentation
78   // or
79   // refer to README to build package
80   // or
81   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
82   //  HLTInfo("Entering default constructor");
83   fDataSignals= new AliHLTTPCSignal_t[AliHLTTPCTransform::GetNTimeBins()];
84   memset( fDataSignals, 0xFF, sizeof(Int_t)*(AliHLTTPCTransform::GetNTimeBins()));
85   
86   fSignalPositionArray= new Int_t[AliHLTTPCTransform::GetNTimeBins()];
87   memset( fSignalPositionArray, 0xFF, sizeof(Int_t)*(AliHLTTPCTransform::GetNTimeBins()));
88   fSizeOfSignalPositionArray=0;
89
90 }
91
92 AliHLTTPCPad::AliHLTTPCPad(Int_t /*dummy*/)
93   :
94   fClusterCandidates(),
95   fUsedClusterCandidates(),
96   fSelectedPad(kFALSE),
97   fHWAddress(0),
98   fRowNo(-1),
99   fPadNo(-1),
100   fThreshold(0),
101   fAverage(-1),
102   fNofEvents(0),
103   fSum(0),
104   fCount(0),
105   fTotal(0),
106   fBLMax(-1),
107   fBLMaxBin(-1),
108   fBLMin(-1),
109   fBLMinBin(-1),
110   fFirstBLBin(0),
111   fNofBins(0),
112   fReadPos(0),
113   fpRawData(NULL),
114   fDataSignals(NULL),
115   fSignalPositionArray(NULL),
116   fSizeOfSignalPositionArray(0),
117   fNGoodSignalsSent(0),
118   fCandidateDigitsVector()
119 {
120   // see header file for class documentation
121   // or
122   // refer to README to build package
123   // or
124   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
125 }
126
127 AliHLTTPCPad::AliHLTTPCPad(Int_t offset, Int_t nofBins)
128   :
129   fClusterCandidates(),
130   fUsedClusterCandidates(),
131   fSelectedPad(kFALSE),
132   fHWAddress(0),
133   fRowNo(-1),
134   fPadNo(-1),
135   fThreshold(0),
136   fAverage(-1),
137   fNofEvents(0),
138   fSum(0),
139   fCount(0),
140   fTotal(0),
141   fBLMax(-1),
142   fBLMaxBin(-1),
143   fBLMin(-1),
144   fBLMinBin(-1),
145   fFirstBLBin(offset),
146   fNofBins(nofBins),
147   fReadPos(0),
148   fpRawData(NULL),
149   fDataSignals(NULL),
150   fSignalPositionArray(NULL),
151   fSizeOfSignalPositionArray(0),
152   fNGoodSignalsSent(0),
153   fCandidateDigitsVector()
154 {
155   // see header file for class documentation
156 }
157
158 AliHLTTPCPad::~AliHLTTPCPad()
159 {
160   // see header file for class documentation
161   if (fpRawData) {
162     HLTWarning("event data acquisition not stopped");
163     StopEvent();
164   }
165   if (fDataSignals) {
166     delete [] fDataSignals;
167     fDataSignals=NULL;
168   }
169   if (fSignalPositionArray!=NULL) {
170     delete [] fSignalPositionArray;
171     fSignalPositionArray=NULL;
172   }
173 }
174
175 Int_t AliHLTTPCPad::SetID(Int_t rowno, Int_t padno)
176 {
177   // see header file for class documentation
178   fRowNo=rowno;
179   fPadNo=padno;
180
181   return 0;
182 }
183
184 Int_t AliHLTTPCPad::StartEvent()
185 {
186   // see header file for class documentation
187   Int_t iResult=0;
188   if (fpRawData==NULL) {
189     fBLMax=-1;
190     fBLMaxBin=-1;
191     fBLMin=-1;
192     fBLMinBin=-1;
193     fSum=0;
194     fCount=0;
195     fTotal=0;
196     if (fNofBins>0) {
197       fpRawData=new AliHLTTPCSignal_t[fNofBins];
198       if (fpRawData) {
199         for (int i=0; i<fNofBins; i++) fpRawData[i]=-1;
200       } else {
201         HLTError("memory allocation failed");
202         iResult=-ENOMEM;
203       }
204     }
205   } else {
206     HLTWarning("event data acquisition already started");
207     iResult=-EALREADY;
208   }
209   return iResult;
210 }
211
212 Int_t AliHLTTPCPad::CalculateBaseLine(Int_t reqMinCount)
213 {
214   // see header file for class documentation
215   Int_t iResult=0;
216   AliHLTTPCSignal_t avBackup=fAverage;
217   //HLTDebug("reqMinCount=%d fCount=%d fTotal=%d fSum=%d fBLMax=%d fBLMin=%d", reqMinCount, fCount, fTotal, fSum, fBLMax, fBLMin);
218   if (fCount>=reqMinCount && fCount>=fTotal/2) {
219     fAverage=fCount>0?fSum/fCount:0;
220     if (fAverage>0) {
221       //HLTDebug("average for current event %d (%d - %d)", fAverage, fBLMax, fBLMin);
222       fCount=0;fSum=-1;
223       if (fBLMax>ALIHLTPAD_BASELINE_MARGIN) {
224         // calculate again
225         //HLTDebug("maximum value %d exceeds margin for base line (%d) "
226         //       "-> re-evaluate base line", fBLMax, ALIHLTPAD_BASELINE_MARGIN);
227         if (fpRawData) {
228           for (Int_t i=fFirstBLBin; i<fNofBins; i++)
229             if (fpRawData[i]>=0) AddBaseLineValue(i, fpRawData[i]);
230           if (fCount>0 && fCount>=reqMinCount && fCount>=fTotal/2) {
231             fAverage=fSum/fCount;
232             //HLTDebug("new average %d", fAverage);
233           } else {
234             //      HLTDebug("baseline re-eveluation skipped because of to few "
235             //                 "contributing bins: total=%d, contributing=%d, req=%d"
236             //                 "\ndata might be already zero suppressed"
237             //                 , fTotal, fCount, reqMinCount);
238             iResult=-ENODATA;
239           }
240           fCount=0;fSum=-1;
241         } else {
242           HLTError("missing raw data for base line calculation");
243           iResult=-ENOBUFS;
244         }
245       }
246       if (iResult>=0) {
247         // calculate average for all events
248         fAverage=((avBackup*fNofEvents)+fAverage)/(fNofEvents+1);
249         //HLTDebug("base line average for %d event(s): %d", fNofEvents+1, fAverage);
250       } else {
251         fAverage=avBackup;      
252       }
253     } else {
254       fAverage=avBackup;
255     }
256   } else {
257     //     HLTDebug("baseline calculation skipped because of to few contributing "
258     //         "bins: total=%d, contributing=%d, required=%d \ndata might be "
259     //         "already zero suppressed", fTotal, fCount, reqMinCount);
260   }
261
262   return iResult;
263 }
264
265 Int_t AliHLTTPCPad::StopEvent()
266 {
267   // see header file for class documentation
268   Int_t iResult=0;
269   if (fpRawData) {
270     AliHLTTPCSignal_t* pData=fpRawData;
271     fpRawData=NULL;
272     delete [] pData;
273     fTotal=0;
274     fNofEvents++;
275     Rewind();
276   } else if (fNofBins>0) {
277     HLTError("event data acquisition not started");
278     iResult=-EBADF;
279   }
280   return iResult;
281 }
282
283 Int_t AliHLTTPCPad::ResetHistory()
284 {
285   // see header file for class documentation
286   Int_t iResult=0;
287   fAverage=-1;
288   fNofEvents=0;
289   return iResult;
290 }
291
292 Int_t AliHLTTPCPad::SetThreshold(AliHLTTPCSignal_t thresh)
293 {
294   // see header file for class documentation
295   Int_t iResult=0;
296   fThreshold=thresh;
297   return iResult;
298 }
299
300 Int_t AliHLTTPCPad::AddBaseLineValue(Int_t bin, AliHLTTPCSignal_t value)
301 {
302   // see header file for class documentation
303   Int_t iResult=0;
304   if (bin>=fFirstBLBin) {
305     if (fAverage<0 || value<ALIHLTPAD_BASELINE_MARGIN) {
306       // add to the current sum and count
307       fSum+=value;
308       fCount++;
309       if (fBLMax<value) {
310         // keep the maximum value for later quality control of the base 
311         // line calculation
312         fBLMax=value;
313         fBLMaxBin=bin;
314       }
315       if (fBLMin<0 || fBLMin>value) {
316         // keep the minimum value for later quality control of the base 
317         // line calculation
318         fBLMin=value;
319         fBLMinBin=bin;
320       }
321     } else {
322       //       HLTDebug("ignoring value %d (bin %d) for base line calculation "
323       //               "(current average is %d)",
324       //               value, bin, fAverage);
325     }
326   }
327   return iResult;
328 }
329
330 Int_t AliHLTTPCPad::SetRawData(Int_t bin, AliHLTTPCSignal_t value)
331 {
332   // see header file for class documentation
333   //  printf("Row: %d    Pad: %d  Time: %d Charge %d", fRowNo, fPadNo, bin, value);
334   Int_t iResult=0;
335   if (fpRawData) {
336     if (bin<fNofBins) {
337       if (value>=0) {
338         if (fpRawData[bin]<0) {
339           AddBaseLineValue(bin, value);
340           fTotal++;
341         } else {
342           // ignore value for average calculation
343           HLTWarning("overriding content of bin %d (%d)", bin, fpRawData[bin]);
344         }
345         fpRawData[bin]=value;
346       } else {
347         HLTWarning("ignoring neg. raw data");
348       }
349     } else {
350       HLTWarning("bin %d out of range (%d)", bin, fNofBins);
351       iResult=-ERANGE;
352     }
353   } else if (fNofBins>0) {
354     HLTError("event cycle not started");
355     iResult=-EBADF;
356   }
357   return iResult;
358 }
359
360 Int_t AliHLTTPCPad::Next(Int_t bZeroSuppression) 
361 {
362   // see header file for class documentation
363   if (fpRawData==NULL) return 0;
364   Int_t iResult=fReadPos<fNofBins;
365   if (iResult>0 && (iResult=(++fReadPos<fNofBins))>0) {
366     if (bZeroSuppression) {
367       while ((iResult=(fReadPos<fNofBins))>0 &&
368              GetCorrectedData(fReadPos)<=0)
369         fReadPos++;
370     }
371   }
372   return iResult;
373 }
374
375 Int_t AliHLTTPCPad::Rewind(Int_t bZeroSuppression)
376 {
377   // see header file for class documentation
378   fReadPos=(bZeroSuppression>0?0:fFirstBLBin)-1;
379   return Next(bZeroSuppression);
380 }
381
382 AliHLTTPCSignal_t AliHLTTPCPad::GetRawData(Int_t bin) const
383 {
384   // see header file for class documentation
385   AliHLTTPCSignal_t data=0;
386   if (fpRawData) {
387     if (bin<fNofBins) {
388       data=fpRawData[bin];
389     } else {
390       HLTWarning("requested bin %d out of range (%d)", bin, fNofBins);
391     }
392   } else if (fNofBins>0) {
393     HLTWarning("data only available within event cycle");
394   }
395   return data;
396 }
397
398 AliHLTTPCSignal_t AliHLTTPCPad::GetCorrectedData(Int_t bin) const
399 {
400   // see header file for class documentation
401   AliHLTTPCSignal_t data=GetRawData(bin)-GetBaseLine(bin);
402   AliHLTTPCSignal_t prev=0;
403   if (bin>1) prev=GetRawData(bin-1)-GetBaseLine(bin-1);
404   AliHLTTPCSignal_t succ=0;
405   if (bin+1<GetSize()) succ=GetRawData(bin+1)-GetBaseLine(bin+1);
406   if (fThreshold>0) {
407     data-=fThreshold;
408     prev-=fThreshold;
409     succ-=fThreshold;
410   }
411  
412   // case 1:
413   // the signal is below the base-line and threshold
414   if (data<0) data=0;
415
416   //case 2:
417   // the neighboring bins are both below base-line/threshold
418   // a real signal is always more than one bin wide because of the shaper 
419   if (prev<=0 && succ<=0) data=0;
420  
421   // case 3:
422   // the bin is inside the range of ignored bins
423   if (bin<fFirstBLBin) data=0;
424   //HLTDebug("fReadPos=%d data=%d threshold=%d raw data=%d base line=%d", fReadPos, data, fThreshold, GetRawData(bin), GetBaseLine(bin));
425   return data;
426 }
427
428 AliHLTTPCSignal_t AliHLTTPCPad::GetBaseLine(Int_t /*bin*/) const //TODO: Why is bin being ignored?
429 {
430   // see header file for class documentation
431   AliHLTTPCSignal_t val=0;
432   if (fAverage>0) {
433     // we take the minumum value as the base line if it doesn't differ from
434     // the average to much
435     val=fAverage;
436 #ifdef KEEP_NOISE
437     const AliHLTTPCSignal_t kMaxDifference=15;
438     if ((fAverage-fBLMin)<=kMaxDifference) val=fBLMin;
439     else val>kMaxDifference?val-=kMaxDifference:0;
440 #endif
441   }
442   if (val<0) {
443     // here we should never get
444     val=0;
445     HLTFatal("wrong base line value");
446   }
447   return val;
448 }
449
450 AliHLTTPCSignal_t AliHLTTPCPad::GetAverage() const
451 {
452   // see header file for class documentation
453   return fAverage>0?fAverage:0;
454 }
455
456 Float_t AliHLTTPCPad::GetOccupancy() const
457 {
458   // see header file for class documentation
459   Float_t occupancy=0;
460   if (fpRawData && fNofBins>0) {
461     for (Int_t i=fFirstBLBin; i<fNofBins; i++) {
462       if (GetCorrectedData(i)>0) occupancy+=1;
463     }
464     if (fNofBins-fFirstBLBin>0)
465       occupancy/=fNofBins-fFirstBLBin;
466   }
467   return occupancy;
468 }
469
470 Float_t AliHLTTPCPad::GetAveragedOccupancy() const
471 {
472   // see header file for class documentation
473
474   // history is not yet implemented
475   return GetOccupancy();
476 }
477 void AliHLTTPCPad::PrintRawData()
478 {
479   // see header file for class documentation
480   for(Int_t bin=0;bin<AliHLTTPCTransform::GetNTimeBins();bin++){
481     if(GetDataSignal(bin)>0)
482       //This cout should be here since using logging produces output that is much more difficult to read
483         cout<<fRowNo<<"\t"<<fPadNo<<"\t"<<bin<<"\t"<<GetDataSignal(bin)<<endl;
484   }
485 }
486
487 void AliHLTTPCPad::ClearCandidates(){
488   fClusterCandidates.clear();
489   fUsedClusterCandidates.clear();
490   fCandidateDigitsVector.clear();
491 }
492
493 void AliHLTTPCPad::SetDataToDefault()
494 {
495   // see header file for class documentation
496   //  if(fDataSignals && fSignalPositionArray){
497     for(Int_t i =0;i<fSizeOfSignalPositionArray;i++){
498       fDataSignals[fSignalPositionArray[i]]=-1;
499     }
500     fSizeOfSignalPositionArray=0;
501     fNGoodSignalsSent = 0;
502     //  }
503 }
504
505 void AliHLTTPCPad::SetDataSignal(Int_t bin,Int_t signal)
506 {
507   // see header file for class documentation
508   fDataSignals[bin]=signal;
509   fSignalPositionArray[fSizeOfSignalPositionArray]=bin;
510   fSizeOfSignalPositionArray++;
511 }
512
513 Bool_t AliHLTTPCPad::GetNextGoodSignal(Int_t &time,Int_t &bunchSize){
514
515   if(fNGoodSignalsSent<fSizeOfSignalPositionArray&&fSizeOfSignalPositionArray>0){
516     time = fSignalPositionArray[fNGoodSignalsSent];
517     bunchSize=1;
518     fNGoodSignalsSent++;
519     while(fNGoodSignalsSent<fSizeOfSignalPositionArray){
520       if(fDataSignals[time+bunchSize+1]>0){
521         bunchSize++;
522         fNGoodSignalsSent++;
523       }
524       else{
525         break;
526       }
527     }
528     //    fNGoodSignalsSent++;
529    return kTRUE;
530   }
531   return kFALSE;
532 }
533
534 Int_t AliHLTTPCPad::GetDataSignal(Int_t bin) const
535 {
536   // see header file for class documentation
537   return fDataSignals[bin];
538 }
539
540 void AliHLTTPCPad::ZeroSuppress(Double_t nRMS, Int_t threshold, Int_t reqMinPoint, Int_t beginTime, Int_t endTime, Int_t timebinsLeft, Int_t timebinsRight, Int_t valueUnderAverage, bool speedup){
541   //see headerfile for documentation
542  
543   //HLTDebug("In Pad: nRMS=%d, threshold=%d, reqMinPoint=%d, beginTime=%d, endTime=%d, timebinsLeft=%d timebinsRight=%d valueUnderAverage=%d \n",nRMS,threshold,reqMinPoint,beginTime,endTime,timebinsLeft,timebinsRight,valueUnderAverage);
544
545   Bool_t useRMS= kFALSE;
546   if(nRMS>0){
547     useRMS=kTRUE;
548     if(threshold>0){
549       HLTInfo("Both RMSThreshold and SignalThreshold defined, using RMSThreshold");
550     }
551   }
552   if(threshold<1 && nRMS<=0){
553     //setting the data to -1 for this pad
554     HLTInfo("Neither of RMSThreshold and SignalThreshold set, zerosuppression aborted");
555     return;
556   }
557  
558   Int_t fThresholdUsed=threshold;
559
560   Int_t maxVal=0;
561   Int_t nAdded=0;
562   Int_t sumNAdded=0;
563   fSizeOfSignalPositionArray=0;
564   if(useRMS){
565     for(Int_t i=beginTime;i<endTime+1;i++){
566       if(fDataSignals[i]>0){
567         nAdded++;
568         sumNAdded+=fDataSignals[i]*fDataSignals[i];
569         if (maxVal<fDataSignals[i]) maxVal=fDataSignals[i];
570       }
571     }
572   }
573   else if(threshold>0){
574     for(Int_t i=beginTime;i<endTime+1;i++){
575       if(fDataSignals[i]>0){
576         nAdded++;
577         sumNAdded+=fDataSignals[i];
578         if (maxVal<fDataSignals[i]) maxVal=fDataSignals[i];
579       }
580     }
581   }
582   else{
583     HLTFatal("This should never happen because this is tested earlier in the code.(nRMSThreshold<1&&signal-threshold<1)");
584   }
585   if(nAdded<reqMinPoint){
586     HLTInfo("Number of signals is less than required, zero suppression aborted");
587     return;
588   }
589  
590   if(nAdded==0){
591     HLTInfo("No signals added for this pad, zerosuppression aborted: pad %d row %d",fPadNo,fRowNo);
592     return;
593   }
594
595   Double_t averageValue=(Double_t)sumNAdded/nAdded;//true average for threshold approach, average of signals squared for rms approach
596  
597   if(useRMS){
598     //Calculate the RMS
599     if(averageValue>0){
600       fThresholdUsed =(Int_t)(TMath::Sqrt(averageValue)*nRMS);
601     }
602     else{
603       HLTFatal("average value in ZeroSuppression less than 0, investigation needed. This should never happen");
604     }
605   }
606   else{
607     fThresholdUsed = (Int_t)(averageValue + threshold); 
608   }
609   if (maxVal<fThresholdUsed) return;
610
611   // Do zero suppression on the adc values within [beginTime,endTime](add the good values)
612   for(Int_t i=beginTime;i<endTime;i++){
613     if(fDataSignals[i]>fThresholdUsed){
614       Int_t firstSignalTime=i;
615       for(Int_t left=1;left<timebinsLeft;left++){//looking 5 to the left of the signal to add tail
616         if(fDataSignals[i-left]-averageValue+valueUnderAverage>0 && i-left>=beginTime){
617           firstSignalTime--;
618         }
619         else{
620           break;
621         }
622       }
623       Int_t lastSignalTime=i;
624       while(fDataSignals[lastSignalTime+1]>fThresholdUsed && lastSignalTime+1<endTime){
625         lastSignalTime++;
626       }
627       for(Int_t right=1;right<timebinsRight;right++){//looking 5 to the left of the signal to add tail
628         if(fDataSignals[i+right]-averageValue+valueUnderAverage>0&&i+right<endTime){
629           lastSignalTime++;
630         }
631         else{
632           break;
633         }       
634       }
635       
636       for(Int_t t=firstSignalTime;t<lastSignalTime;t++){
637         fDataSignals[t]=(AliHLTTPCSignal_t)(fDataSignals[t]-averageValue + valueUnderAverage);
638         fSignalPositionArray[fSizeOfSignalPositionArray]=t;
639         fSizeOfSignalPositionArray++;
640         // Matthias Oct 10 2008: trying hard to make the code faster for the
641         // AltroChannelSelection. For that we only need to know there is data
642         if (speedup) return;
643       }
644       i+=lastSignalTime;
645     }
646   }
647   //reset the rest of the data
648   Int_t counterSize=fSizeOfSignalPositionArray;
649
650   for(Int_t d=endTime;d>=beginTime;d--){
651     if(d==fSignalPositionArray[counterSize-1]&&counterSize-1>=0){
652       counterSize--;
653     }
654     else{
655       fDataSignals[d]=-1;
656     }
657   }
658   if(fDataSignals[beginTime+1]<1){
659     fDataSignals[beginTime]=0;
660   }
661 }
662
663 void AliHLTTPCPad::AddClusterCandidate(AliHLTTPCClusters candidate){
664   fClusterCandidates.push_back(candidate);
665   fUsedClusterCandidates.push_back(0);
666 }
667
668 void AliHLTTPCPad::AddCandidateDigits(vector<AliHLTTPCDigitData> candidateDigits){
669   fCandidateDigitsVector.push_back(candidateDigits); 
670 }
671
672 vector<AliHLTTPCDigitData> AliHLTTPCPad::GetCandidateDigits(Int_t candidateIndex){
673   return fCandidateDigitsVector.at(candidateIndex);
674 }