Added functionality in AliPHOSTRURawReader to test if data 'Has Signal'
authorpolicheh <policheh@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 29 Jun 2012 13:12:19 +0000 (13:12 +0000)
committerpolicheh <policheh@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 29 Jun 2012 13:12:19 +0000 (13:12 +0000)
(FakeALTRO).

PHOS/AliPHOSTriggerRawDigiProducer.cxx

index 2c7ed9c..bb50f29 100644 (file)
@@ -104,7 +104,7 @@ void AliPHOSTriggerRawDigiProducer::ProcessEvent(TClonesArray* tdigits)
                  }
                }// end TimeBin loop
                
-               if( triggered ){
+               if( triggered && truReader->HasSignal() ){
                  // Get peak values
                  const int TSmax = Get4x4Max(fTriggerReader, fParameters, mod, TRURow, branch, xIdx, zIdx);
                  new((*tdigits)[iDigit]) AliPHOSTriggerRawDigit(mod,xIdx,zIdx,TRURow,branch,TSmax); 
@@ -141,7 +141,8 @@ int AliPHOSTriggerRawDigiProducer::Get2x2Signal(AliPHOSTriggerRawReader* reader,
   const int TRUX = xIdx % kN2x2XPrTRURow; // 2x2 coordinates
   const int TRUZ = zIdx % kN2x2ZPrBranch; // 2x2 coordinates
 
-  if( reader->GetTRU(mod, TRURow, branch)->IsActive() ){
+  AliPHOSTRURawReader* truReader = reader->GetTRU(mod, TRURow, branch);
+  if( truReader->IsActive(timeBin) && truReader->HasSignal(timeBin)  ){
     const int signal = reader->GetTRU(mod, TRURow, branch)->GetTriggerSignal( TRUX, TRUZ, timeBin);
     if( parameters )
       return signal - parameters->GetTRUPedestal(mod, TRURow, branch, TRUX, TRUZ);