<commit_before>///////////////////////////////////////////////////////////////////
//                                                               //            
// AddTaskPPvsUE                                                 //
// Author: <NAME>: <EMAIL>          //
//                                                               //
///////////////////////////////////////////////////////////////////


class AliAnalysisDataContainer;

AliAnalysisTask* AddTaskPPvsUE()
{
  // set authomatically to true if MC
  Bool_t AnalysisMC= (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler()!=0x0);
  // set to true if you wish to build corrections (memory consuming)
  Bool_t AnalysisCorr = kTRUE; 

  // Get the pointer to the existing analysis manager via the static access method. 
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   if(!mgr){
    ::Error("AddTaskPPvsUE", "No analysis manager to connect to.");
      return NULL; 
    }

  // set the MC online spectra weights task
  
  AliMCSpectraWeights* fMCSpectraWeights = new AliMCSpectraWeights("pp", "fMCSpectraWeights", (AliMCSpectraWeights::SysFlag) 0);
  // TODO: VZ this is still not implemented properly
  fMCSpectraWeights->SetMCSpectraFile("alien:///alice/cern.ch/user/a/alitrain/PWGLF/LF_pp_MC/1154_20190521-2046/merge/AnalysisResults.root" ); 
  fMCSpectraWeights->Init();
  if (!fMCSpectraWeights) printf("no fMCSpectraWeights object!");//

// Check the analysis type using the event handlers connected to the analysis manager.  
//==============================================================================
  if(!mgr->GetInputEventHandler()){
   ::Error("AddTaskPPvsUE", "This task requires an input event handler");
      return NULL;   
   }


   AliAnalysisTaskPPvsUE * task = new AliAnalysisTaskPPvsUE("AnalysisPPvsUE");
   if(!task) return 0x0;
   TString kInputDataType = mgr->GetInputEventHandler()->GetDataType(); 

   Bool_t is13TeV = kTRUE;
   task->SetAnalysisMC(AnalysisMC);
   task->SetAnalysisCorr(AnalysisCorr);
   task->SetAnalysisType(kInputDataType);
   task->SetDebugLevel(0);
   task->SetEtaCut(0.8);
   task->SetVtxCut(10.0);
   task->SetPtLeadMin(6.0);
   task->SetPileUpRej(kTRUE);	
   task->SetAveMultiInTrans(4.939);
   task->SetAveRecMultiInTrans(4.895); // reco MC PYTHIA 8<commit_msg>Fixing trigger flag<commit_after>///////////////////////////////////////////////////////////////////
//                                                               //            
// AddTaskPPvsUE                                                 //
// Author: <NAME>: <EMAIL>          //
//                                                               //
///////////////////////////////////////////////////////////////////


class AliAnalysisDataContainer;

AliAnalysisTask* AddTaskPPvsUE (Bool_t AnalysisMC = kFALSE, 
		                        const Char_t* taskname = "UeSpectra")
{
  // set authomatically to true if MC
  Bool_t AnalysisMC= (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler()!=0x0);
  // set to true if you wish to build corrections (memory consuming)
  Bool_t AnalysisCorr = kTRUE; 

  // Get the pointer to the existing analysis manager via the static access method. 
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   if(!mgr){
    ::Error("AddTaskPPvsUE", "No analysis manager to connect to.");
      return NULL; 
    }

  // set the MC online spectra weights task
  
  AliMCSpectraWeights* fMCSpectraWeights = new AliMCSpectraWeights("pp", "fMCSpectraWeights", (AliMCSpectraWeights::SysFlag) 0);
  // TODO: VZ this is still not implemented properly
  fMCSpectraWeights->SetMCSpectraFile("alien:///alice/cern.ch/user/a/alitrain/PWGLF/LF_pp_MC/1154_20190521-2046/merge/AnalysisResults.root" ); 
  fMCSpectraWeights->Init();
  if (!fMCSpectraWeights) printf("no fMCSpectraWeights object!");//

// Check the analysis type using the event handlers connected to the analysis manager.  
//==============================================================================
  if(!mgr->GetInputEventHandler()){
   ::Error("AddTaskPPvsUE", "This task requires an input event handler");
      return NULL;   
   }


   AliAnalysisTaskPPvsUE * task = new AliAnalysisTaskPPvsUE("AnalysisPPvsUE");
   if(!task) return 0x0;
   TString kInputDataType = mgr->GetInputEventHandler()->GetDataType(); 

   Bool_t is13TeV = kTRUE;
   UInt_t trigSel = AliVEvent::kINT7;

   task->SetTrigger(trigSel);
   task->SetAnalysisMC(AnalysisMC);
   task->SetAnalysisCorr(AnalysisCorr);
   task->SetAnalysisType(kInputDataType);
   task->SetDebugLevel(0);
   task->SetEtaCut(0.8);
   task->SetVtxCut(10.0);
   task->SetPtLeadMin(6.0);
   task->SetPileUpRej(kTRUE);	
   task->SetAveMultiInTrans(4.939);
   task->SetAveRecMultiInTrans(4.895); // reco MC PYTHIA 8
{'fraction_non_alphanumeric': 0.19234768143065087, 'fraction_numerical': 0.01684341859014348, 'mean_word_length': 2.382559774964838, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2876703', 'n_tokens_mistral': 1426, 'n_tokens_neox': 1353, 'n_words': 288}