Store and plot an array embedded into a vector using TNtuple

Hi,

I am trying to add aprocess generated by pythia in a tree. I want to list variables like Pt, E etc in a NTuple named '‘data’. But with that I want to add number of events generated (Nevents) in the process in same NTuple.

Of course number of entries in Nevents and all other variables like Pt, E will be different and it is giving me error while combining these two things.

I have posted previous question but it was for TTree and not for TNtuple. Is it possible to add such things in same NTuple?

-------This was using TTree---------------
[url]How to store and plot an array embedded into a vector

Also please check attached file. That is what I want to produce using NTuple.

Thank you.
qcd.root (24.1 KB)

TNtuple is “A simple tree restricted to a list of float variables only.”

Dear Wile,

So is it not possible to make my desired NTuple? Is there any other way apart from I tried previously?

Thank you.

Try to ask the “Contact” persons of the “CMS HEP Tutorial” for the source code which they use to create their trees.

Okay. I will ask. Thank you.