<commit_before>AliAnalysisTaskSEPHOSpPbPi0* AddTaskPHOSpPbPi0(Bool_t isMCtruth=kFALSE, UInt_t triggerMask = AliVEvent::kMB, Bool_t isBadMap=kFALSE)
{
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    ::Error("AddTaskPHOSpPbPi0", "No analysis manager to connect to.");
    return NULL;
  }
  TString type = mgr->GetInputEventHandler()->GetDataType();
  if (!type.Contains("ESD") && !type.Contains("AOD")) {
    ::Error("AddTaskPHOSpPbPi0", "PHOSpPbPi0 task needs the manager to have an ESD or AOD input handler.");
    return NULL;
  }
  if (isMCtruth && type.Contains("ESD")) {
    AliMCEventHandler *mcH = mgr->GetMCtruthEventHandler();
    if (!mcH) {
      ::Error("AddTaskPHOSpPbPi0", "PHOSpPbPi0 task needs the manager to have an MC evnet handler.");
      return NULL;
    }
  }

  const Int_t nBins = 6;
  Double_t cBin[nBins+1] = {0., 20., 40., 60., 80., 90., 100.}; TArrayD tCent(nBins+1, cBin);
  Int_t    buffer[nBins] = { 40,  80,  80,  100,  100,  100  }; TArrayI tBuffer(nBins, buffer);

  AliAnalysisTaskSEPHOSpPbPi0 *task = new AliAnalysisTaskSEPHOSpPbPi0("TaskPHOSpPbPi0");
  task->SetUseMC(isMCtruth);
  task->SetXBins(tCent, tBuffer);
  task->SetLogWeight(0.07);
  task->SetMinNCells(2);
  task->SetMinClusterEnergy(0.3);
  task->SetMinM02(0.2);
  task->SetMinDistToBad(2.5);
  task->SetDebugLevel(-1);

  // Bad maps for PHOS
  if (isBadMap) {
    AliOADBContainer badmapContainer("phosBadMap");
    badmapContainer.InitFromFile("$ALICE_ROOT/OADB/PHOS/PHOSBadMaps.root","phosBadMap");
    TObjArray *maps = (TObjArray*)badmapContainer.GetObject(144871,"phosBadMap"); //run number LHC11a
<commit_msg>updated AddTask for Hongsheng Zhu<commit_after>AliAnalysisTaskSEPHOSpPbPi0* AddTaskPHOSpPbPi0(Bool_t isMCtruth=kFALSE, UInt_t triggerMask = AliVEvent::kMB, Bool_t isBadMap=kFALSE)
{
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    ::Error("AddTaskPHOSpPbPi0", "No analysis manager to connect to.");
    return NULL;
  }
  TString type = mgr->GetInputEventHandler()->GetDataType();
  if (!type.Contains("ESD") && !type.Contains("AOD")) {
    ::Error("AddTaskPHOSpPbPi0", "PHOSpPbPi0 task needs the manager to have an ESD or AOD input handler.");
    return NULL;
  }
  if (isMCtruth && type.Contains("ESD")) {
    AliMCEventHandler *mcH = mgr->GetMCtruthEventHandler();
    if (!mcH) {
      ::Error("AddTaskPHOSpPbPi0", "PHOSpPbPi0 task needs the manager to have an MC evnet handler.");
      return NULL;
    }
  }

  const Int_t nBins = 6;
  Double_t cBin[nBins+1] = {0., 20., 40., 60., 80., 90., 100.}; TArrayD tCent(nBins+1, cBin);
  Int_t    buffer[nBins] = { 40,  80,  80,  100,  100,  100  }; TArrayI tBuffer(nBins, buffer);

  AliAnalysisTaskSEPHOSpPbPi0 *task = new AliAnalysisTaskSEPHOSpPbPi0("TaskPHOSpPbPi0");
  task->SetUseMC(isMCtruth);
  task->SetXBins(tCent, tBuffer);
  task->SetLogWeight(0.06);
  task->SetMinNCells(2);
  task->SetMinClusterEnergy(0.3);
  task->SetMinM02(0.2);
  task->SetMinDistToBad(2.5);
  task->SetDebugLevel(-1);

  // Bad maps for PHOS
  if (isBadMap) {
    AliOADBContainer badmapContainer("phosBadMap");
    badmapContainer.InitFromFile("$ALICE_ROOT/OADB/PHOS/PHOSBadMaps.root","phosBadMap");
    TObjArray *maps = (TObjArray*)badmapContainer.GetObject(144871,"phosBadMap"); //run number LHC11a

{'fraction_non_alphanumeric': 0.14757048590281943, 'fraction_numerical': 0.03779244151169766, 'mean_word_length': 4.66213921901528, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1365639', 'n_tokens_mistral': 1361, 'n_tokens_neox': 1271, 'n_words': 246}