<commit_before>class AliAnalysisTaskSESigmacTopK0Spi;

AliAnalysisTaskSESigmacTopK0Spi* AddTaskSigmacTopK0Spi(Int_t nvars, TString library = "_6_12", TString finname="Lc2V0bachelorCuts.root",
						      Float_t ptMin=0, Float_t ptMax=24,
						      Bool_t theMCon=kTRUE,
						      Bool_t fillTree=kFALSE,
						      Bool_t onTheFly=kFALSE,
						      Bool_t keepingOnlyHIJINGbkd=kFALSE,
						      TString suffixName="",
						      Bool_t debugFlag = kFALSE,
						      Bool_t useXmlWeightsFile = kTRUE,
						      Bool_t useWeightsLibrary = kFALSE,
						      TString xmlWeightsFile = "$ALICE_PHYSICS/PWGHF/vertexingHF/TMVA/LHC19c2a_TMVAClassification_BDT_2_4_noP.weights.xml",
						      Bool_t useXmlFileFromCVMFS = kFALSE,
						      TString xmlFileFromCVMFS = "LHC19c2a_TMVAClassification_BDT_2_4_noP.weights.xml",
						      Bool_t useMultCorrection = kFALSE,
						      TString estimatorFilename="",       //  Multicity estimator file
						      Double_t refMult=9.26,              // refrence multiplcity (period b)
						      Int_t year = 16,                    // Production year 
						      Int_t recoEstimator = AliAnalysisTaskSESigmacTopK0Spi::kNtrk10, // fMultiplicityEstimator
						      Bool_t useMultCut = kFALSE,
						      Float_t multMin = 0.,    // Minimum is included
						      Float_t multMax = 99999. // Maximum is excluded
						      ){
  
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    ::Error("AddTaskLc2V0bachelor", "No analysis manager to connect to.");
    return NULL;
  }  
  
  // cuts are stored in a TFile generated by makeTFile4CutsLc2V0bachelor.C in ./macros/
  // set there the cuts!!!!!
  Bool_t stdcuts=kFALSE;
  TFile* filecuts;
  if( finname.EqualTo("") ) {
    stdcuts=kTRUE; 
  } else {
    filecuts=TFile::Open(finname.Data());
    if(!filecuts ||(filecuts&& !filecuts->IsOpen())){
      Printf("Input file not found : check your cut object"); return NULL;
    }
  }

  AliRDHFCutsLctoV0* RDHFCutsLctoV0anal = new AliRDHFCutsLctoV0();
  if (stdcuts) RDHFCutsLctoV0anal->SetStandardCutsPP2010();
  else RDHFCutsLctoV0anal = (AliRDHFCutsLctoV0*)filecuts->Get("LctoV0AnalysisCuts");
  RDHFCutsLctoV0anal->SetName("LctoV0AnalysisCuts");
  //RDHFCutsLctoV0anal->SetMinPtCandidate(ptMin);
  //RDHFCutsLctoV0anal->SetMaxPtCandidate(ptMax);
  RDHFCutsLctoV0anal->SetUseCentrality(1);
  
  // mm let's see if everything is ok
  if (!RDHFCutsLctoV0anal) {
    cout << "Specific AliRDHFCutsLctoV0 not found\n";
    return NULL;
  }
  
  Int_t nvarsSpectators = 0;
  TString namesTMVAvars, namesTMVAvarsSpectators;
  if (nvars == 11) {
    namesTMVAvars = "massK0S,tImpParBach,tImpParV0,DecayLengthK0S*0.497/v0P,cosPAK0S,CosThetaStar,signd0,nSigmaTOFpr,nSigmaTPCpr,nSigmaTPCpi,nSigmaTPCka";
    nvarsSpectators = 14;
    namesTMVAvarsSpectators = "massLc2K0Sp,LcPt,massLambda,massLambdaBar,cosPAK0S,V0positivePt,V0negativePt,dcaV0pos,dcaV0neg,v0Pt,dcaV0,V0positiveEta,bachelorEta,centrality";
  }
  else if (nvars == 8) {
    namesTMVAvars = "massK0S,tImpParBach,tImpParV0,DecayLengthK0S*0.497/v0P,cosPAK0S,CosThetaStar,signd0,combinedProtonProb";
    nvarsSpectators = 14;
    namesTMVAvarsSpectators = "massLc2K0Sp,LcPt,massLambda,massLambdaBar,cosPAK0S,V0positivePt,V0negativePt,dcaV0pos,dcaV0neg,v0Pt,dcaV0,V0positiveEta,bachelorEta,centrality";
  }

  //CREATE THE TASK
  printf("CREATE TASK\n");
  AliAnalysisTaskSESigmacTopK0Spi *task = new AliAnalysisTaskSESigmacTopK0Spi("AliAnalysisTaskSESigmacTopK0Spi", RDHFCutsLctoV0anal, onTheFly);
  //  task->SetMVReader(fBDTReader);
  task->SetNVars(nvars);
  task->SetNamesTMVAVariables(namesTMVAvars);
  task->SetTMVAlibName("libvertexingHFTMVA.so");<commit_msg>AddTask with cose w/o signed d0<commit_after>class AliAnalysisTaskSESigmacTopK0Spi;

AliAnalysisTaskSESigmacTopK0Spi* AddTaskSigmacTopK0Spi(Int_t nvars, TString library = "_6_12", TString finname="Lc2V0bachelorCuts.root",
						      Float_t ptMin=0, Float_t ptMax=24,
						      Bool_t theMCon=kTRUE,
						      Bool_t fillTree=kFALSE,
						      Bool_t onTheFly=kFALSE,
						      Bool_t keepingOnlyHIJINGbkd=kFALSE,
						      TString suffixName="",
						      Bool_t debugFlag = kFALSE,
						      Bool_t useXmlWeightsFile = kTRUE,
						      Bool_t useWeightsLibrary = kFALSE,
						      TString xmlWeightsFile = "$ALICE_PHYSICS/PWGHF/vertexingHF/TMVA/LHC19c2a_TMVAClassification_BDT_2_4_noP.weights.xml",
						      Bool_t useXmlFileFromCVMFS = kFALSE,
						      TString xmlFileFromCVMFS = "LHC19c2a_TMVAClassification_BDT_2_4_noP.weights.xml",
						      Bool_t useMultCorrection = kFALSE,
						      TString estimatorFilename="",       //  Multicity estimator file
						      Double_t refMult=9.26,              // refrence multiplcity (period b)
						      Int_t year = 16,                    // Production year 
						      Int_t recoEstimator = AliAnalysisTaskSESigmacTopK0Spi::kNtrk10, // fMultiplicityEstimator
						      Bool_t useMultCut = kFALSE,
						      Float_t multMin = 0.,    // Minimum is included
						      Float_t multMax = 99999. // Maximum is excluded
						      ){
  
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    ::Error("AddTaskLc2V0bachelor", "No analysis manager to connect to.");
    return NULL;
  }  
  
  // cuts are stored in a TFile generated by makeTFile4CutsLc2V0bachelor.C in ./macros/
  // set there the cuts!!!!!
  Bool_t stdcuts=kFALSE;
  TFile* filecuts;
  if( finname.EqualTo("") ) {
    stdcuts=kTRUE; 
  } else {
    filecuts=TFile::Open(finname.Data());
    if(!filecuts ||(filecuts&& !filecuts->IsOpen())){
      Printf("Input file not found : check your cut object"); return NULL;
    }
  }

  AliRDHFCutsLctoV0* RDHFCutsLctoV0anal = new AliRDHFCutsLctoV0();
  if (stdcuts) RDHFCutsLctoV0anal->SetStandardCutsPP2010();
  else RDHFCutsLctoV0anal = (AliRDHFCutsLctoV0*)filecuts->Get("LctoV0AnalysisCuts");
  RDHFCutsLctoV0anal->SetName("LctoV0AnalysisCuts");
  //RDHFCutsLctoV0anal->SetMinPtCandidate(ptMin);
  //RDHFCutsLctoV0anal->SetMaxPtCandidate(ptMax);
  RDHFCutsLctoV0anal->SetUseCentrality(1);
  
  // mm let's see if everything is ok
  if (!RDHFCutsLctoV0anal) {
    cout << "Specific AliRDHFCutsLctoV0 not found\n";
    return NULL;
  }
  
  Int_t nvarsSpectators = 0;
  TString namesTMVAvars, namesTMVAvarsSpectators;
  if (nvars == 12) {
    namesTMVAvars = "massK0S,tImpParBach,tImpParV0,DecayLengthK0S*0.497/v0P,cosPAK0S,,signd0,nSigmaTOFpr,nSigmaTPCpr,nSigmaTPCpi,nSigmaTPCka,ptArmLc,alphaArmLc";
    nvarsSpectators = 14;
    namesTMVAvarsSpectators = "massLc2K0Sp,LcPt,massLambda,massLambdaBar,cosPAK0S,V0positivePt,V0negativePt,dcaV0pos,dcaV0neg,v0Pt,dcaV0,V0positiveEta,bachelorEta,centrality";
  }
  else if (nvars == 11) {
    namesTMVAvars = "massK0S,tImpParBach,tImpParV0,DecayLengthK0S*0.497/v0P,cosPAK0S,CosThetaStar,signd0,nSigmaTOFpr,nSigmaTPCpr,nSigmaTPCpi,nSigmaTPCka";
    nvarsSpectators = 14;
    namesTMVAvarsSpectators = "massLc2K0Sp,LcPt,massLambda,massLambdaBar,cosPAK0S,V0positivePt,V0negativePt,dcaV0pos,dcaV0neg,v0Pt,dcaV0,V0positiveEta,bachelorEta,centrality";
  }
  else if (nvars == 10) {
    namesTMVAvars = "massK0S,tImpParBach,tImpParV0,DecayLengthK0S*0.497/v0P,cosPAK0S,CosThetaStar,nSigmaTOFpr,nSigmaTPCpr,nSigmaTPCpi,nSigmaTPCka";
    nvarsSpectators = 14;
    namesTMVAvarsSpectators = "massLc2K0Sp,LcPt,massLambda,massLambdaBar,cosPAK0S,V0positivePt,V0negativePt,dcaV0pos,dcaV0neg,v0Pt,dcaV0,V0positiveEta,bachelorEta,centrality";
  }
  else if (nvars == 9) {
    namesTMVAvars = "massK0S,tImpParBach,tImpParV0,DecayLengthK0S*0.497/v0P,cosPAK0S, nSigmaTOFpr,nSigmaTPCpr,nSigmaTPCpi,nSigmaTPCka";
    nvarsSpectators = 14;
    namesTMVAvarsSpectators = "massLc2K0Sp,LcPt,massLambda,massLambdaBar,cosPAK0S,V0positivePt,V0negativePt,dcaV0pos,dcaV0neg,v0Pt,dcaV0,V0positiveEta,bachelorEta,centrality";
  }
  else if (nvars == 8) {
    namesTMVAvars = "massK0S,tImpParBach,tImpParV0,DecayLengthK0S*0.497/v0P,cosPAK0S,CosThetaStar,signd0,combinedProtonProb";
    nvarsSpectators = 14;
    namesTMVAvarsSpectators = "massLc2K0Sp,LcPt,massLambda,massLambdaBar,cosPAK0S,V0positivePt,V0negativePt,dcaV0pos,dcaV0neg,v0Pt,dcaV0,V0positiveEta,bachelorEta,centrality";
  }

  //CREATE THE TASK
  printf("CREATE TASK\n");
  AliAnalysisTaskSESigmacTopK0Spi *task = new AliAnalysisTaskSESigmacTopK0Spi("AliAnalysisTaskSESigmacTopK0Spi", RDHFCutsLctoV0anal, onTheFly);
  //  task->SetMVReader(fBDTReader);
  task->SetNVars(nvars);
  task->SetNamesTMVAVariables(namesTMVAvars);
  task->SetTMVAlibName("libvertexingHFTMVA.so");
{'fraction_non_alphanumeric': 0.10138678475702133, 'fraction_numerical': 0.03402866798741405, 'mean_word_length': 4.2779827798277985, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '2487269', 'n_tokens_mistral': 3821, 'n_tokens_neox': 3405, 'n_words': 437}