ROOT logo
{
    gSystem->Load("libPWG2LRC.so");
 	TH1D *gaus = new TH1D("source","source hist",1000,-5,5);
    gaus->FillRandom("gaus",10000);
    TH2D *source = new TH2D("PtN","PtN Test",100,0,100,100,0,5);
    TH2D *err = new TH2D("err","errl hist",100,0,100,100,0,1);
	Double_t x, y;
    for (Int_t i=0;i<10000;i++) 
	{   
	    x = 10 * (gaus->GetRandom() + 5);
	    y = 0.678 * (x/20.0 + gaus->GetRandom());
	    //Create source 2D histogram with correlation coefficient 0.678
		source->Fill(x,y);
		err->Fill(x,1/x);
    }
    //Create TNN class encapsulated NN correlation algorithms
    //2D histogram pass into TNN constructor
	AliLRCPtN final1("name", source, 0.35, err);

   TCanvas *c1 = new TCanvas("c1","c1",800,1000);
	c1->Divide(3);
	c1->cd(1);
	source->Draw();
	c1->cd(2);
	final1.Draw_abs();
	c1->cd(3);
	final1.Draw_rel();
	c1->cd();

	AliLRCPtN final2;
        final2.MakeHistogramm("name", source, 0.35, err);

   TCanvas *c2 = new TCanvas("c2","c2",800,1000);
	c2->Divide(3);
	c2->cd(1);
	source->Draw();
	c2->cd(2);
	final2.Draw_abs();
	c2->cd(3);
	final2.Draw_rel();
	c2->cd();

 TestPtN.C:1
 TestPtN.C:2
 TestPtN.C:3
 TestPtN.C:4
 TestPtN.C:5
 TestPtN.C:6
 TestPtN.C:7
 TestPtN.C:8
 TestPtN.C:9
 TestPtN.C:10
 TestPtN.C:11
 TestPtN.C:12
 TestPtN.C:13
 TestPtN.C:14
 TestPtN.C:15
 TestPtN.C:16
 TestPtN.C:17
 TestPtN.C:18
 TestPtN.C:19
 TestPtN.C:20
 TestPtN.C:21
 TestPtN.C:22
 TestPtN.C:23
 TestPtN.C:24
 TestPtN.C:25
 TestPtN.C:26
 TestPtN.C:27
 TestPtN.C:28
 TestPtN.C:29
 TestPtN.C:30
 TestPtN.C:31
 TestPtN.C:32
 TestPtN.C:33
 TestPtN.C:34
 TestPtN.C:35
 TestPtN.C:36
 TestPtN.C:37
 TestPtN.C:38
 TestPtN.C:39
 TestPtN.C:40
 TestPtN.C:41
 TestPtN.C:42
 TestPtN.C:43