<commit_before>AliAnalysisTask *AddTaskTender(Bool_t useV0=kFALSE, 
                               Bool_t useTPC=kTRUE,
                               Bool_t useTOF=kTRUE,
                               Bool_t useTRD=kTRUE,
                               Bool_t usePID=kTRUE,
                               Bool_t useVTX=kTRUE,
                               Bool_t useT0=kTRUE,
                               Bool_t useEmc=kFALSE)
{
  if (!(useV0 | useTPC | useTOF | useTRD | usePID | useVTX | useEmc)) {
     ::Error("AddTaskTender", "No supply added to tender, so tender not created");
     return 0;
  }   
  //get the current analysis manager
  Bool_t checkEvtSelection = useV0;
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    ::Error("AddTaskTender", "No analysis manager found.");
    return 0;
  }
  // currently don't accept AOD input
  if (!mgr->GetInputEventHandler()->InheritsFrom(AliESDInputHandler::Class())) {
    ::Error("AddTask_tender_Tender","The analysis tender only works with ESD input!");
    return 0;
  }
  
  //========= Add tender to the ANALYSIS manager and set default storage =====
  AliTender *tender=new AliTender("AnalysisTender");
  tender->SetCheckEventSelection(checkEvtSelection);
  tender->SetDefaultCDBStorage("raw://");
  mgr->AddTask(tender);
  if (checkEvtSelection) {
    if (mgr->GetTasks()->First() != (TObject*)tender ) {
      TString firstName(mgr->GetTasks()->First()->GetName());
      Bool_t isSecond=(mgr->GetTasks()->At(1) == (TObject*)tender);
      if (! (firstName=="PIDResponseTask" && isSecond )){
        Fatal("AddTaskTender","When setting the tender to check the event selection, it has to be the first wagon, or the first after the PID Response!");
        return NULL;
      }
    }
  }
  
  //========= Attach VZERO supply ======

  if (useV0) {
     AliVZEROTenderSupply *vzeroSupply=new AliVZEROTenderSupply("VZEROtender");
     vzeroSupply->SetDebug(kFALSE);
     tender->AddSupply(vzeroSupply);
  }   

 
  //========= Attach TPC supply ======
  if (useTPC) {
     AliTPCTenderSupply *tpcSupply=new AliTPCTenderSupply("TPCtender");
     tpcSupply->SetDebugLevel(2);
     //tpcSupply->SetMip(50.);
     tender->AddSupply(tpcSupply);
  }   

  //========= Attach T0 supply ======
  if (useT0) {
    AliT0TenderSupply *t0Tender = new AliT0TenderSupply("T0tender");
    t0Tender ->SetPass4LHC11aCorrection(kTRUE);
    tender->AddSupply(t0Tender);
  }   

  //========= Attach TOF supply ======
  if (useTOF) {
    AliTOFTenderSupply *tofTender = new AliTOFTenderSupply("TOFtender");
    tender->AddSupply(tofTender);<commit_msg>Include 1/pt fixing supply to the train (but switched off)<commit_after>AliAnalysisTask *AddTaskTender(Bool_t useV0=kFALSE, 
                               Bool_t useTPC=kTRUE,
                               Bool_t useTOF=kTRUE,
                               Bool_t useTRD=kTRUE,
                               Bool_t usePID=kTRUE,
                               Bool_t useVTX=kTRUE,
                               Bool_t useT0=kTRUE,
                               Bool_t useEmc=kFALSE,
			       Bool_t usePtFix=kFALSE)
{
  if (!(useV0 | useTPC | useTOF | useTRD | usePID | useVTX | useEmc)) {
     ::Error("AddTaskTender", "No supply added to tender, so tender not created");
     return 0;
  }   
  //get the current analysis manager
  Bool_t checkEvtSelection = useV0;
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    ::Error("AddTaskTender", "No analysis manager found.");
    return 0;
  }
  // currently don't accept AOD input
  if (!mgr->GetInputEventHandler()->InheritsFrom(AliESDInputHandler::Class())) {
    ::Error("AddTask_tender_Tender","The analysis tender only works with ESD input!");
    return 0;
  }
  
  //========= Add tender to the ANALYSIS manager and set default storage =====
  AliTender *tender=new AliTender("AnalysisTender");
  tender->SetCheckEventSelection(checkEvtSelection);
  tender->SetDefaultCDBStorage("raw://");
  mgr->AddTask(tender);
  if (checkEvtSelection) {
    if (mgr->GetTasks()->First() != (TObject*)tender ) {
      TString firstName(mgr->GetTasks()->First()->GetName());
      Bool_t isSecond=(mgr->GetTasks()->At(1) == (TObject*)tender);
      if (! (firstName=="PIDResponseTask" && isSecond )){
        Fatal("AddTaskTender","When setting the tender to check the event selection, it has to be the first wagon, or the first after the PID Response!");
        return NULL;
      }
    }
  }
  
  //========= Attach VZERO supply ======

  if (useV0) {
     AliVZEROTenderSupply *vzeroSupply=new AliVZEROTenderSupply("VZEROtender");
     vzeroSupply->SetDebug(kFALSE);
     tender->AddSupply(vzeroSupply);
  }   

 
  //========= Attach TPC supply ======
  if (useTPC) {
     AliTPCTenderSupply *tpcSupply=new AliTPCTenderSupply("TPCtender");
     tpcSupply->SetDebugLevel(2);
     //tpcSupply->SetMip(50.);
     tender->AddSupply(tpcSupply);
  }   

  //========= Attach track 1/pt correction supply ======
  if (usePtFix) {
     AliTrackFixTenderSupply *trfixSupply=new AliTrackFixTenderSupply("PTInvFix");
     //trfixSupply->SetDebugLevel(2);
     tender->AddSupply(trfixSupply);
  }   

  //========= Attach T0 supply ======
  if (useT0) {
    AliT0TenderSupply *t0Tender = new AliT0TenderSupply("T0tender");
    t0Tender ->SetPass4LHC11aCorrection(kTRUE);
    tender->AddSupply(t0Tender);
  }   

  //========= Attach TOF supply ======
  if (useTOF) {
    AliTOFTenderSupply *tofTender = new AliTOFTenderSupply("TOFtender");
    tender->AddSupply(tofTender);
{'fraction_non_alphanumeric': 0.14505730659025787, 'fraction_numerical': 0.008775071633237822, 'mean_word_length': 2.886569241475296, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 45, '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': '2750766', 'n_tokens_mistral': 1899, 'n_tokens_neox': 1837, 'n_words': 364}