AliPhysics  32b88a8 (32b88a8)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MakeRuben.C
Go to the documentation of this file.
1 void
3 {
4  gSystem->AddIncludePath("-I${ALICE_ROOT}/include -I${ALICE_PHYSICS}/include");
5  gROOT->LoadMacro("AliAODTracklet.C+g");
6  gROOT->LoadMacro("AliTrackletWeights.C+g");
7 
10  weights->SetVeto(0x0);
11 
12  // --- pT weight ---------------------------------------------------
13  // Unity in all centralities and pT
14  // TH2D* cPt = new TH2D("cPt", "cPt", 1, 0, 100, 1, 0, 5);
15  // cPt->SetBinContent(1,1,1);
16  // weights->SetPtWeight(cPt);
17 
18  // --- Abundance weights -------------------------------------------
19  // We do not add any!
20 
21  // --- Strangeness weights -----------------------------------------
22  // We add simple constant weights
23  Short_t pids[] = { 321, // K^+/-
24  310, // K^0_S
25  3122, // Lambda
26  3212, // Sigma0
27  3322, // Xi0,
28  0 };
29  Double_t factors[] = { 1.5,
30  1.5,
31  3,
32  3,
33  3,
34  0 };
35  Short_t* pid = pids;
36  Double_t* fac = factors;
37  while (*pid) {
38  Short_t p = *pid;
39  Double_t f = *fac;
40  TH1D* h = new TH1D(Form("w%d", p), Form("PID %d weight", p), 1, 0, 100);
41  h->SetBinContent(1,f);
42  weights->AddStrangenessWeight(p, h);
43  pid++;
44  fac++;
45  }
46 
47  new TBrowser;
48 
49  // --- Write to file -----------------------------------------------
50  TFile* outW = TFile::Open("ruben.root", "RECREATE");
51  weights->Write();
52  outW->Write();
53  weights->Draw();
54  weights->Print();
55 }
double Double_t
Definition: External.C:58
Bool_t AddStrangenessWeight(Short_t pdg, const TH1D *h, UShort_t mode=0)
TSystem * gSystem
void Print(Option_t *option="") const
void Draw(Option_t *option="")
void SetMask(UChar_t mask)
Definition: External.C:212
void SetVeto(UChar_t veto)
short Short_t
Definition: External.C:23
void MakeRuben()
Definition: MakeRuben.C:2