<commit_before>AliAnalysisTask* AddTaskQAHighPtDeDx(Bool_t AnalysisMC = kFALSE,
			                         Int_t typerun =1, // 0 for pp and 1 for Pb-Pb or pPb
			                         TString  type ="ESD",
			                         UInt_t kTriggerInt = AliVEvent::kINT7, //for pPb kINT7, for pp or PbPb kMB
			                         Float_t minCent = 0.,
                                     Float_t maxCent = 80.,
			                         char *centralityEstimator = "V0A",//for pPb V0A for PbPb V0M
			                         Bool_t ispileuprej = kFALSE
                                    )
{
  // Creates a pid task and adds it to the analysis manager
  
  // Get the pointer to the existing analysis manager via the static
  //access method
  //=========================================================================
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    Error("AddTaskHighPtDeDx", "No analysis manager to connect to.");
    return NULL;
  }  
  
  // Check the analysis type using the event handlers connected to the
  // analysis manager The availability of MC handler can also be
  // checked here.
  // =========================================================================
  if (!mgr->GetInputEventHandler()) {
    Error("AddTaskHighPtDeDx", "This task requires an input event handler");
    return NULL;
  }  
  



  AliAnalysisFilter* trackFilterGolden = new AliAnalysisFilter("trackFilter");
  AliESDtrackCuts* esdTrackCutsGolden = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kTRUE,1);
  trackFilterGolden->AddCuts(esdTrackCutsGolden);
  
  AliAnalysisFilter* trackFilterTPC = new AliAnalysisFilter("trackFilterTPC");
  AliESDtrackCuts* esdTrackCutsTPC = 
    AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
  trackFilterTPC->AddCuts(esdTrackCutsTPC);
  


  
  AliAnalysisTaskQAHighPtDeDx* taskHighPtDeDx = new AliAnalysisTaskQAHighPtDeDx("taskHighPtDeDxpp");
  TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
  taskHighPtDeDx->SetAnalysisType(type);
  taskHighPtDeDx->SetAnalysisMC(AnalysisMC);
  if(typerun==1){
    taskHighPtDeDx->SetAnalysisPbPb(kTRUE);
    taskHighPtDeDx->SetMinCent(minCent);
    taskHighPtDeDx->SetMaxCent(maxCent);
    taskHighPtDeDx->SetCentralityEstimator(centralityEstimator);
  }
  else
    taskHighPtDeDx->SetAnalysisPbPb(kFALSE);
  taskHighPtDeDx->SetDebugLevel(0);
  taskHighPtDeDx->SetEtaCut(0.8);
  taskHighPtDeDx->SetVtxCut(10.0);
  taskHighPtDeDx->SetTrigger(kTriggerInt);
  taskHighPtDeDx->SetPileUpRej(ispileuprej);
  //Set Filtesr
  taskHighPtDeDx->SetTrackFilterGolden(trackFilterGolden);
  taskHighPtDeDx->SetTrackFilterTPC(trackFilterTPC);
  taskHighPtDeDx->SetStoreMcIn(AnalysisMC);     // def: kFALSE
  
  mgr->AddTask(taskHighPtDeDx);
  
  // Create ONLY the output containers for the data produced by the
  // task.  Get and connect other common input/output containers via
  // the manager as below
  //=======================================================================
  
  AliAnalysisDataContainer *cout_histdedx;
  
  cout_histdedx=0;
  cout_histdedx = mgr->CreateContainer("outputdedx", TList::Class(), AliAnalysisManager::kOutputContainer, "QAHighPtDeDx.root");
  mgr->ConnectInput (taskHighPtDeDx, 0, mgr->GetCommonInputContainer());
  mgr->ConnectOutput(taskHighPtDeDx, 1, cout_histdedx);
  
  // Return task pointer at the end
  return taskHighPtDeDx;
   
  
  
}
<commit_msg>Minor fix to QA task macro<commit_after>AliAnalysisTask* AddTaskQAHighPtDeDx(Bool_t AnalysisMC = kFALSE,
			                         Int_t typerun =1, // 0 for pp and 1 for Pb-Pb or pPb
			                         TString  type ="ESD",
			                         UInt_t kTriggerInt = AliVEvent::kINT7, //for pPb kINT7, for pp or PbPb kMB
			                         Float_t minCent = 0.,
                                     Float_t maxCent = 80.,
			                         char *centralityEstimator = "V0A",//for pPb V0A for PbPb V0M
			                         Bool_t ispileuprej = kFALSE
                                    )
{
  // Creates a pid task and adds it to the analysis manager
  
  // Get the pointer to the existing analysis manager via the static
  //access method
  //=========================================================================
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    Error("AddTaskHighPtDeDx", "No analysis manager to connect to.");
    return NULL;
  }  
  
  // Check the analysis type using the event handlers connected to the
  // analysis manager The availability of MC handler can also be
  // checked here.
  // =========================================================================
  if (!mgr->GetInputEventHandler()) {
    Error("AddTaskHighPtDeDx", "This task requires an input event handler");
    return NULL;
  }  
  



  AliAnalysisFilter* trackFilterGolden = new AliAnalysisFilter("trackFilter");
  AliESDtrackCuts* esdTrackCutsGolden = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kTRUE,1);
  trackFilterGolden->AddCuts(esdTrackCutsGolden);
  
  AliAnalysisFilter* trackFilterTPC = new AliAnalysisFilter("trackFilterTPC");
  AliESDtrackCuts* esdTrackCutsTPC = 
    AliESDtrackCuts::GetStandardTPCOnlyTrackCuts();
  trackFilterTPC->AddCuts(esdTrackCutsTPC);
  


  
  AliAnalysisTaskQAHighPtDeDx* taskHighPtDeDx = new AliAnalysisTaskQAHighPtDeDx("taskHighPtDeDxpp");
  TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
  taskHighPtDeDx->SetAnalysisType(type);
  taskHighPtDeDx->SetAnalysisMC(AnalysisMC);
  if(typerun==1){
    taskHighPtDeDx->SetAnalysisPbPb(kTRUE);
    taskHighPtDeDx->SetMinCent(minCent);
    taskHighPtDeDx->SetMaxCent(maxCent);
    taskHighPtDeDx->SetCentralityEstimator(centralityEstimator);
  }
  else
    taskHighPtDeDx->SetAnalysisPbPb(kFALSE);
  taskHighPtDeDx->SetDebugLevel(0);
  taskHighPtDeDx->SetEtaCut(0.8);
  taskHighPtDeDx->SetVtxCut(10.0);
  taskHighPtDeDx->SetTrigger(kTriggerInt);
  taskHighPtDeDx->SetPileUpRej(ispileuprej);
  //Set Filtesr
  taskHighPtDeDx->SetTrackFilterGolden(trackFilterGolden);
  taskHighPtDeDx->SetTrackFilterTPC(trackFilterTPC);
  taskHighPtDeDx->SetStoreMcIn(AnalysisMC);     // def: kFALSE
  
  mgr->AddTask(taskHighPtDeDx);
  
  // Create ONLY the output containers for the data produced by the
  // task.  Get and connect other common input/output containers via
  // the manager as below
  //=======================================================================
  TString outputFileName = AliAnalysisManager::GetCommonFileName();
    
  AliAnalysisDataContainer *cout_histdedx;
  cout_histdedx=0;
  cout_histdedx = mgr->CreateContainer("outputdedx", TList::Class(), AliAnalysisManager::kOutputContainer, outputFileName);
  mgr->ConnectInput (taskHighPtDeDx, 0, mgr->GetCommonInputContainer());
  mgr->ConnectOutput(taskHighPtDeDx, 1, cout_histdedx);
  
  // Return task pointer at the end
  return taskHighPtDeDx;
   
  
  
}

{'fraction_non_alphanumeric': 0.14664434212362215, 'fraction_numerical': 0.007255476489465606, 'mean_word_length': 3.19672131147541, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4429088', 'n_tokens_mistral': 2394, 'n_tokens_neox': 2172, 'n_words': 442}