end-of-line normalization
[u/mrichter/AliRoot.git] / PWGCF / EBYE / LRC / Test / TestPtN.C
CommitLineData
a65a7e70 1{
2 gSystem->Load("libPWG2LRC.so");
3 TH1D *gaus = new TH1D("source","source hist",1000,-5,5);
4 gaus->FillRandom("gaus",10000);
5 TH2D *source = new TH2D("PtN","PtN Test",100,0,100,100,0,5);
6 TH2D *err = new TH2D("err","errl hist",100,0,100,100,0,1);
7 Double_t x, y;
8 for (Int_t i=0;i<10000;i++)
9 {
10 x = 10 * (gaus->GetRandom() + 5);
11 y = 0.678 * (x/20.0 + gaus->GetRandom());
12 //Create source 2D histogram with correlation coefficient 0.678
13 source->Fill(x,y);
14 err->Fill(x,1/x);
15 }
16 //Create TNN class encapsulated NN correlation algorithms
17 //2D histogram pass into TNN constructor
18 AliLRCPtN final1("name", source, 0.35, err);
19
20 TCanvas *c1 = new TCanvas("c1","c1",800,1000);
21 c1->Divide(3);
22 c1->cd(1);
23 source->Draw();
24 c1->cd(2);
25 final1.Draw_abs();
26 c1->cd(3);
27 final1.Draw_rel();
28 c1->cd();
29
30 AliLRCPtN final2;
31 final2.MakeHistogramm("name", source, 0.35, err);
32
33 TCanvas *c2 = new TCanvas("c2","c2",800,1000);
34 c2->Divide(3);
35 c2->cd(1);
36 source->Draw();
37 c2->cd(2);
38 final2.Draw_abs();
39 c2->cd(3);
40 final2.Draw_rel();
41 c2->cd();
42
d03e5de4 43}