Hi Aaron,
Sorry for the long delay to answer this mail. I did not see your original mail.
If instead of:
aP2D->ProjectionX("prox",20,20)->Draw();
you do:
aP2D->ProjectionX("prox",20,20)->Draw("e");
you will see the error bars.
If instead of;
aP2D->ProjectionX("prox",20,21)->Draw();
you do:
aP2D->ProFileX("prox",20,21)->Draw();
you will obtain what you required for your second option.
Rene Brun
> Rooters,
>
> Lately I've been using the very useful TProfile2D type of histogram,
> and would find it very convenient to be able to use Profiles of these
> histograms.
> However, projections of TProfile2D's do not behave in the expected way. (I'm
> using 3.05.02 on Linux)
>
> Using the example below, a Projection of just one bin has the values
> from
> that bin, but no errors. It would be nice to have the errors displayed.
>
> Next, when projecting over more than one bin, one gets the sum of
> the
> bins included. Given that it is a Profile histogram, it would make more
> sense
> to get the average, with the errors calculated in the same way as the
> original
> Profile histogram.
>
> regards,
> Aaron Roodman
>
> TProfile2D* aP2D = new TProfile2D("aP2D","test
> Profile",40,-4.,4.,40,-4.,4.);
> for
> (Int_ti=0;i<10000;i++){aP2D->Fill(gRandom->Gaus(),gRandom->Gaus(),gRandom->
> Gaus());}
> aP2D->ProjectionX("prox",20,20)->Draw();
> aP2D->ProjectionX("prox",20,21)->Draw();
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET