Re: [BLAST_ANAWARE] ROOT and user functions...

From: Tancredi Botto (tancredi@mitlns.mit.edu)
Date: Wed Jul 23 2003 - 10:36:53 EDT


the bottom line is that is always easier to do it from a program,
rather than the command line.

There is a rough prototype function: pro2003/analysis/eff.C

-- 
________________________________________________________________________________
Tancredi Botto,  		phone: +1-617-253-9204  mobile: +1-978-490-4124
research scientist		MIT/Bates, 21 Manning Av    Middleton MA, 01949
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

On Wed, 23 Jul 2003, Aaron Joseph Maschinot wrote:

> > using root is a lesson in limitation: whatever it is you want to do > probably isn't an option. instead, you'll have to think of an ingenius > way to do whatever it is you want with the existing options. for example, > in order to plot the following: > > atl/atr, if acl>0 > atr/atl, else > > you could type the following: > > lr->Draw("(acl>0)*atl/atr + (1-(acl>0))*atr/atl"); > > logical conditions, such as "acl>0" evaluate to either 1 (true) or else 0 > (false). > > there is probably an even more clever way to do conditional plots on the > same axis, but i don't know it. and, of course, the above conditional > method gets real old real quick if you have loooonng strings you are > typing in. > > aaron > > > > > > > > On Wed, 23 Jul 2003, Kevin McIlhany wrote: > > > I have been trying to start an analysis and was > > hoping to find the same functionality I used to have > > when using PAW, namely, the ability to manipulate a > > "user function" in an ntuple. > > Normally, one might draw a variable such as: > > lr->Draw("acr") > > I was hoping to have a function I could treat as an ntuple variable > > which is made up from the lr ntuple variables, such as: > > lr->Draw("myfunc.cc","myfunc.cc>10") > > > > While looking on the web, I saw references to this discussion on > > RootTalk about one year ago, with Rene Brun promising that this > > functionality would be implemented in a newer version. My question > > is... > > Has anyone achieved this at BLAST and if so, how? > > I assume we are using Root v3.02c, but even the release notes for > > v3.03/9b do NOT indicate that user functions have been added yet (at > > least they dont mention it!). > > Any thoughts? > > > > Also, in another attempt at finding something of a similar > > functionality, I found a reference to a function called MakeCode(). > > Unfortunately, there is virtually no documentation that I could find on > > the web regarding this code, but it is CLAIMED that this is capable of > > making a user function. Any ideas? Has anyone successfully used this > > capability? If so, how? > > > > > > I could really use this capability as it would allow me to make a > > conditional variable in the ntuple, such as: > > > > f= atl/atr if acl>0 > > else > > f= atr/atl > > > > lr->Draw("f") > > > > something like that would be useful. > > > > -Kevin > > > > >



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:29 EST