Thursday 31 March 2011

Spring and 7 TeV Protons

CMS Experiment © 2011 CERN

This time last year, there were a lot of going's on at CERN. After the collider's first low energy collisions and an accident that took the machine offline for a year and a half of technical work, the Large Hadron Collider delivered its first 7 TeV collisions on the morning of March 30, 2010. I was standing in the atrium of my building, watching video being streamed from the different controls while reporters with big cameras ran around watching all the physicists. The LHC status page was prominently displayed, as we all prayed nothing would cause the machine to dump beam yet again.

Then all the flags went green for stable beams, and the first event displays of high energy collisions appeared. A new energy regime had been opened, something that only happens every twenty years or so in my field. For weeks afterward, we passed around pictures of events like proud new parents.

Spring and the end of March have come again. The primroses have popped up in every lawn while pale pink blossoms open on the trees. Tulips are starting to put in an appearance and birds can be heard squawking at 4 a.m., and collisions have resumed after the winter hiatus at CERN. There was much, much less fanfare this time. There is also now much more data.

ATLAS Experiment © 2011 CERN

Saturday 19 March 2011

Me and My Compiler . . .


Research tends to portion tasks in phases. Sometimes, the week's tasks will involve making many, many, many slides. Sometimes one may find one's self reading papers until one's brain hurts. And sometime, the need arises for new code. Perhaps the old code isn't adequate for how the project has evolved. Perhaps you went on vacation for a week and cannot remember what in the world your code was doing any more. Perhaps you started a new project, and thought to yourself, hey, I can use all the clever ideas I've been collecting to improve my analysis!

Whatever the reason, you settle down for some quality time with your compiler. If, like me, you don't code every single day and tend to forget the nuances, allow me to share a few hints my compiler taught me.

My compiler does not throw an error when someone forgets to put the return statement in the function. It throws a warning, but otherwise compiles everything just fine. This is a bit of a problem if that function returns a pointer you actually want to use (unless of course causing a seg-fault is what you wanted to do . . .). So don't forget the return statement.

Templated functions can save you a lot of coding on repetitive tasks. But templated functions should not be included with the rest of your source code. They need to be in the header file or in a special file of their own. Your compiler will compile the functions with the source code just fine, and then have no idea what function you're trying to call when you actually run your code. Since ROOT errors messages are about as useful as an elephant in ballet class, figuring out why your function has gone missing can take some puzzling, particularly if you've been at your desk for more than ten hours.

Monday 14 March 2011

Happy Birthday, Einstein



I find March a very interesting month. It is the tail end of winter, so it is still cold and frosty. But spring is also coming, so there is more sunlight and flowers start to pop up and the birds get very, very noisy arguing about whatever it is birds argue about in the wee hours of the morning. It doesn't really have any official holidays unless perhaps Easter falls during the month, so for the duration of my college career the entire month of March is a marathon of projects and tests that doesn't let up until you crash into finals in April.

This year is not exception, though tests aren't to blame this time around. Now it's shifts and a paper for my professor.

It's too bad, because I would like to celebrate the first flowers and actually make myself a cake for once. Besides, March 14 is Pi day (March 14 = 3/14 = 3.14 . . .) and Einstein's birthday, so every physicist should have a chance to celebrate.