<commit_before><commit_msg>Make weights for K^0_S only<commit_after>void
MakeK0S()
{
  gSystem->AddIncludePath("-I${ALICE_ROOT}/include -I${ALICE_PHYSICS}/include");
  gROOT->LoadMacro("AliAODTracklet.C+g");
  gROOT->LoadMacro("AliTrackletWeights.C+g");

  AliTrackletWeights* weights = new AliTrackletWeights("weights");

  Double_t c2Bins[] = { 0, 2.5, 5, 7.5, 10, 20, 30,
			40, 50, 60, 70, 80, 90, 100 };
  
  TFile* strFile = TFile::Open("../tracklets/REWEIGHTstr.root","READ");
  Short_t strs[] = { 310 };
  for (Int_t i = 0; i < 1; i++) {
    TString histName;
    Short_t pdg = strs[i];
    histName.Form("strWeight_%s", (pdg == 211  ? "pi" :
				   pdg == 321  ? "ka" :
				   pdg == 2212 ? "pr" :
				   pdg == 310  ? "k0" :
				   pdg == 3122 ? "la" :
				   pdg == 3212 ? "si" :
				   pdg == 3322 ? "xi" : ""));
    TH1* hist = static_cast<TH1*>(strFile->Get(histName));
    if (!hist) {
      Warning("MakeWeight", "strangeness histogram %s not found",
	      histName.Data());
      continue;
    }
    TH1D* out = new TH1D(Form("w%d", pdg), Form("Strangeness %d weight", pdg),
			 13, c2Bins);
    for (Int_t j = 1; j <= out->GetNbinsX(); j++) {
      out->SetBinContent(j, hist->GetBinContent(j));
      out->SetBinError  (j, hist->GetBinError  (j));
    }
    weights->AddStrangenessWeight(pdg, out);
  }
  

  
  
  new TBrowser;

  TFile* outW = TFile::Open("k0s.root", "RECREATE");
  weights->Write();
  outW->Write();
  weights->Draw();
  weights->Print();
}
{'fraction_non_alphanumeric': 0.1972972972972973, 'fraction_numerical': 0.0472972972972973, 'mean_word_length': 3.046448087431694, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1455545', 'n_tokens_mistral': 678, 'n_tokens_neox': 588, 'n_words': 119}