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??".
Ahem.
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!
Holy crap. I want your job.
When I write SQL queries it's to ask something on the order of "how many parts make this unit do blah..." Meanwhile you are sitting there asking an SQL engine fundamental questions about the universe. Excellent!
Thanks for the great post. Especially right near the end (?) of quantum diaries.
*insert misplaced grumblings about using MS products here*
Cheers!
Posted by: Matt B. | December 27, 2005 at 11:19 PM
Are you going to keep the blog going after the end of the QD project? That would be cool!
Posted by: Rob | December 28, 2005 at 03:08 AM
Hey Gordon :-) Do you think that will be useful? Or was it just fun?
And keep your blog going!!!!
Have a nice new year, Helge
Posted by: Helge | December 28, 2005 at 03:48 AM
Hi all! Thanks! I do plan to keep blogging (and taking pictures). And Matt, thanks -- and I wish this tool was as deep as that; unfortunatley, it is asking the question of Monte Carlo -- so it is what we think is the secrets of the universe... which I guess means that it isn't that much of a secret... Now, some other people tried to do this with real data -- and that was really cool.
Posted by: Gordon Watts | December 29, 2005 at 04:19 AM
Helge, I have no idea if it will be useful. I definately had a goal in mind. My current plan is to add a few more minor features to it, and then just carry it around on my laptop for a while and see how much I use it. And see how many things I really want added to it to use it the way I want to use it.... My biggest problem so far is I keep trying to make it into something it isn't (a general purpose analysis tool). That requires way more than 3 days of work and thought... And that would be re-inventing ROOT. Baaaad.
Posted by: Gordon Watts | December 29, 2005 at 04:22 AM