return fDataSignals[bin];
}
-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){
+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){
//see headerfile for documentation
//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);
}
Int_t fThresholdUsed=threshold;
-
+
+ Int_t maxVal=0;
Int_t nAdded=0;
Int_t sumNAdded=0;
fSizeOfSignalPositionArray=0;
if(fDataSignals[i]>0){
nAdded++;
sumNAdded+=fDataSignals[i]*fDataSignals[i];
+ if (maxVal<fDataSignals[i]) maxVal=fDataSignals[i];
}
}
}
if(fDataSignals[i]>0){
nAdded++;
sumNAdded+=fDataSignals[i];
+ if (maxVal<fDataSignals[i]) maxVal=fDataSignals[i];
}
}
}
else{
fThresholdUsed = (Int_t)(averageValue + threshold);
}
+ if (maxVal<fThresholdUsed) return;
// Do zero suppression on the adc values within [beginTime,endTime](add the good values)
for(Int_t i=beginTime;i<endTime;i++){
fDataSignals[t]=(AliHLTTPCSignal_t)(fDataSignals[t]-averageValue + valueUnderAverage);
fSignalPositionArray[fSizeOfSignalPositionArray]=t;
fSizeOfSignalPositionArray++;
+ // Matthias Oct 10 2008: trying hard to make the code faster for the
+ // AltroChannelSelection. For that we only need to know there is data
+ if (speedup) return;
}
i+=lastSignalTime;
}
* @param timebinsRight Timebins to include right of the signals above threshold (to include tails)
* @param valueBelowAverage The number of adc-counts below the average value. (sometimes there can be useful to also add some signals below average for your signals, especially when there is a lot of noise) It means that more of the tails of the signal is added.
*/
- void ZeroSuppress(Double_t nRMS,Int_t threshold,Int_t reqMinPoint,Int_t beginTime,Int_t endTime,Int_t timebinsLeft, Int_t timebinsRight, Int_t valueBelowAverage);
+ void ZeroSuppress(Double_t nRMS,Int_t threshold,Int_t reqMinPoint,Int_t beginTime,Int_t endTime,Int_t timebinsLeft, Int_t timebinsRight, Int_t valueBelowAverage, bool speedup=false);
/**
* Bool method which returns the timein number of the first signal and number of consecutive signals, used together with GetPointer(bin) to access data
AliHLTTPCPad *tmpPad = fRowPadVector[row][pad];
tmpPad->SetDataToDefault();
-
+
//reading data to pad
while(fDigitReader->NextBunch()){
const UInt_t *bunchData= fDigitReader->GetSignals();
sumOccupancy+=tmpPad->GetNAddedSignals();
if(tmpPad->GetNAddedSignals()>=(UInt_t)fMinimumNumberOfSignals){
- tmpPad->ZeroSuppress(fNRMSThreshold, fSignalThreshold, fMinimumNumberOfSignals, fStartTimeBin, fEndTimeBin, fLeftTimeBin, fRightTimeBin, fValueBelowAverage);
+ tmpPad->ZeroSuppress(fNRMSThreshold, fSignalThreshold, fMinimumNumberOfSignals, fStartTimeBin, fEndTimeBin, fLeftTimeBin, fRightTimeBin, fValueBelowAverage, fSkipSendingZSData);
if(tmpPad->GetNAddedSignals()>0){
assert((int)mapping.GetRow(fDigitReader->GetAltroBlockHWaddr())==row);
assert((int)mapping.GetPad(fDigitReader->GetAltroBlockHWaddr())==pad);