I've always wanted to put "Smackdown" in the title of a blog entry. Just no excuse till now. Guess I shouldn't let that stop me!
This entry is a bit technical. Sorry! Every Christmas I try to do something short and quick that has no real relationship to what I need to do to get my work done, but some off-the-wall idea that I've had over the past year.
I've always been annoyed at how hard it was to ask a question like "how often does a b quark decay to a muon?" of the Monte Carlo truth. The truth is stored in ROOT format (in DZERO), but of course, asking a question similar to the above involves writing code -- or at the very least, writing some sort of a complex TTree::Draw method call. Nothing that is really conducive to quick back-of-the envelope questions.
About a week ago I started wondering why you couldn't draw out what you wanted to know and have the computer generate the code to actually determine the answer.
Unfortunately, somewhere along the way, this got perverted further to "wonder how well a database does for this sort of thing as compared to ROOT??".
So, this was about 3 days of work to get it going, another day trying to compare to ROOT and write it up, and another day to upload the zip files (Home upload connection slooow!).
The GUI summary: the GUI was way simpler to ask questions of -- intuitive, dare I say (something I definitely do not find using ROOT - but it depends on how you work!). On the other hand, it is easy to understand how the GUI restricts flexibility (at least as I've written it). For example as soon as I wrote this I wanted to ask "how many times does the b decay to a muon with at least pt of 1 GeV". Once I'd finally written the ROOT code to do the first question, adding the pT question is trivial. No so with the GUI (current version does not do that).
The performance summary: ROOT wins big on disk space and consistency (no matter what I asked, it always took 20-30 seconds to answer). The database's first query would take about 30 seconds, but after that it was running in 2-5 seconds for each query.
You can see details of all of this over at another web page.
I can't believe Christmas is almost over!