It's been a long time since I've used paw, so I may be getting my paw syntax mixed up. There was a way in paw to define a histogram and then fill it using an ntuple command. Something like 1h 10 "histo10" -100 100 100 nt/pl 10 x and paw would fill in histogram 10 with x. Basically what I want to do is define the scale of the histogram instead of letting the ntuple or tree function figure out the scale of the histogram automatically for me. For example, let x be a sample of number, which will generate a gaussian distribution of sigma 1 centered at 0. Let y be a sample of numbers, which will generate a gausssian distribution of sigma 1 centered at 10. There are only about 1000 samples of x and y, then if I do tree->Draw("x"); tree->Draw("y","","same"); The y values will be off scale. I would like to be able to define a histogram TH1F myhist("myhist","myhist",-3,13,16); and then get the tree->Draw() command to fill myhist. Can I do this without resorting to tree->MakeClass(); ? Cheers. Steve. On Nov 22, 5:21pm, Valeri Fine (Faine) wrote: > Subject: Re: [ROOT] nt/fill > > > > What's the root equivlent to the nt/fill command? > > There is the method: > > TTree::Fill() > see: http://root.cern.ch/root/htmldoc/TTree.html#TTree:Fill > > However I am not sure I did get your question. > What did you call "nt/fill" ? > > PAW says: > > PAW > nt/fill > *** Unknown command: nt/fill > PAW > > > > Or, if I do a > > tree->Draw("x:y>>myplot"); > > > > Is there a way of defining the axis of myplot? > > > > "myplot" is your 2d histogram: > http://root.cern.ch/root/htmldoc/TH2.html > > The last os derived from > http://root.cern.ch/root/htmldoc/TH1.html > and inherits TH1 properties as well. > > The method > > http://root.cern.ch/root/htmldoc/TH1.html#TH1:SetMaximum > > can be used to define z-scale with 2d hisrogram . > x and y scales are defined by "myplot" TH2F class constructor. > > > > Cheers. Steve. > > > > >-- End of excerpt from Valeri Fine (Faine)
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:37 MET