message: plot cell spectra only for accepted clusters
diff: @@ -1709,9 +1709,15 @@ void AliAnalysisTaskEmcalDijetImbalance::FillCaloHistograms()
  // Plot cluster THnSparse (centrality, cluster type, E, E-hadcorr, has matched track, M02, Ncells)
  + // Get cells from event
  + fCaloCells = InputEvent()->GetEMCALCells();
  + AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
  +
  TString histname;
  Double_t Enonlin;
  Double_t Ehadcorr;
  + Int_t absId;
  + Double_t ecell;
  AliClusterContainer* clusters = 0;
  TIter nextClusColl(&fClusterCollArray);
  while ((clusters = static_cast<AliClusterContainer*>(nextClusColl()))) {
  @@ -1769,6 +1775,14 @@ void AliAnalysisTaskEmcalDijetImbalance::FillCaloHistograms()
  AliError(Form("Supermodule %d does not exist!", sm));
  }
  + // Get cells from each accepted cluster, and plot centrality vs. cell energy vs. cell type
  + histname = TString::Format("Cells/hCellEnergy");
  + for (Int_t iCell = 0; iCell < it->second->GetNCells(); iCell++){
  + absId = it->second->GetCellAbsId(iCell);
  + ecell = fCaloCells->GetCellAmplitude(absId);
  + fHistManager.FillTH3(histname, ecell, fCent, kEMCal); // Note: I don't distinguish EMCal from DCal cells
  + }
  +
  } else if (it->second->GetType() == AliVCluster::kPHOSNeutral){
  Ehadcorr = it->second->E();
  @@ -1786,6 +1800,14 @@ void AliAnalysisTaskEmcalDijetImbalance::FillCaloHistograms()
  AliError(Form("Supermodule %d does not exist!", sm));
  }
  }
  +
  + // Get cells from each accepted cluster, and plot centrality vs. cell energy vs. cell type
  + histname = TString::Format("Cells/hCellEnergy");
  + for (Int_t iCell = 0; iCell < it->second->GetNCells(); iCell++){
  + absId = it->second->GetCellAbsId(iCell);
  + ecell = phosCaloCells->GetCellAmplitude(absId);
  + fHistManager.FillTH3(histname, ecell, fCent, kPHOS);
  + }
  }
  // Check if the cluster has a matched track
  @@ -1858,28 +1880,5 @@ void AliAnalysisTaskEmcalDijetImbalance::FillCaloHistograms()
  }
  - // Get the cells from the event, and plot centrality vs. emcal cell energy vs. cell type
  - histname = TString::Format("Cells/hCellEnergy");
  -
  - fCaloCells = InputEvent()->GetEMCALCells();
  - AliVCaloCells* phosCaloCells = InputEvent()->GetPHOSCells();
  -
  - Short_t absId = -1;
  - Double_t ecell = 0;
  - Double_t ecellPhos = 0;
  - Double_t tcell = 0;
  - Double_t efrac = 0;
  - Int_t mclabel = -1;
  -
  - for (Int_t iCell = 0; iCell < fCaloCells->GetNumberOfCells(); iCell++){
  - fCaloCells->GetCell(iCell, absId, ecell, tcell, mclabel, efrac);
  - fHistManager.FillTH3(histname, ecell, fCent, kEMCal); // note: I don't distinguish EMCal from DCal for cells
  - }
  -
  - for (Int_t iCellPhos = 0; iCellPhos < phosCaloCells->GetNumberOfCells(); iCellPhos++){
  - phosCaloCells->GetCell(iCellPhos, absId, ecellPhos, tcell, mclabel, efrac);
  - fHistManager.FillTH3(histname, ecellPhos, fCent, kPHOS);
  - }
  -
  }
  