How to plot d2N/dpT*dy or in general any derivative term as histogram?

I have the number of deuterons and their corresponding pT in an event .Can anyone explainn how to plot the d2N/dpT*dy vs pT for tprofile histogram?

Hello, and welcome to the ROOT forum!

If you are looking about information about profile histograms, please find some documentation here and here and a tutorial.

I’m not sure if this addresses your problem though. Perhaps you can expand a bit on your problem, possibly with some code sample that you are working on?

Cheers,
Jakob

Hi jacob,

Thanks for the help regarding the profile histogram but what I am looking for is how to plot a 2nd derivative terms like d2N/dpTdy or in general d2x/dydz using some sort of binning variable x in small stepsizes of y and z and then multiply dx/dy with dx/dz to get desired 2nd derivative term and to fill-in tprofile as you have shared the links above?

Hi,

You need probably to convert your histogram to a function, represented in ROOT by the TF1 class, using smooting or some linear interpolation. Then afterthat you can compute second derivatives and plot them.
An example on how to create another TF1 which is the derivative of the previous one is
ROOT: tutorials/math/exampleFunctor.C File Reference.

If in this linke example you use TF1::Derivative2 instead of TF1::Derivative you will get the second derivative function

Cheers

Lorenzo

Hi,
Thank you for the help,it should work.