InsectNation

Home > Articles

Articles

Top mass measurements and MC definitions -- an inexpert precis

Posted by Andy Buckley on Feb 28, 2014

I was just recently notified that the world top mass combination uses “my” MCnet review paper on MC generators to justify stating that the definition of the top quark mass used in all (!) event generators is equivalent to the “pole” mass.

I’ve heard that statement very often, but not backed up by anything more concrete, so I was interested to read this section of the paper (Appendix C, starting on p184 of the PDF), which turns out to be rather good, interesting, and elegantly presented. Not to mention slightly embarrassing that I hadn’t read it before, given that it has my name on the front! (In my defence, I did write some of this paper, just not that bit. I suspect most of the authors haven’t read everything in it.)

Anyway, it definitely does not say that MC mass equals pole mass, so I thought it might be interesting to post my explanation of what it does say, at least as far as a dumb fence-sitting experimentalist/MC guy like myself can understand…

Continue reading…

Science TV is too nice

Posted by Andy Buckley on Apr 14, 2013

Well well well, another blog post, eh? So soon: it’s only been… erm, two years. Oh. Well I never promised to be prolific. This one’s come about because I grumbled briefly on Twitter about the nature of (British) pop-science TV and immediately hit the restrictions of that medium. Twitter is a wonderful way to share neat things that you find online, and to make pithy soundbites & jokes (and for describing what you’re eating, the form of public transport that you happen to be on, listing film names with comic vegetable name substitutions…), but for exploring a non-trivial issue 140 characters is, to put it mildly, a limitation. I have difficulty fitting one of my normal sentences into 140 characters. So of course I came across as a whining idiot, prompting the reply “Yeah, we really should do more about how shit it all is. You don’t see that tone ANYWHERE” from Dara O’Briain. Well, not remotely what I meant, but who can blame him? So here’s an attempt at a more coherent and nuanced version that hopefully doesn’t make me come across as an anti-science, axe-grinding git. But perhaps as a slightly grumpy science nerd, which is fair enough.

Continue reading…

Academic journals aren't helping us to do science anymore

Posted by Andy Buckley on Feb 13, 2011

Having recently concluded a long-ongoing saga to get the first ATLAS underlying event study both through the experiment’s internal review procedures and then into the perverse format demanded by the academic journal, Physics Review D, to which we submitted it, it seems an apt time to offer a few comments on the state of the sacred academic publishing and peer review process.

Continue reading…

It's a bug, not a feature, René

Posted by Andy Buckley on Dec 27, 2010

I’ve had my attention drawn to this reply to a ROOT bug report, which I think highlights a serious problem with how the ROOT project interacts with the LHC experiments. In short, someone contacted the ROOTtalk mailing list to inform them that ROOT’s calculation of weighted means is incorrect if there are negative weights involved. There is a well-defined procedure for calculating weighted means, and in fact it’s dead simple. There’s no reason to not get it right. This is a bug report, about a significant numerical error in just about the simplest statistical quantity that anyone might want to calculate: any statistical analysis tool worth bothering with would provide a bug fix as fast as possible. So how did ROOT respond?

Well, the response from René Brun, the ROOT project leader, is that ROOT have “no plans to change this algorithm”. This is absurd: the LHC experiments depend on ROOT to provide them with accurate statistical results. Errors in ROOT mean mistakes in the LHC physics programme: this is not a feature request that can be turned down because it doesn’t fit with ROOT’s plans, it’s a bug which needs to be fixed. That ROOT’s management appears to see no reason to get simple calculations correct, and that errors this simple still exist after nearly 20 years of development, is an indictment of ROOT’s relationship with the LHC programme… and of how CERN and the experiments have dropped the ball in making ROOT a useful tool targetted to LHC physics. I’ve often heard comments that ROOT is all about empire-building and CERN politics rather than about good science – I’d rather not believe that, but examples such as this make it hard to draw a more appealing conclusion. The nicest thing I can say is that René apparently hasn’t understood that this is a bug. If I were feeling more conspiracy-minded I’d interpret it as saying that he doesn’t care if ROOT is right, as long as it’s used. And it is certainly used – ROOT has a virtual monopoly over LHC physics data analysis, without delivering the sort of quality that such a position demands.

Continue reading…

Back to life

Posted by Andy Buckley on Dec 24, 2010

I’ve never been the most active blogger, but 2 years between posts seems a little excessive, even to me! I wish I could explain the cornucopia of reasons for this, but I’ll just point a couple of accusatory fingers at the extraordinary busyness of life (in the intervening time I moved to Edinburgh, the LHC restarted, and my working life has generally been batshit insane) and general frustration at my server setup. You may also be frustrated with the slowness of this server: turns out that running a mail server and a Rails application on a 256 MB virtual server puts me deep into the swap memory zone and site performance accordingly drops into the region marked “painful”. I’d have loved to fix this 2 years ago, but a) I’ve written enough web apps in the past to not want to make another half-assed one, and b) did I mention work being batshit insane? Anyhoo, someone asked me at a recent meeting when I was going to start blogging again, and after the initial shock of discovering that I have some sort of niche audience I decided that I should start venting my spleen in more substantial ways than the 140 chars offered by Twitter.

A bit of recent server upgrading means that this site is not quite as slow as it has been – I’m enormously impressed by the service from Slicehost, by the way – and I’m going to try and replace Radiant with something a little more fun, speedy, and memory-efficient in this little pre-2011 gap. Suggestions of CMSes/blog engines with user comments, picture galleries, code highlighting support, etc. and support for static content (such as this site’s Cambridge night climbing content) would be much appreciated. Oh, and because I’m a picky person and have not found Ruby/Rails to be a terribly pleasant development experience, being based on Python would also be a big bonus!

Removing Beamer nav widgets

Posted by Andy Buckley on Jan 21, 2009

Here’s a handy tip for all the people I see giving talks made with the super-genius LaTeX Beamer package, all of whose slides have a row of never-used navigation widgets (back, forward, start, end, next frame…) getting in the way of the slide content. It’s dead easy to remove them, and then (if you’re like me) you can finally sleep at night. Just put this in your Beamer document preamble:

\mode<presentation> {
\setbeamertemplate{navigation symbols}{}
}

Voila — no more silly nav crap! You will now be the envy of obsessive-compulsive, LaTeX fiend scientists everywhere you go!

A week in the land of contradictions

Posted by Andy Buckley on Nov 22, 2008

It’s the end of another busy week. Work life has been busy to the point of insanity recently, burrowing its way into every available bit of spare time… if you consider every weekend since mid October to be spare time rather than “essential time”, that is. I’m actually inclined to the latter view: while happy to declare that my work is captivating and inspiring, some downtime is definitely needed. In the last month I’ve been to two week-long conferences in Italy, snatched a week back in Durham and then spent the last week in Chicago. After one more week in Durham, in which to pay some attention to demonstrating and marking Frank’s excellent new computational physics course, I’m off on my travels again, this time to CERN for a week. And then it’s Christmas and skiing; January is looking a bit crazy, and I’m trying not to think about that. Fortunately Jo has been a star and given me some (unearned) slack, but this schedule isn’t really fair on either of us: I think I’ll be imposing a more restricted travel schedule in the New Year and hopefully sending some collaborators out to do the salesman thing instead ;)

Anyway, reflections on the past week: I have to say, I’ve really enjoyed Fermilab. Most people seem to bitch about the “boring site”, the strip malls of West Chicago, the weather and anything else that springs to mind, but I must be a bit funny in the head because I like it all. Okay, not the strip malls — a bit of restriction on the suburban planning process would have been welcome — but here’s a list of hat I’ve been up to, other than giving talks and coding up experimental analyses in Rivet:

Continue reading…

Burying the hatchet

Posted by Andy Buckley on Nov 17, 2008

“Ah, the famous Andy Buckley. Or perhaps infamous, no?”. When a dapper French gent at a statistics conference addresses you this way, I guess it’s normal to feel a bit perturbed, particularly when you’ve devoted a serious chunk of time in the last few years to publicly demonizing their work. Really, I suppose it’s maybe a minor miracle that Rene Brun and I haven’t crossed paths before now — although I guess this is largely to do with me being keen to avoid a fight.

Continue reading…

XML: restraining the knee-jerk reflex

Posted by Administrator on Nov 10, 2008

XML is a useful technology, sometimes: that’s about as positive as I can be about it these days. While there was a period when I got quite excited about the idea of a standard syntax for, well, everything, time tempers such enthusiasm. See, 90% of the time, XML is just too damn cumbersome. When what you want to say is

Param1 = 3

or something of that complexity, then having to write

<param name="Param1" value="3"/>

is just a bit hefty. Anyone who’s ever tried using Ant or Maven will surely sympathise with the idea that XML is a pain in the arse way to write make-files. And XSL transforms? Phew, glad I’m not going back into that arse-end of software engineering gone mad. It’s also a pain in the arse to read XMLified data in C++ or Fortran. Hell, even Python and Java make you jump through SAX or DOM-shaped hoops in their lowest common denominator implementations! Frankly, XML is a serious candidate for “no silver bullet”-type debunking: merely wrapping everything in angle brackets actually solves nothing, even if it looks totally SOAP-AJAX-Web 2.0, dude. Much of the time, something simpler is quite enough.

Continue reading…

The God Delusion

Posted by Andy Buckley on Nov 09, 2008

I’ve recently finished reading Richard Dawkins’ The God Delusion. I was pretty determined to not read it when it first came out since a) I object to specifically indulging in writing that I know I’ll agree with — I suspect that searching out compliant opinions leads to foam-mouthed Daily Mail reader behaviour and obstinate old man disease, and b) Herr Dawkins has been on a bit of an ego/PR trip in recent years, in an area which he’s not really all that qualified to talk about. But then, as he points out in the book, it’s not like religious “authorities” are really qualified to say anything meaningful about well… anything, so when Jo got a copy, I decided to steal it and finish it before her ;)

Continue reading…

Bundling LaTeX for arXiv submission

Posted by Andy Buckley on Sep 26, 2008

I always have trouble submitting papers to the arXiv, on account of my tendancy to use a whole bunch of style files etc. that aren’t in the standard arXiv collection. They aren’t usually in my document source directory, either, but are spread around my system in various texmf trees. Accordingly, getting papers to upload is a pain (and if you try to upload just a PDF, arXiv detects that the PDF was made with TeX and refuses to accept it! Dang, foiled!)

So here’s the method that seems to work for me.

1. Get the snapshot package, and use it in your document with the usual \usepackage{snapshot}
2. Run latex etc. on your document until it’s happy (note, I use pdflatex pretty much exclusively these days, but arXiv will use good o’ DVI-producing latex, so that’s what you need to use when producing your submission)
3. If your document was called mydoc.tex, you will now have a dependencies file, mydoc.dep. This can be used to bundle your source files for submission. To do this, get bundledoc.
4. Run bundledoc on the deps file — you may need to provide an explicit config file. Here’s my command: bundledoc --config=$HOME/local/texmf/tex/latex/bundledoc/tetex.cfg mydoc.dep 5. You now have a tarball or zip archive, depending on whether you used the TeTeX/TeX Live or MikTeX config file. This should be okay for uploading to arXiv. Happy bundling. Python indentation revisited Posted by Andy Buckley on Sep 23, 2008 Amazingly, the article on Python indentation I bashed out a year ago at the Manchester parallel programming workshop has become the most popular thing on this website. Even more than all the lovely night climbing stuff: it seems the ‘net is an even stranger place than I thought! It’s also been nice to have the occasional bit of fan mail about the article (and a “you’re wrong” mail, which is fine, except that it really missed the point and got into a fight with the tabs-vs-spaces straw man). Anyway, I was thinking about finally putting my head above the parapet and trying to suggest an explicit block ending scheme to the Python dev list, when I found this mail thread, the first of which which goes through all the same experiences and reaches exactly the same conclusions as I did some 13 years later. Blimey — what a way to be behind the times! George Reynolds seems a fully sane individual in my view, of course, and even manages to mention the problem of using Python where indentation is inconvenient/impossible, or even where the program must be expressed on a single line: I have been considering adding this to my own article, if I could manage to do so without cluttering, but I’ll now leave George as the definitive authority. The pragmatic reason for this post (there is one, really) is that Guido van Rossum himself chips into the debate, and even provides the “pindent” script for converting (legally-indented) Python programs to an explicit block scheme and back. A shame that the suggestion that such a thing be included in the Python interpreter never came to anything… if it hadn’t been for the ugly “comment end block”, this could have changed the face of Python some 10+ years ago. Now, however, I think we’re probably stuck with what we’ve got. Let’s see if I can get up the courage to bring this issue up for Python 3000! Monte Bianco Posted by Andy Buckley on Sep 04, 2008 Alors… another long time since posting but content yourselves with the knowledge that I’ve mostly been busy but not in the sort of way that I feel compelled to tell y’all about. Nyah. Anyway, I recently had a “working” holiday masquerading as a Times photographer for Tom Whipple’s recent article about Mont Blanc. A good wheeze — I jetted to Geneva with (Hardcore) Dave Williams, met Tom and Al Young and then proceeded to spend the next few days running ourselves ragged getting a bit of practice and acclimatisation: with an intention to get up Mt Blanc by the end of the week we only had 4 days for preparation! We got rained off the Chapelle de la Gliere just as it was getting interesting, but the weather behaved itself on the second day and we had a perfect day on the Aig de la Perseverance that at least convinced me that months of no climbing hasn’t hurt my ability to swing around on alpine V multipitches too much. So far so good. After a late descent, we popped back down to Chamonix the next morning and by evening were up high again — this time camping on the glacier at the Col de Midi as a huge thunderstorm came in. Very impressive, if not exactly ideal… well over a foot of snow fell on the tent during the night, making it bulge disturbingly until we knocked it off! Oh well: with time so short there wasn’t much of an alternative. Unfortunately I suffered from my first altitude sickness during the night, so Dave and I canceled our intentions of climbing either the Chere or Jager Couloir on Mt Blanc du Tacul: a real pity on both counts. By the time I was able to move, Anna Grocott had come up from Cham and we climbed the Cosmiques Ridge back up to the Midi, encountering a dangerous and arrogant twat of a guide on the way. Having watched him send novice clients down an abseil off a jammed overhand knot, I’m severely put of the prospect of hiring a guide for any trade routes: while most are excellent and safe climbers, there are some extremely bad examples around. I was still feeling pretty crappy from my altitude sickness, and the snow stompy bits of the Cosmiques had been disproportionately hard work, given that I had climbed the rock pitch bits pretty effectively with a heavy pack and not felt out of breath. I felt better on getting back to the valley, but in retrospect we suspect I had a chest infection that was stopping me from breathing properly: I certainly felt like I was repeatedly burning up my anaerobic reserves and then crashing, and trying to breathe deeply made me hack and cough. It’s so obvious in retrospect! The next day, after a night camping in Cham, we took the Mt Blanc tram to Ni d’Aigle and hiked up to the Gouter Hut on the Mt Blanc normal route via the Grand Couloir and Gouter Ridge. By this stage I’d pretty much convinced myself not to go to the summit the next day — the ridge itself had been much more enjoyable than the prospect of a 5+ hour snow trudge in a queue of tourist climbers. However, Dave persuaded me to go for it, and in practice the hut and most clientelle were much more “climbery” than the clueless tourist climbers I’d been expecting… and there were fewer of them, too. And no signs of the expected rubbish and excrement. Score several points for the “Mont Blanc is being destroyed” line being oversold. Being serial cheapos (and more importantly, tragically disorganised) we bivvied illegally above the hut, with a few other cheapo British types. Tip: bivvying without a tent at 4000m is just fine, indeed maybe better than with a tent since the latter continually flaps through the night, but it is a bit cold! In fact, so cold that normal cooking doesn’t really cut it: our pasta was a cold, congealed nightmare within about 20 seconds! Eat in the hut or bring a clever insulated JetBoil thing if you’re planning it: I will in future. The view from the ridge is amazing — what a place to camp! — but by heck is it windy! A good, but wheezy night followed, with some amazing views down onto the lights of Chamonix and St Gervais over 3km below as I went for a mid-night wee. I’d even be tempted to go back up for a night of long-exposure and time-lapse photography. At 2am, chains of people began to pass us, but by the time we had got up, packed and stuffed a bit of confectionery into ourselves they were mostly gone. Bivvying is faff-inducing but that’s not always a bad thing! From higher up we had some very cool views of the sporadic chain of headtorch light winding up the route — another good long-exposure photo opportunity for a later visit. I wasn’t in a good way, though, and within 20 mins was finding the going very hard: I couldn’t breathe properly and my legs had no energy at all. The best I could do was to wheeze upwards at the head of the party, counting my steps incessantly and aiming to get over 30 before stopping to pant air back into my lungs. In the end I hit a pace I could sustain for more than 70 steps, but it was painfully slow: I was playing the slowing-down end of Nine Inch Nails’ Closer in my head and it was at about half-speed! Amazingly, we kept catching up with the main group ahead of us… god knows how unfit they were! Every now and again, small parties would give up above us and we would pass them as they descended, looking ashamed and defeated. Each time, I thought “Well, I’m better than them, so I’ll get at least to their high point!” While I wanted to give up, I couldn’t do so without forcing Dave to stop and descend with me, so we just kept going at the painful trudge pace. Sorry guys, I couldn’t make my legs go any faster! The mountain just kept on going: over the Dome de Gouter, up to the Vallot refuge, and then on and on up the steep powder snow ditch/path of the Bossons Ridge. As we got higher, there were increasing pools of vom in the snow and we saw several guides dragging semi-conscious clients towards the summit. If you’re thinking of hiring a guide to drag you to the top for summit bagging purposes, I have to say it didn’t look fun, but then I don’t understand the bagging compulsion anyway. Eventually, the ridge flattened, without really becoming spacious, the gorgeous sunrise disappeared in a painful wind of hard-driven spindrift and we were done. I flopped on my arse and cried uncontrollably to myself: there was no more god-damned up to be trudged and we could get on with the important business of getting down. Not exactly a glorious summit experience! I’ve never had such an emotional experience from exhaustion before: I had dragged myself upward continually for almost 5 hours after my body first wanted to give up. Ridiculously, we were a mere 10 minutes over guide book time: they must have timed it for mountaineering sloths! On the descent, we stopped into the Vallot refuge, largely out of curiosity. It was a disgusting place — full of rubbish, and smelling of rot. We ate some cake and, since my camera had filled with snow taking summit shots, Al snapped a pic of Dave and myself looking tired and grumpy among the debris. A few days later it was splayed across 2 pages of the “Times 2” supplement. How annoying… I carry an SLR camera all that way, snap 500 shots, and the killer image is the one where my camera is out of action! Then stomp, slide and trudge back to the Gouter Hut and eventually civilisation. It was a bad 12 hours for Mont Blanc: we saw one climber slip down the Grand Couloir to his death on the descent, and the next morning a huge serac collapse avalanche on the 3 Monts route killed 8 climbers and injured 8 more. Over 100 climbers have died in the Massif this season alone. Later, in our campsite in Chamonix, we all looked up, and saw our route in profile, the wing whipping a lenticular spindrift cloud into existence along the summit ridge. “Thank god we don’t have to do that again,” said Tom. We all nodded. Continue reading… Unexpected C/C++ string behaviour Posted by Andy Buckley on Jul 08, 2008 This is a fun one. Take the following mini C++ program: #include <iostream> using namespace std; int main() { cout << "abcdefgh" + 0 << endl; cout << "abcdefgh" + 1 << endl; cout << "abcdefgh" + 2 << endl; cout << "abcdefgh" + 3 << endl; cout << "abcdefgh" + 4 << endl; cout << "abcdefgh" + 8 << endl; return EXIT_SUCCESS; } What happens? Well, at first glance you’d think that the output will be a list of concatenated strings like abcdefgh0, abcdefgh1 etc. After all, that’s a pretty common idiom in just about every language that’s more sophisticated than PDP11 assembler… oh, hang on, C/C++ is PDP11 assembler in disguise. So these string literals won’t behave like std::string — they’ll probably do something evil. And so it comes to pass: buckley@d18:~/tmp/cc$ g++ -o teststradd teststradd.cc
buckley@d18:~/tmp/cc\$ ./teststradd
abcdefgh
bcdefgh
cdefgh
defgh
efgh
(empty line)

I expected something evil, but this particular behaviour was a surprise: the first n characters are removed. What’s actually going on is that the string literal is a const char* pointer, and the +n is incrementing that pointer by n units. The printout then starts at the offset and writes until it finds the terminating null character!

So much for the reason — the main point is: WTF?!? One more reason to relegate C++ to purely system tasks like writing memory managers, device drivers and other bit-wrangling tools. Once strings, UIs and all that stuff get involved, we should be carefully segregating the C++ to places where it can’t do any harm, and using Java, Python, D… or whatever for the touchy-feely stuff.

Continue reading…

DIY Higgs: anything's possible with ROOT!

Posted by Andy Buckley on Jun 06, 2008

Hey physicists! Lack of an observed Higgs boson getting you down? Well fret no longer: you can make your own, thanks to the miracle of ROOT! Look, here’s one I made earlier:

Okay, so everything’s wrong: it’s not a very good impression of a Higgs, I know (and let’s not even mention the dismal message that this sends about physicist aesthetics and the attention paid to typesetting by the ROOT authors) But this is a worrying effect, given that this is the CINT macro that produced it:

{
double edges[19] = {-3.0, -2.7, -2.4, -2.1, -1.8, -1.5, -1.2, -0.9, -0.6, -0.3,
0.0, 0.3, 0.6, 0.9, 1.2, 1.8, 2.4, 2.7, 3.0};
// Double-size bins                          ^    ^
TH1F h("wrong", "This is not a real peak, it's just binning", 18, edges);
h.FillRandom("gaus", 10000);
h.SetMinimum(0.0);
h.Draw();
}

Yes, that plot is a random Gaussian distribution, according to ROOT. The big peak on the RHS is created by the two bins of width 0.6 (as opposed to 0.3 everywhere else). I hope it’s obvious that this is wrong! If it were a bar graph where the width of bins has no meaning, then it would be correct, but the idea of a histogram is that bin heights are set by the sum of weights in the bin divided by the bin width. Or, expressed as they tell you at school, a histogram’s area, rather than height, is the thing that reflects the number of “events” in that bin. For differential distributions (i.e. densities), which account for about 99% of all physics distributions, histograms are the only sensible statistical display to use, since they maintain the distribution’s shape as an invariant under arbitrary rebinnings: with asymptotically high statistics, a histogram should have heights equal to the mean value of the true distribution between the bin edges, a criterion which bar plots do not satisfy. Or, more loosely speaking, the choice of bin edge position on a distribution shouldn’t have any significance!

This is a silly mistake, a schoolboy error. It’s like trying to uniformly sample a spherical surface without accounting for the d(cos(theta)) measure factor: the 1D measures here are the bin widths. And it’s a dangerous error from a physics perspective, as the plot above shows: in a real physics analysis, it’s conceivable that you would bin more tightly around a region of interest, like a potential Higgs peak, in which case ROOT would actually display a dip! It’s amazing that no one seems to have noticed this in 15+ years of ROOT being used by the HEP community. I don’t use ROOT enough to know if this is a known issue — students and postdocs that I’ve mentioned this to have been surprised. Maybe it reflects the tendency of the community to make private work-arounds rather than report bugs upstream — not that my experiences of trying to report bugs on ROOT have been very encouraging — or just that with the lack of LHC data no-one has made any non-uniformly binned histograms yet!

Given that my gripes against ROOT are well-publicised, it’s with some trepidation (albeit also a fair chunk of smugness) that I’m writing this, but this issue needs to be publicised and fixed. The fix, fortunately, is just for the rendering system to include the width factor when calculating bin heights: the API’s GetBinData(index) function name doesn’t imply anything wrong about heights, it’s just being used inappropriately. Fixing it should definitely be done, and wouldn’t be hard, but it’s difficult to know how much existing code relies on this behaviour.

Continue reading…