couet
7
{
gStyle->SetOptStat(0);
TCanvas *c1 = new TCanvas("c1","exa_CJUST",300,10,400,400);
TH2F *hpxpy = new TH2F("hpxpy","py vs px",40,-4,4,40,-4,4);
// Fill histograms randomly
TRandom3 randomNum;
Float_t px, py;
for (Int_t i = 0; i < 25000; i++) {
randomNum.Rannor(px,py);
hpxpy->Fill(px,py);
}
hpxpy->SetMaximum(200);
Double_t zcontours[5] = {0, 20, 40, 80, 120};
hpxpy->SetContour(5, zcontours);
hpxpy->GetZaxis()->SetTickSize(0.01);
hpxpy->GetZaxis()->SetLabelOffset(0.01);
gPad->SetRightMargin(0.13);
hpxpy->SetTitle("User contours, CJUST");
hpxpy->Draw("COL Z CJUST");
}