Conversion of histograms in Tree

Dear Developers,

I want to make a Tree of my .root file, Kindly help me to store the histograms in terms of Tree.
The file which I want to convert in the form of Tree is output_Veto.root so that it will look like a sample file that is May26_2.root (/afs/
I am creating output_Veto.root using a macro

.output_Veto.root (9.5 KB) (10.0 KB)



I think I do not exactly get what you are trying to achieve. Could you clarify perhaps?


In simple I want to convert output_veto.root file exactly as May26_2.root file
In output_veto.root file I have different parameters i.e vetoMu_pt, VetoMu_eta, VetoMu_phi. The same parameters are in May26_2.root file but thay are stored in a Tree. I want output_veto.root to be exactly as May26_2.root file


so you would like to unpack histogrms, entry by entry, into ttrees?


yes exactly I want this


I think this is not possible. The histogram is a form of data reduction in some sense the information about the original entries is not available anymore (by construction).


Then there is some other way of getting histograms. Like in tree we first define a tree and then get all branches as
TTree t = (TTree)f->Get(“demo/AnaTree”);


How can I call different parameters instead of calling as a histograms

I am sorry I do not understand the question.

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