message: PWG/EMCAL/EMCALtasks -- Adapting AliEmcalFastOrMonitorTask.cxx to instead use 1D bad channel maps
diff: @@ -66,7 +66,7 @@ AliEmcalFastOrMonitorTask::AliEmcalFastOrMonitorTask() :
  fMinCellTimeNS(-1e9),
  fMaxCellTimeNS(1e9),
  fNameMaskedFastorOADB(),
  - fNameMaskedCellOADB(AliDataFile::GetFileNameOADB("EMCAL/EMCALBadChannels.root").data()),
  + fNameMaskedCellOADB(AliDataFile::GetFileNameOADB("EMCAL/EMCALBadChannels_1D.root").data()),
  fMaskedFastorOADB(nullptr),
  fMaskedCellOADB(nullptr),
  fRecoUtils(nullptr)
  @@ -85,7 +85,7 @@ AliEmcalFastOrMonitorTask::AliEmcalFastOrMonitorTask(const char *name) :
  fMinCellTimeNS(-1e9),
  fMaxCellTimeNS(1e9),
  fNameMaskedFastorOADB(),
  - fNameMaskedCellOADB(AliDataFile::GetFileNameOADB("EMCAL/EMCALBadChannels.root").data()),
  + fNameMaskedCellOADB(AliDataFile::GetFileNameOADB("EMCAL/EMCALBadChannels_1D.root").data()),
  fMaskedFastorOADB(nullptr),
  fMaskedCellOADB(nullptr),
  fRecoUtils(nullptr)
  @@ -196,12 +196,11 @@ void AliEmcalFastOrMonitorTask::RunChanged(Int_t newrun){
  // Load masked cell data
  if(fMaskedCellOADB){
  AliInfoStream() << "Loading masked cells for run " << newrun << std::endl;
  - fRecoUtils->SetEMCALChannelStatusMap(static_cast<TObjArray *>(fMaskedCellOADB->GetObject(newrun)));
  - Int_t smod, mod, phimod, etamod, row, col, cellstatus;
  + TObjArray *maskedcells = static_cast<TObjArray *>(fMaskedCellOADB->GetObject(newrun));
  + fRecoUtils->SetEMCALChannelStatusMap1D(static_cast<TH1C*>(maskedcells->FindObject("EMCALBadChannelMap")));
  + Int_t cellstatus;
  for(int icell = 0; icell < fGeom->GetNCells(); icell++) {
  - fGeom->GetCellIndex(icell, smod, mod, phimod, etamod);
  - fGeom->GetCellPhiEtaIndexInSModule(smod, mod, phimod, etamod, row, col);
  - auto masked = fRecoUtils->GetEMCALChannelStatus(smod, col, row, cellstatus);
  + auto masked = fRecoUtils->GetEMCALChannelStatus1D(icell, cellstatus);
  if(masked) fHistosQA->FillTH1("hMaskedCells", icell);
  }
  }
  @@ -323,8 +322,6 @@ Double_t AliEmcalFastOrMonitorTask::GetTransverseTimeSum(Int_t fastorAbsID, Doub
  bool AliEmcalFastOrMonitorTask::IsCellMasked(int absCellID) const {
  if(!fRecoUtils) return false; // In case bad cells are not initialized declare cell as good
  - Int_t smcell, modcell, colcell, rowcell, colcellsm, rowcellsm, channelstatus;
  - fGeom->GetCellIndex(absCellID, smcell, modcell, rowcell, colcell);
  - fGeom->GetCellPhiEtaIndexInSModule(smcell, modcell, rowcell, colcell, rowcellsm, colcellsm);
  - return fRecoUtils->GetEMCALChannelStatus(smcell, colcellsm, rowcellsm, channelstatus);
  + Int_t channelstatus;
  + return fRecoUtils->GetEMCALChannelStatus1D(absCellID, channelstatus);
  }
  