How to understand the TProfile

As the example:

{

TCanvas *c1 = new TCanvas("c1", "Profile example",200,10,700,500);
hprof = new TProfile("hprof",
"Profile of pz versus px",100,-4,4,0,20);
Float_t px, py, pz;
for ( Int_t i=0; i<25000; i++) {
gRandom->Rannor(px,py);
pz = px*px + py*py;
hprof->Fill(px,pz,1);
}
hprof->Draw();
}

It mean that ,it will fill mean pz for each px bin.How about the calculation of mean pz value? Does it mean: if px = 1 and pz =1 , 2 , 3, these three value. After fill, the pz=mean pz=(1+2+3)/3=2 in TProfile?

TProfile

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.