Hello,
I have spent half an hour trying to figure out how to do in ROOT someting I know
how to do in PAW without sucess … ;8-(
I want to place the text or Legend on the histogram canvas dynamically.
Say, I fit the exponential decay histogram, get the lifetime and now, in
a root code want to write this fitted lifetime value in the corner of the canvas.
In PAW I would use the substitution scheme using [] and $ like in
macro phase_space 1=1 2=401 3=1001 4=2001 5=-65 6=-100
…
zp=[5]
zt=[6]
…
text [zp] -0.107 [zt] 0.5
…
How do I do similar things in ROOT?
For example, in the command
l.DrawLatex (70,0.8*h6002->GetMaximum(),"#tau_{#pi}=25.6#pm 0.3 ns");
how would I avoid hard-wireng 25.6 and 0.3 in text and use the actual
fitted values from the code preceeding l.DrawLatex?
Cheers, Emil