<commit_before>AliAnalysisTaskPi0Flow* AddTaskPHOSPi0pPb (const char* name = "PHOSPi0pPb",
					    const char* options = "",
					   UInt_t offlineTriggerMask = AliVEvent::kINT7 )
{
  //Add a task AliAnalysisTaskPi0Flow to the analysis train, for LHC13 PbP data
  //Author: <NAME>
  /* $Id$ */

  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    ::Error("AddTaskPHOSPi0pPb", "No analysis manager to connect to");
    return NULL;
  }
  
  if (!mgr->GetInputEventHandler()) {
    ::Error("AddTaskPHOSPi0pPb", "This task requires an input event handler");
    return NULL;
  }

  AliAnalysisTaskPi0Flow* task = new AliAnalysisTaskPi0Flow(Form("%sTask", name));

  // MB or PHOS Trigger:
  if( AliVEvent::kINT7 == offlineTriggerMask || AliVEvent::kPHI7 == offlineTriggerMask ) {
    const int nbins = 5;
    Double_t cbin[nbins+1] = {0., 20., 40., 60., 80., 100.};
    TArrayD tbin(nbins+1, cbin);
    Int_t    nMixed[nbins] = {40, 40, 40, 40, 40};
    TArrayI tNMixed(nbins, nMixed);
    task->SetCentralityBinning(tbin, tNMixed);
  }
  if( TString(options).Contains("LHC13") )
    task->SetPeriod( AliAnalysisTaskPi0Flow::kLHC13 );


  task->SetEventMixingRPBinning(1);
  task->SelectCollisionCandidates(offlineTriggerMask);
  task->SetEnablePHOSModule(2, kFALSE);
  task->EnableTOFCut(true, 100.e-9, true);

  mgr->AddTask(task);
  mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() );
  
  TString cname(Form("%sCoutput1", name));
  TString pname(Form("%s:%s", AliAnalysisManager::GetCommonFileName(), name));
  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(cname.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, pname.Data());
  mgr->ConnectOutput(task, 1, coutput1);
  
  return task;
}
<commit_msg> AddTaskPHOSPi0pPb.C is reworked to provide flexibility to set centrality classes<commit_after>AliAnalysisTaskPi0Flow* AddTaskPHOSPi0pPb (const char* name = "PHOSPi0pPb",
					   const char* options = "LHC13",
					   const UInt_t offlineTriggerMask = AliVEvent::kINT7,
					   const char* centrality = "V0M",
					   const Int_t nCentBins = 5,
					   const Int_t centEdge0 = 0,
					   const Int_t centEdge1 = 20,
					   const Int_t centEdge2 = 40,
					   const Int_t centEdge3 = 60,
					   const Int_t centEdge4 = 80,
					   const Int_t centEdge4 = 100)
{
  //Add a task AliAnalysisTaskPi0Flow to the analysis train, for LHC13 PbP data
  //Author: <NAME>
  /* $Id$ */

  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    ::Error("AddTaskPHOSPi0pPb", "No analysis manager to connect to");
    return NULL;
  }
  
  if (!mgr->GetInputEventHandler()) {
    ::Error("AddTaskPHOSPi0pPb", "This task requires an input event handler");
    return NULL;
  }

  AliAnalysisTaskPi0Flow* task = new AliAnalysisTaskPi0Flow(Form("%sTask", name));

  // MB or PHOS Trigger:
  if( AliVEvent::kINT7 == offlineTriggerMask || AliVEvent::kPHI7 == offlineTriggerMask ) {
    if (nCentBins<1) {
      ::Error("AddTaskPHOSPi0pPb", Form("Invalid number of centrality bins: %d",nCentBins));
      return NULL;
    }
    Double_t *cbin = new Double_t[nCentBins+1];
    cbin[0] = centEdge0;
    cbin[1] = centEdge1;
    if (nCentBins > 1) cbin[2] = centEdge2;
    if (nCentBins > 2) cbin[3] = centEdge3;
    if (nCentBins > 3) cbin[4] = centEdge4;
    if (nCentBins > 4) cbin[5] = centEdge5;
    TArrayD tbin(nCentBins+1, cbin);

    Int_t    *nMixed = new Int_t[nCentBins];
    for (Int_t ibin=0; ibin<nCentBins; ibin++) nMixed[ibin] = 20;
    TArrayI tNMixed(nCentBins, nMixed);

    task->SetCentralityBinning(tbin, tNMixed);
  }
  if( TString(options).Contains("LHC13") )
    task->SetPeriod( AliAnalysisTaskPi0Flow::kLHC13 );

  task->SetCentralityEstimator(centrality);

  task->SetEventMixingRPBinning(1);
  task->SelectCollisionCandidates(offlineTriggerMask);
  task->SetEnablePHOSModule(2, kFALSE);
  task->EnableTOFCut(true, 100.e-9, true);

  mgr->AddTask(task);
  mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() );
  
  TString cname(Form("%sCoutput1", name));
  TString pname(Form("%s:%s", AliAnalysisManager::GetCommonFileName(), name));
  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(cname.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, pname.Data());
  mgr->ConnectOutput(task, 1, coutput1);
  
  return task;
}

{'fraction_non_alphanumeric': 0.13800229621125143, 'fraction_numerical': 0.029621125143513203, 'mean_word_length': 4.248192771084337, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 34, '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': '1778828', 'n_tokens_mistral': 1716, 'n_tokens_neox': 1550, 'n_words': 330}