Calculate distance to bad channel in any case
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 12 Feb 2012 10:54:55 +0000 (10:54 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 12 Feb 2012 10:54:55 +0000 (10:54 +0000)
PWGGA/EMCALTasks/AliAnalysisTaskEMCALClusterize.cxx

index 2046bb2..4f12b4e 100644 (file)
@@ -1121,10 +1121,9 @@ void AliAnalysisTaskEMCALClusterize::UserExec(Option_t *)
     //for(Int_t icell=0; icell < newCluster->GetNCells(); icell++ ) printf(" %d,", newCluster->GetCellsAbsId() [icell] );
     //printf("\n");
 
-    //In case of new bad channels, recalculate distance to bad channels
-    if(fRecoUtils->IsBadChannelsRemovalSwitchedOn())
-      fRecoUtils->RecalculateClusterDistanceToBadChannel(fGeom, fEvent->GetEMCALCells(), newCluster);
-
+    // Calculate distance to bad channel for new cluster. Make sure you give the list of bad channels.
+    fRecoUtils->RecalculateClusterDistanceToBadChannel(fGeom, fEvent->GetEMCALCells(), newCluster);
+    
     new((*fOutputAODBranch)[i])  AliAODCaloCluster(*newCluster);
         
     if(DebugLevel() > 1 )