- 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
-
- accept1 = AcceptCalibrateCell(absID1,bc, ecell1,tcell1,cells);
- accept2 = AcceptCalibrateCell(absID2,bc, ecell2,tcell2,cells);
- accept3 = AcceptCalibrateCell(absID3,bc, ecell3,tcell3,cells);
- accept4 = AcceptCalibrateCell(absID4,bc, ecell4,tcell4,cells);
-
- /*
- printf("Cell absID %d \n",absID);
- printf("\t accept1 %d, accept2 %d, accept3 %d, accept4 %d\n",
- accept1,accept2,accept3,accept4);
- printf("\t id %d: id1 %d, id2 %d, id3 %d, id4 %d\n",
- absID,absID1,absID2,absID3,absID4);
- printf("\t e %f: e1 %f, e2 %f, e3 %f, e4 %f\n",
- ecell,ecell1,ecell2,ecell3,ecell4);
- printf("\t t %f: t1 %f, t2 %f, t3 %f, t4 %f;\n dt1 %f, dt2 %f, dt3 %f, dt4 %f\n",
- tcell*1.e9,tcell1*1.e9,tcell2*1.e9,tcell3*1.e9,tcell4*1.e9,
- TMath::Abs(tcell-tcell1)*1.e9, TMath::Abs(tcell-tcell2)*1.e9, TMath::Abs(tcell-tcell3)*1.e9, TMath::Abs(tcell-tcell4)*1.e9);
- */
-
- 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 ;
-
- Float_t eCross = ecell1+ecell2+ecell3+ecell4;
-
- //printf("\t eCell %f, eCross %f, 1-eCross/eCell %f\n",ecell,eCross,1-eCross/ecell);
-
- if(1-eCross/ecell > fExoticCellFraction)
- {
+ 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) {