25 gSystem->AddIncludePath(
"-I${ALICE_ROOT}/include -I${ALICE_PHYSICS}/include");
26 gROOT->LoadMacro(
"AliAODTracklet.C+g");
27 gROOT->LoadMacro(
"AliTrackletWeights.C+g");
31 Double_t c2Bins[] = { 0, 2.5, 5, 7.5, 10, 20, 30,
32 40, 50, 60, 70, 80, 90, 100 };
34 TFile* pidFile = TFile::Open(
"../tracklets/REWEIGHTpid.root",
"READ");
35 Double_t c2Bins[] = { 0, 2.5, 5, 7.5, 10, 20, 30,
36 40, 50, 60, 70, 80, 90, 100 };
38 for (
Int_t i = 0; i < 1; i++) {
41 histName.Form(
"pidWeight_%s", (pdg == 211 ?
"pi" :
44 TH1* hist =
static_cast<TH1*
>(pidFile->Get(histName));
46 Warning(
"MakeWeight",
"pid histogram %s not found", histName.Data());
49 TH1D* out =
new TH1D(Form(
"w%d", pdg), Form(
"PID %d weight", pdg),
51 for (
Int_t j = 1; j <= out->GetNbinsX(); j++) {
52 out->SetBinContent(j, hist->GetBinContent(j));
53 out->SetBinError (j, hist->GetBinError (j));
58 TFile* strFile = TFile::Open(
"../tracklets/REWEIGHTstr.root",
"READ");
59 Short_t strs[] = { 321, 310, 3122, 3112, 3222, 3312 };
60 for (
Int_t i = 0; i < 6; i++) {
63 histName.Form(
"strWeight_%s", (pdg == 211 ?
"pi" :
72 pdg == 3322 ?
"xi" :
""));
73 TH1* hist =
static_cast<TH1*
>(strFile->Get(histName));
75 Warning(
"MakeWeight",
"strangeness histogram %s not found",
79 TH1D* out =
new TH1D(Form(
"w%d", pdg), Form(
"Strangeness %d weight", pdg),
81 for (
Int_t j = 1; j <= out->GetNbinsX(); j++) {
82 out->SetBinContent(j, hist->GetBinContent(j));
83 out->SetBinError (j, hist->GetBinError (j));
93 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="")