AliPhysics  fde8a9f (fde8a9f)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MakeRuben.C
Go to the documentation of this file.
1 
17 void
19 {
20  gSystem->AddIncludePath("-I${ALICE_ROOT}/include -I${ALICE_PHYSICS}/include");
21  gROOT->LoadMacro("AliAODTracklet.C+g");
22  gROOT->LoadMacro("AliTrackletWeights.C+g");
23 
26  weights->SetVeto(0x0);
27 
28  // --- pT weight ---------------------------------------------------
29  // Unity in all centralities and pT
30  // TH2D* cPt = new TH2D("cPt", "cPt", 1, 0, 100, 1, 0, 5);
31  // cPt->SetBinContent(1,1,1);
32  // weights->SetPtWeight(cPt);
33 
34  // --- Abundance weights -------------------------------------------
35  // We do not add any!
36 
37  // --- Strangeness weights -----------------------------------------
38  // We add simple constant weights
39  Short_t pids[] = { 321, // K^+/-
40  310, // K^0_S
41  3122, // Lambda
42  3212, // Sigma0
43  3322, // Xi0,
44  0 };
45  Double_t factors[] = { 1.5,
46  1.5,
47  3,
48  3,
49  3,
50  0 };
51  Short_t* pid = pids;
52  Double_t* fac = factors;
53  while (*pid) {
54  Short_t p = *pid;
55  Double_t f = *fac;
56  TH1D* h = new TH1D(Form("w%d", p), Form("PID %d weight", p), 1, 0, 100);
57  h->SetBinContent(1,f);
58  weights->AddStrangenessWeight(p, h);
59  pid++;
60  fac++;
61  }
62 
63  new TBrowser;
64 
65  // --- Write to file -----------------------------------------------
66  TFile* outW = TFile::Open("ruben.root", "RECREATE");
67  weights->Write();
68  outW->Write();
69  weights->Draw();
70  weights->Print();
71 }
72 /* @} */
73 //
74 // EOF
75 //
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:18