From 6fe0e6d020b242b21ffb09e922423512bd04451d Mon Sep 17 00:00:00 2001 From: gconesab Date: Sat, 13 Nov 2010 11:12:35 +0000 Subject: [PATCH] Add method to set the bad channel matrix --- EMCAL/AliEMCALRecoUtils.cxx | 8 ++++---- EMCAL/AliEMCALRecoUtils.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/EMCAL/AliEMCALRecoUtils.cxx b/EMCAL/AliEMCALRecoUtils.cxx index 180a9d09fea..3ffd81e4f3f 100644 --- a/EMCAL/AliEMCALRecoUtils.cxx +++ b/EMCAL/AliEMCALRecoUtils.cxx @@ -501,7 +501,7 @@ void AliEMCALRecoUtils::InitEMCALBadChannelStatusMap(){ fEMCALBadChannelMap = new TObjArray(10); //TH2F * hTemp = new TH2I("EMCALBadChannelMap","EMCAL SuperModule bad channel map", 48, 0, 48, 24, 0, 24); - for (int i = 0; i < 12; i++) { + for (int i = 0; i < 10; i++) { fEMCALBadChannelMap->Add(new TH2I(Form("EMCALBadChannelMap_Mod%d",i),Form("EMCALBadChannelMap_Mod%d",i), 48, 0, 48, 24, 0, 24)); } @@ -732,7 +732,7 @@ void AliEMCALRecoUtils::RecalculateClusterDistanceToBadChannel(AliEMCALGeometry //Check if tower is bad. if(hMap->GetBinContent(icol,irow)==0) continue; //printf("AliEMCALRecoUtils::RecalculateDistanceToBadChannels() - \n \t Bad channel in SM %d, col %d, row %d, \n \t Cluster max in col %d, row %d\n", - // iSupMod,icol, irow, icolM,irowM); + // iSupMod,icol, irow, icolM,irowM); dRrow=TMath::Abs(irowM-irow); dRcol=TMath::Abs(icolM-icol); @@ -780,8 +780,8 @@ void AliEMCALRecoUtils::RecalculateClusterDistanceToBadChannel(AliEMCALGeometry }// shared cluster in 2 SuperModules - AliDebug(2,Form("AliEMCALRecoUtils::RecalculateDistanceToBadChannels() - Max cluster cell (SM,col,row)=(%d %d %d) - Distance to Bad Channel %2.2f\n",iSupMod, icolM, irowM, minDist)); - cluster->SetDistanceToBadChannel(minDist); + AliDebug(2,Form("Max cluster cell (SM,col,row)=(%d %d %d) - Distance to Bad Channel %2.2f",iSupMod, icolM, irowM, minDist)); + cluster->SetDistanceToBadChannel(minDist); } diff --git a/EMCAL/AliEMCALRecoUtils.h b/EMCAL/AliEMCALRecoUtils.h index 321a2dcc541..e848da08afd 100644 --- a/EMCAL/AliEMCALRecoUtils.h +++ b/EMCAL/AliEMCALRecoUtils.h @@ -158,7 +158,8 @@ public: TH2I * GetEMCALChannelStatusMap(Int_t iSM) const {return (TH2I*)fEMCALBadChannelMap->At(iSM);} void SetEMCALChannelStatusMap(TObjArray *map) {fEMCALBadChannelMap = map;} - + void SetEMCALChannelStatusMap(Int_t iSM , TH2I* h) {fEMCALBadChannelMap->AddAt(h,iSM);} + Bool_t ClusterContainsBadChannel(AliEMCALGeometry* geom, UShort_t* cellList, Int_t nCells); //Recalculate other cluster parameters -- 2.39.3