I do not think it is merely notation problem. The present implementation assumes ONE loop over CloneArray rows. To implement what you want SECOND nested loop must be implemented. Then one has no problem with notation ;-) The only trouble each new calculation will require new notation. and we will end-up with some sort of "home" made language. May be it is simpler to use C++ instead (via CINT) directly and create loop ourselves. Cheers, Valeri ----- Original Message ----- From: "Volker Buescher" <buescher@fnal.gov> To: "Philippe Canal" <pcanal@fnal.gov> Cc: <roottalk@pcroot.cern.ch> Sent: Wednesday, June 20, 2001 11:59 AM Subject: RE: [ROOT] multiple arrays in TTree::Draw > > Hi Philippe, > > yes, I was guessing already that the notation might be the reason... I > have no clue what the issues are when parsing the strings in Draw(), but > from the users perspective I would find it natural to interpret > > Draw("mc_pt:reco_pt") > > as i vs. j, and then maybe provide a standard selection function > > Draw("mc_pt:reco_pt","pair(mc_pt,reco_pt)") > > that is true if i=j and therefore gets you back to the special case that > is currently the default. Not great, I know - I'm sure someone on this > list will have a better suggestion. > > Cheers, > Volker > > On Wed, 20 Jun 2001, Philippe Canal wrote: > > > Hi Volker, > > > > You are correct in pointing out that the Draw method of TTree currently > > provides the plotting of pairs: > > (mc_pt[0],reco_pt[0]) > > (mc_pt[1],reco_pt[1]) > > (mc_pt[2],reco_pt[2]) > > and do not provided for plotting every elements of mc_pt versus every > > elements of reco_pt. > > > > The issue is not an implementation issue but a notation issue. So far, > > Draw("mc_pt:reco_pt"); > > plot mc_pt[i] versus reco_pt[i]. We have not thought of a good notation > > to indicate that it should plot mc_pt[i] versus reco_pt[j], for all valid > > values of i and j. > > > > If you could help in determining a good notation, we should be able to > > implement it. (note that the notation should work also if the command line > > is Draw("mc_pt+reco_pt"); > > > > Cheers, > > > > Philippe Canal.\ > > > > -----Original Message----- > > From: owner-roottalk@pcroot.cern.ch > > [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Volker Buescher > > Sent: Wednesday, June 20, 2001 9:53 AM > > To: roottalk@pcroot.cern.ch > > Subject: [ROOT] multiple arrays in TTree::Draw > > > > > > > > Hi All, > > > > I keep running into an apparent limitation of the Draw method of TTree, > > and I would appreciate very much any advice on whether this is possible in > > root or whether it could be added in future versions. Here is an example > > of what I'm trying to do: > > I have two branches, each with several variable length arrays, > > e.g. arrays mc_pt[nmc], mc_eta[nmc] in one branch and reco_pt[nreco], > > reco_eta[nreco] in the other branch. Now I'd like to use Draw() on the > > command line to plot for each event a) every entry in mc_pt versus every > > entry in reco_pt and b) same as in a) but apply cuts like > > "abs(mc_eta-reco_eta)<0.1", such that only those pairs of mc_pt/reco_pt > > are plotted, for which that condition is true. > > > > As far as I understand, root only allows to plot pairs > > > > (mc_pt[0],reco_pt[0]) > > (mc_pt[1],reco_pt[1]) > > (mc_pt[2],reco_pt[2]) > > ... > > > > rather than all possible combinations - did I overlook something? Is there > > a way to do this without the inconvenience of using Loop()? If not, > > would it be possible to add this feature? > > > > Thanks! > > Volker > > > > >
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:49 MET