<commit_before>AliAnalysisTask *AddTaskEMCALPi0V2hardCodeEP(Double_t EvtMthod=2, TString trackName="PicoTrack", Double_t Ecut = 1, Double_t M02cut = 0.5)
{
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    Error("AddTaskEMCALPi0V2hardCodeEP", "No analysis manager found.");
    return NULL;
  }

  if (!mgr->GetInputEventHandler()) {
    ::Error("AddTaskEMCALPi0V2hardCodeEP", "This task requires an input event handler");
    return NULL;
  }
  TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
  if (type=="AOD"){
    ::Error("AddTaskEMCALPi0V2hardCodeEP", "The tasks exits because AODs are in input");
    return NULL;
  }
  
  //Event plane task
  AliEPSelectionTask *eventplaneTask = new AliEPSelectionTask("EventplaneSelection");
  eventplaneTask->SetTrackType("TPC");
  eventplaneTask->SetUsePtWeight();
  eventplaneTask->SetUsePhiWeight();
  eventplaneTask->SetSaveTrackContribution();
  
  AliESDtrackCuts* epTrackCuts = new AliESDtrackCuts("AliESDtrackCuts", "Standard");
  epTrackCuts->SetRequireTPCStandAlone(kTRUE); // to get chi2 and ncls of kTPCin
  epTrackCuts->SetMinNClustersTPC(50);
  epTrackCuts->SetMaxChi2PerClusterTPC(4);
  epTrackCuts->SetAcceptKinkDaughters(kFALSE);
  epTrackCuts->SetRequireTPCRefit(kTRUE);
  epTrackCuts->SetMaxDCAToVertexZ(3.2);
  epTrackCuts->SetMaxDCAToVertexXY(2.4);
  epTrackCuts->SetPtRange(0.15, 20);
  eventplaneTask->SetPersonalESDtrackCuts(epTrackCuts);

  mgr->AddTask(eventplaneTask);

  TString containerName3 = mgr->GetCommonFileName();
  containerName3 += ":PWGGA_pi0v2CalEventPlane";
  
  AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer();
  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(Form("EPStatTPC_E%1.0f_M02%1.0f", Ecut, M02cut),TList::Class(), AliAnalysisManager::kOutputContainer,containerName3.Data());
  mgr->ConnectInput(eventplaneTask, 0, mgr->GetCommonInputContainer());
  mgr->ConnectOutput(eventplaneTask,1,coutput1);

  //analysis task 

  AliAnalysisTaskPi0V2* taskMB = new  AliAnalysisTaskPi0V2("Pi0v2Task"); 
  taskMB->SetEventMethod(EvtMthod);
  taskMB->SetTracksName(trackName.Data());
  taskMB->SetClusE(Ecut);
  taskMB->SetClusM02(M02cut);

  TString containerName = mgr->GetCommonFileName();
  containerName += ":PWGGA_pi0v2CalSemiCentral";
  
  AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
  AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(Form("histv2task_E%1.0f_M02%1.0f", Ecut, M02cut), TList::Class(),AliAnalysisManager::kOutputContainer, containerName.Data());
  mgr->ConnectInput(taskMB, 0, cinput);
  mgr->ConnectOutput(taskMB, 1, coutput2);
  
  return NULL;
}<commit_msg>changes from fzhou<commit_after>AliAnalysisTask *AddTaskEMCALPi0V2hardCodeEP(Double_t EvtMthod=2, TString trackName="PicoTrack", Double_t Ecut = 1, Double_t M02cut = 0.5)
{
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    Error("AddTaskEMCALPi0V2hardCodeEP", "No analysis manager found.");
    return NULL;
  }

  if (!mgr->GetInputEventHandler()) {
    ::Error("AddTaskEMCALPi0V2hardCodeEP", "This task requires an input event handler");
    return NULL;
  }
  TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
  if (type=="AOD"){
    ::Error("AddTaskEMCALPi0V2hardCodeEP", "The tasks exits because AODs are in input");
    return NULL;
  }
  
  //Event plane task
  AliEPSelectionTask *eventplaneTask = new AliEPSelectionTask("EventplaneSelection");
  eventplaneTask->SetTrackType("TPC");
  eventplaneTask->SetUsePtWeight();
  eventplaneTask->SetUsePhiWeight();
  eventplaneTask->SetSaveTrackContribution();
  
  AliESDtrackCuts* epTrackCuts = new AliESDtrackCuts("AliESDtrackCuts", "Standard");
  epTrackCuts->SetRequireTPCStandAlone(kTRUE); // to get chi2 and ncls of kTPCin
  epTrackCuts->SetMinNClustersTPC(50);
  epTrackCuts->SetMaxChi2PerClusterTPC(4);
  epTrackCuts->SetAcceptKinkDaughters(kFALSE);
  epTrackCuts->SetRequireTPCRefit(kTRUE);
  epTrackCuts->SetMaxDCAToVertexZ(3.2);
  epTrackCuts->SetMaxDCAToVertexXY(2.4);
  epTrackCuts->SetPtRange(0.15, 20);
  eventplaneTask->SetPersonalESDtrackCuts(epTrackCuts);

  mgr->AddTask(eventplaneTask);

  TString containerName3 = mgr->GetCommonFileName();
  containerName3 += ":PWGGA_pi0v2CalEventPlane";
  
  AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer();
  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(Form("EPStatTPC_E%1.2f_M02%1.2f", Ecut, M02cut),TList::Class(), AliAnalysisManager::kOutputContainer,containerName3.Data());
  mgr->ConnectInput(eventplaneTask, 0, mgr->GetCommonInputContainer());
  mgr->ConnectOutput(eventplaneTask,1,coutput1);

  //analysis task 

  AliAnalysisTaskPi0V2* taskMB = new  AliAnalysisTaskPi0V2("Pi0v2Task"); 
  taskMB->SetEventMethod(EvtMthod);
  taskMB->SetTracksName(trackName.Data());
  taskMB->SetClusE(Ecut);
  taskMB->SetClusM02(M02cut);

  TString containerName = mgr->GetCommonFileName();
  containerName += ":PWGGA_pi0v2CalSemiCentral";
  
  AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
  AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(Form("histv2task_E%1.2f_M02%1.2f", Ecut, M02cut), TList::Class(),AliAnalysisManager::kOutputContainer, containerName.Data());
  mgr->ConnectInput(taskMB, 0, cinput);
  mgr->ConnectOutput(taskMB, 1, coutput2);
  
  return NULL;
}
{'fraction_non_alphanumeric': 0.13066814732555987, 'fraction_numerical': 0.026281695354432724, 'mean_word_length': 6.643564356435643, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 67, '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': '4735346', 'n_tokens_mistral': 1973, 'n_tokens_neox': 1906, 'n_words': 284}