+ Int_t absID3 = -1;
+ Int_t absID4 = -1;
+
+ if ( ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2) ) {
+ absID3 = geom-> GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
+ absID4 = geom-> GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
+ } else if ( ieta == 0 && imod%2 ) {
+ absID3 = geom-> GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
+ absID4 = geom-> GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
+ } else {
+ if ( ieta < AliEMCALGeoParams::fgkEMCALCols-1 )
+ absID3 = geom-> GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
+ if ( ieta > 0 )
+ absID4 = geom-> GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
+ }
+
+ //printf("IMOD %d, AbsId %d, a %d, b %d, c %d e %d \n",imod,absID,absID1,absID2,absID3,absID4);
+
+ Float_t ecell1 = 0, ecell2 = 0, ecell3 = 0, ecell4 = 0;
+ Double_t tcell1 = 0, tcell2 = 0, tcell3 = 0, tcell4 = 0;
+
+ AcceptCalibrateCell(absID1,bc, ecell1,tcell1,cells);
+ AcceptCalibrateCell(absID2,bc, ecell2,tcell2,cells);
+ AcceptCalibrateCell(absID3,bc, ecell3,tcell3,cells);
+ AcceptCalibrateCell(absID4,bc, ecell4,tcell4,cells);
+
+ if (TMath::Abs(tcell-tcell1)*1.e9 > fExoticCellDiffTime) ecell1 = 0 ;
+ if (TMath::Abs(tcell-tcell2)*1.e9 > fExoticCellDiffTime) ecell2 = 0 ;
+ if (TMath::Abs(tcell-tcell3)*1.e9 > fExoticCellDiffTime) ecell3 = 0 ;
+ if (TMath::Abs(tcell-tcell4)*1.e9 > fExoticCellDiffTime) ecell4 = 0 ;
+
+ return ecell1+ecell2+ecell3+ecell4;
+}
+
+//_____________________________________________________________________________________________
+Bool_t AliEMCALRecoUtils::IsExoticCell(Int_t absID, AliVCaloCells* cells, Int_t bc)
+{
+ // Look to cell neighbourhood and reject if it seems exotic
+ // Do before recalibrating the cells
+
+ if (!fRejectExoticCells) return kFALSE;
+
+ Float_t ecell = 0;
+ Double_t tcell = 0;
+ Bool_t accept = AcceptCalibrateCell(absID, bc, ecell ,tcell ,cells);
+
+ if (!accept) return kTRUE; // reject this cell
+
+ if (ecell < fExoticCellMinAmplitude) return kFALSE; // do not reject low energy cells
+
+ Float_t eCross = GetECross(absID,tcell,cells,bc);
+
+ if (1-eCross/ecell > fExoticCellFraction) {
+ AliDebug(2,Form("AliEMCALRecoUtils::IsExoticCell() - EXOTIC CELL id %d, eCell %f, eCross %f, 1-eCross/eCell %f\n",
+ absID,ecell,eCross,1-eCross/ecell));
+ return kTRUE;
+ }
+
+ return kFALSE;
+}
+
+//___________________________________________________________________
+Bool_t AliEMCALRecoUtils::IsExoticCluster(const AliVCluster *cluster,
+ AliVCaloCells *cells,
+ Int_t bc)
+{
+ // Check if the cluster highest energy tower is exotic
+
+ if (!cluster) {