TProfile from a TProfile2D

Hello,

is there a method and/or a simple procedure to get from a TProfile2D filled with something like :

loop on x and y
{
prof2d->Fill(x,y,value);
}

a TProfile (or a TH1…) equivalent to what I would get by doing:

loop on x and y
{
prof->Fill(y,value);
}

I have the impression that none of the Projection… Profile… methods do the job but, before writing a small macro to do that by looping on the bins of the TProfile2D, I would like to be sure I have not missed something.

                                            Thanks and ciao

                                                   Andrea

Hi Andrea,

Unfortunately this method does not exist, probably it would be good to re-implement ProfileX or ProfileY for the TProfile2D instead of using by default those of a TH2 which will not work for a profile histograms.

Ciao, Lorenzo