20 gSystem->AddIncludePath(
"-I${ALICE_ROOT}/include -I${ALICE_PHYSICS}/include");
21 gROOT->LoadMacro(
"AliAODTracklet.C+g");
22 gROOT->LoadMacro(
"AliTrackletWeights.C+g");
26 Double_t c2Bins[] = { 0, 2.5, 5, 7.5, 10, 20, 30,
27 40, 50, 60, 70, 80, 90, 100 };
29 TFile* pidFile = TFile::Open(
"../tracklets/REWEIGHTpid.root",
"READ");
30 Double_t c2Bins[] = { 0, 2.5, 5, 7.5, 10, 20, 30,
31 40, 50, 60, 70, 80, 90, 100 };
33 for (
Int_t i = 0; i < 1; i++) {
36 histName.Form(
"pidWeight_%s", (pdg == 211 ?
"pi" :
39 TH1* hist =
static_cast<TH1*
>(pidFile->Get(histName));
41 Warning(
"MakeWeight",
"pid histogram %s not found", histName.Data());
44 TH1D* out =
new TH1D(Form(
"w%d", pdg), Form(
"PID %d weight", pdg),
46 for (
Int_t j = 1; j <= out->GetNbinsX(); j++) {
47 out->SetBinContent(j, hist->GetBinContent(j));
48 out->SetBinError (j, hist->GetBinError (j));
53 TFile* strFile = TFile::Open(
"../tracklets/REWEIGHTstr.root",
"READ");
54 Short_t strs[] = { 321, 310, 3122, 3212, 3322 };
55 for (
Int_t i = 0; i < 5; i++) {
58 histName.Form(
"strWeight_%s", (pdg == 211 ?
"pi" :
64 pdg == 3322 ?
"xi" :
""));
65 TH1* hist =
static_cast<TH1*
>(strFile->Get(histName));
67 Warning(
"MakeWeight",
"strangeness histogram %s not found",
71 TH1D* out =
new TH1D(Form(
"w%d", pdg), Form(
"Strangeness %d weight", pdg),
73 for (
Int_t j = 1; j <= out->GetNbinsX(); j++) {
74 out->SetBinContent(j, hist->GetBinContent(j));
75 out->SetBinError (j, hist->GetBinError (j));
85 TFile* outW = TFile::Open(
"str.root",
"RECREATE");
Bool_t AddAbundanceWeight(Short_t pdg, const TH1D *h, UShort_t mode=0)
Bool_t AddStrangenessWeight(Short_t pdg, const TH1D *h, UShort_t mode=0)
void Print(Option_t *option="") const
void Draw(Option_t *option="")