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