- Float_t fCalGainFactorROCValue = fCalGainFactorROC->GetValue(iCol,iRow);
- Double_t gain = fCalGainFactorDetValue
- * fCalGainFactorROCValue;
-
- Bool_t corrupted = kFALSE;
- for (iTime = 0; iTime < fTimeTotal; iTime++)
- {
- // Apply gain gain factor
- inADC[iTime] = fDigits->GetData(iRow,iCol,iTime);
- if (fCalPadStatusROC->GetStatus(iCol, iRow)) corrupted = kTRUE;
- inADC[iTime] /= gain;
- outADC[iTime] = inADC[iTime];
- if(fReconstructor->GetRecoParam()->GetStreamLevel(AliTRDrecoParam::kClusterizer) > 7 && fReconstructor->IsDebugStreaming()){
- (*fDebugStream) << "TailCancellation"
- << "col=" << iCol
- << "row=" << iRow
- << "time=" << iTime
- << "inADC=" << inADC[iTime]
- << "gain=" << gain
- << "outADC=" << outADC[iTime]
- << "corrupted=" << corrupted
- << "\n";
- }
- }
- if (!corrupted)
- {
- // Apply the tail cancelation via the digital filter
- // (only for non-coorupted pads)
- DeConvExp(&inADC[0],&outADC[0],fTimeTotal,fReconstructor->GetRecoParam() ->GetTCnexp());
- }
-
- for(iTime = 0; iTime < fTimeTotal; iTime++)//while (fIndexes->NextTbinIndex(iTime))
- {
- // Store the amplitude of the digit if above threshold
- if (outADC[iTime] > 0)
- fDigits->SetData(iRow,iCol,iTime,TMath::Nint(outADC[iTime]));
- else
- fDigits->SetData(iRow,iCol,iTime,0);
- } // while itime
-
+ // if corrupted then don't make the tail cancallation
+ if (fCalPadStatusROC->GetStatus(iCol, iRow)) continue;
+
+ if(debugStreaming){
+ for (iTime = 0; iTime < fTimeTotal; iTime++)
+ (*fDebugStream) << "TailCancellation"
+ << "col=" << iCol
+ << "row=" << iRow
+ << "\n";
+ }
+
+ // Apply the tail cancelation via the digital filter
+ DeConvExp(fDigits->GetDataAddress(iRow,iCol),fTimeTotal,nexp);
+