<commit_before>AliAnalysisTaskMinijet* AddTaskMinijet(Int_t runNumber, TString format="esd",Bool_t useMC = kFALSE, TString kGridDataSet="LHC10e")
{

  //starting with periode LHC10e, there are also events triggered with High Mult trigger
  //add stand alone task in case these events are availale
  Bool_t IsHighMult= (!kGridDataSet.CompareTo("LHC10e") || !kGridDataSet.CompareTo("LHC10f"));
  //extent with new periods (LHC10g,h,...)

  // Get the pointer to the existing analysis manager via the static access method.
  //==============================================================================
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) mgr = new AliAnalysisManager("Analysis train");

  // Set cuts (used for ESDs) 
  //===========================================================================
  AliESDtrackCuts* esdTrackCutsITSTPC=0x0;
  if(!format.CompareTo("esd")){
    esdTrackCutsITSTPC = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(kTRUE);
  }

  // Configure tasks
  //===========================================================================
   
  //first task for min bias events
  AliAnalysisTaskMinijet *task = new AliAnalysisTaskMinijet("AliAnalysisTaskMinijet Min bias");
  task->UseMC(useMC);
  task->SetRadiusCut(0.7);
  task->SetTriggerPtCut(0.7);
  task->SetAssociatePtCut(0.4);
  task->SetEventAxis(1); //1=random track
  task->SetDebugLevel(0);
  task->SetMaxVertexZ(10.);
  if(!format.CompareTo("esd")){
    task->SetCuts(esdTrackCutsITSTPC);
    task->SetMode(0);//0=reading ESDs
    task->SelectCollisionCandidates(AliVEvent::kMB);//MB
  }

  //second task for high multipliciy events
  AliAnalysisTaskMinijet *taskHM =0x0;
  if(IsHighMult && !format.CompareTo("esd")){
    taskHM  = new AliAnalysisTaskMinijet("AliAnalysisTaskMinijet HighMult");
    taskHM->UseMC(useMC);
    taskHM->SetRadiusCut(0.7);
    taskHM->SetTriggerPtCut(0.7);
    taskHM->SetAssociatePtCut(0.4);
    taskHM->SetEventAxis(1); //1=random track
    taskHM->SetDebugLevel(0);
    taskHM->SetMaxVertexZ(10.);
    taskHM->SetCuts(esdTrackCutsITSTPC);
    taskHM->SetMode(0);//0=reading ESDs
    taskHM->SelectCollisionCandidates(AliVEvent::kHighMult);//high mult triggered event
  }

  if (!format.CompareTo("aod")){
    task->SetMode(1);// 1 = reading AODs
  }

  //create output containers 
  //===========================================================================
  AliAnalysisDataContainer *output1  = 0x0;
  AliAnalysisDataContainer *outputHM = 0x0;

  if(runNumber>0){ 
    output1  =  mgr->CreateContainer("MiniJets",TList::Class(),
				  AliAnalysisManager::kOutputContainer, Form("run%d.root",runNumber));
    outputHM =  mgr->CreateContainer("MiniJets_HighMult",TList::Class(),
				  AliAnalysisManager::kOutputContainer, Form("run%d.root",runNumber));
   }
   
   else{
     output1  = mgr->CreateContainer("MiniJets",TList::Class(),
				 AliAnalysisManager::kOutputContainer, 
				 Form("%s:PWG4_MiniJets",AliAnalysisManager::GetCommonFileName()));
     outputHM = mgr->CreateContainer("MiniJets_HighMult",TList::Class(),
				     AliAnalysisManager::kOutputContainer, 
				     Form("%s:PWG4_MiniJets",AliAnalysisManager::GetCommonFileName()));
     
   }

  //===========================================================================  
  // add first task to the manager
  
  mgr->AddTask(task);
  
  //connect input and output
  mgr->ConnectInput(task, 0,  mgr->GetCommonInputContainer());
  mgr->ConnectOutput(task, 1, output1);
  
  
  //===========================================================================
  //do same for high mult task if necassary
  if(!format.CompareTo("esd") && IsHighMult){
    
    // add task to the manager
    mgr->AddTask(taskHM);<commit_msg>fix: generate DataContainer highmult data only it is needed<commit_after>AliAnalysisTaskMinijet* AddTaskMinijet(Int_t runNumber, TString format="esd",Bool_t useMC = kFALSE, TString kGridDataSet="LHC10e")
{

  //starting with periode LHC10e, there are also events triggered with High Mult trigger
  //add stand alone task in case these events are availale
  Bool_t IsHighMult= (!kGridDataSet.CompareTo("LHC10e") || !kGridDataSet.CompareTo("LHC10f"));
  //extent with new periods (LHC10g,h,...)

  // Get the pointer to the existing analysis manager via the static access method.
  //==============================================================================
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) mgr = new AliAnalysisManager("Analysis train");

  // Set cuts (used for ESDs) 
  //===========================================================================
  AliESDtrackCuts* esdTrackCutsITSTPC=0x0;
  if(!format.CompareTo("esd")){
    esdTrackCutsITSTPC = AliESDtrackCuts::GetStandardITSTPCTrackCuts2010(kTRUE);
  }

  // Configure tasks
  //===========================================================================
   
  //first task for min bias events
  AliAnalysisTaskMinijet *task = new AliAnalysisTaskMinijet("AliAnalysisTaskMinijet Min bias");
  task->UseMC(useMC);
  task->SetRadiusCut(0.7);
  task->SetTriggerPtCut(0.7);
  task->SetAssociatePtCut(0.4);
  task->SetEventAxis(1); //1=random track
  task->SetDebugLevel(0);
  task->SetMaxVertexZ(10.);
  if(!format.CompareTo("esd")){
    task->SetCuts(esdTrackCutsITSTPC);
    task->SetMode(0);//0=reading ESDs
    task->SelectCollisionCandidates(AliVEvent::kMB);//MB
  }

  //second task for high multipliciy events
  AliAnalysisTaskMinijet *taskHM =0x0;
  if(IsHighMult && !format.CompareTo("esd")){
    taskHM  = new AliAnalysisTaskMinijet("AliAnalysisTaskMinijet HighMult");
    taskHM->UseMC(useMC);
    taskHM->SetRadiusCut(0.7);
    taskHM->SetTriggerPtCut(0.7);
    taskHM->SetAssociatePtCut(0.4);
    taskHM->SetEventAxis(1); //1=random track
    taskHM->SetDebugLevel(0);
    taskHM->SetMaxVertexZ(10.);
    taskHM->SetCuts(esdTrackCutsITSTPC);
    taskHM->SetMode(0);//0=reading ESDs
    taskHM->SelectCollisionCandidates(AliVEvent::kHighMult);//high mult triggered event
  }

  if (!format.CompareTo("aod")){
    task->SetMode(1);// 1 = reading AODs
  }

  //create output containers 
  //===========================================================================
  AliAnalysisDataContainer *output1  = 0x0;
  AliAnalysisDataContainer *outputHM = 0x0;

  if(runNumber>0){ 
    output1  =  mgr->CreateContainer("MiniJets",TList::Class(),
				  AliAnalysisManager::kOutputContainer, Form("run%d.root",runNumber));
    if(!format.CompareTo("esd") && IsHighMult){
      outputHM =  mgr->CreateContainer("MiniJets_HighMult",TList::Class(),
				       AliAnalysisManager::kOutputContainer, Form("run%d.root",runNumber));
    }
   }
   
   else{
     output1  = mgr->CreateContainer("MiniJets",TList::Class(),
				 AliAnalysisManager::kOutputContainer, 
				 Form("%s:PWG4_MiniJets",AliAnalysisManager::GetCommonFileName()));
     if(!format.CompareTo("esd") && IsHighMult){
       outputHM = mgr->CreateContainer("MiniJets_HighMult",TList::Class(),
				       AliAnalysisManager::kOutputContainer, 
				       Form("%s:PWG4_MiniJets",AliAnalysisManager::GetCommonFileName()));
     }
     
   }

  //===========================================================================  
  // add first task to the manager
  
  mgr->AddTask(task);
  
  //connect input and output
  mgr->ConnectInput(task, 0,  mgr->GetCommonInputContainer());
  mgr->ConnectOutput(task, 1, output1);
  
  
  //===========================================================================
  //do same for high mult task if necassary
  if(!format.CompareTo("esd") && IsHighMult){
    
    // add task to the manager
    mgr->AddTask(taskHM);
{'fraction_non_alphanumeric': 0.24091205211726385, 'fraction_numerical': 0.015374592833876221, 'mean_word_length': 4.959627329192546, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 65, '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': '7432593', 'n_tokens_mistral': 2542, 'n_tokens_neox': 2337, 'n_words': 407}