Archive for October, 2009

Lecture Belt

Lecture Belt

0

CERN Adventure Outfitters have created a new advanced utility belt specifically designed for the punishing environments of today’s physics lecture circuit.

Lecture Belt

Lecture Belt (TM)

Lecture Belt (TM) combines style with function. Never again be caught in the middle of a public lecture without your laser pointer, cell phone, Leatherman (TM) utility knife, camera, canteen, first aid kit and massive skeleton keys. The “keynote speaker” model comes with a carabiner for those hard-to-attach jangle-tastic belongings that happen to have a loop attached.

Forget pesky backpacks and briefcases! Attach everything to your waist, for best access.

CAUTION: Lecture Belt (TM) wearers may experience difficulty sitting down. Using urinals while wearing Lecture Belt (TM) is not recommended.

A tutorial.

Hand-washing at CERN — it’s all in the details

1

It’s true; scientists need a few gentle reminders every once in a while in order to maintain order and cleanliness.  Just take a walk through CERN’s Restaurant 1 in the middle of the lunch hour, and you’ll be swarmed with a multitude of all-too-unpleasant smells resulting from lack of hygiene.  In many cases, a not-so-subtle scolding from a significant other will have an effect.  But, when it comes to more mundane habits like keeping one’s hands clean, we physicists really need more active guidance.  Therefore, CERN has implemented a 12 Step Program designed to educate its community in the ways of hand hygiene.  Nowadays, posted in several of the public lavatories around the lab, you’ll be lucky enough to find detailed instructions:

A tutorial.

A tutorial.

From now on, you’ll never have to remember this intricate process yourself!  An especially useful tool for physicsists, this should also ensure prevention of a massive H1N1 pandemic here at CERN.  By following these steps (Wet, Soap, Wrists, Palms, Back of hands, Between fingers, Fingertips, Swirl fingertips, Thumbs, Rinse, Dry, and Turn off taps), you should have no problem keeping your hands squeaky clean.  Finally, if you have questions or feedback, feel free to jot your thoughts down on the poster in green ink.

Cable trays fill both walls from floor to ceiling.

Underground CERN: it’s Half-Life in real-life

20

It’s one of the greatest games of all time. You clamber over pipes and through ducts. Cables of unclear electrical status dangle uncomfortably close to puddles of water. Tunnels lit by rudimentary emergency lighting lead on and on past a hissing steam pipe, then dripping water, then silence, until the darkness slowly reveals a moist and fleshy lump growing out of the ground.

The game is high energy physics, though there are a couple decades of decay between these scenes and active science. A few years back, shortly before the game Half-Life 2 came out, a group of us explored the little-traveled CERN tunnels recorded in the photos below. The resemblance to the original Half-Life–with its steam leaks, ventilation shafts, and dark corners hiding headcrabs–is uncanny (though my observations indicate that CERN’s dark corners are not fully populated). It’s a testament to Half-Life’s genius design and storytelling that the fantasy of Gordon Freeman’s life becomes so plausible in this real-life setting.  It’s also a testament to the awesomeness of science!

High energy physics these days requires all the infrastructure of a large industrial facility with some extra loving attention paid to cryogenics, cables, and computing clusters. It’s amazing to think that these abandoned tunnels, pipes, and cables, though extensive, are dwarfed by the facilities still in operation and newly built for the LHC.

It’s almost enough to make a scientist wonder, “will this open a dimensional rift?” and as a backup, “where is the nearest crowbar?”

TH1 class hierarchy

ROOT rants: histogram hierarchy and a little PyROOT

2

I was doing some Google searching a couples days ago looking for answers to a ROOT question–I have a new one every day!– and I stumbled on a very nice rant about ROOT. It mentions the ugly default plotting style of that was the focus of my last post, and it hits on many points I would have made myself.

Sorry, if you don’t have any programming experience this post might be too technical.  If so, may I instead offer you a large man on a small vehicle?

One thing I really liked is the comment about the crazy inheritance: how a 2D histogram (TH2) inherits from a 1D histogram (TH1). The reasoning for the ROOT authors seems to be that a 2D histogram can be thought of as a long 1D histogram “rasterized” onto a 2D field. In this (convoluted) way, the 2D histogram is a specific type of 1D histogram. But, as the author of that University of Minnesota page notes, there is no reason not to think of the relation going the opposite way: a 1D histogram is just a 2D histogram with only one bin in the second axis. And, this second relation seems a whole lot more obvious and fundamental. The structure the ROOT authors use doesn’t hurt them too badly because in reality most of the operations on histograms happen bin by bin. The implementation of an n-dimensional array very well may boil down to a 1D array; but, are we really doing the user any favors here?

TH1 class hierarchy

With a TH2 inheriting from a TH1 certainly you would assume there is one advantage: the TH1 class won’t be cluttered with nonsensical methods like GetNbinsY() or GetYaxis().  Of course you would be wrong, just check it out.  In fact, given the structure they’ve ended up with, I’m having a hard time coming up with a reason why they even need separate classes for 1D and 2D histograms.

And while I’m still speaking of histograms, the profusion of varieties must be noted: TH1C, TH1S, TH1I, TH1F, TH1D.  When I first started using ROOT and hadn’t yet carefully read the documentation I assumed a TH1I would be used to histogram an integer valued parameter, in other words the x-axis would take integer values.  Though most parameters we work with have continuous values, counts (usually called “multiplicities”) such as “how many electrons with energy greater than 10 GeV were in the event?” are also very important. Thus histograms over integer values would really fill a need. Of course, this is not what ROOT provides: all a TH1I does is promise to store each bin value (the number that defines the y-value on the graph) as an integer.  This doesn’t change the fact that a TH1I can only be Fill()ed using a floating point weight. The Fill() method, and nearly every other method on this class, is defined generically using doubles in the TH1 parent class.  Strangely, the functions for requesting a bin value are implemented in the integer specific TH1I class, so you might think that at least they would do the sensible thing and deal only in integers. Instead, the integer stored internally is cast as a double before being returned.   As far as I can tell, there is no way to get unadulterated integers, that you know must be in there, out of this class.  One might wonder if the different histogram varieties just offer different storage sizes, but then sizeof(Int_t) == sizeof(Float_t), so it’s unlikely.  Maybe there is a slight speed advantage when incrementing (though it is hard to imagine this is an issue with any processor having a dedicated floating point unit, taking us back at least 20 years)?  I don’t know, I give up.

I think this is enough ROOT ranting for now.  Possible topics for a further post

  1. How histograms and TTrees are owned by the directory they are created in (whereas similar objects like graphs are not).  When you are new to ROOT this is guaranteed to lead to mysterious segmentation faults.
  2. Code that runs without errors or warnings in both compiled and interpreted modes, but produces different results.
  3. The vector classes: why does the 2D vector have to use Mag() while the 3D vector uses Mod()
  4. Painful limitations to using STL classes like std::vector<> in interpreted mode.  (The reason I gave up on doing any substantial work using interpreted ROOT code.)
  5. Horrible crashing that  refuses to let you quit even with Ctrl-C.

Oh, and regarding my recent issue that lead me to Google for answers: I’ve been using PyROOT a lot lately, but the underlying C++ bites you in the ass now and then. One issue I ran into is functions that modify values passed by reference. Python was designed to avoid this sort of thing, at least for the fundamental types, and so you have to do some annoying array('i', [0]) machinations just to pass a reference to an integer into a function.  Thankfully this doesn’t happen often, and it turns out the ROOT manual does explain the work-around well enough if you look in the PyROOT section [PDF] on TTrees.  (Instead of a TTree, I was actually trying to use TColor::HLS2RGB(), mostly foolishly, I must say.)  On the whole, though, I would highly recommend PyROOT if you are doing anything high-level like making plots and you have to use ROOT.

A great start to a great website.

Useless Orifice

3

Oh my god.  I am a CERN user.  Hence, I am priveleged enough to have the opportunity to interact with a very special group of people here at the lab: the Users’ Office.  Today, I will introduce you to this incredibly useful resource by holding a tutorial on the use of their website; trust me — you’ll need help.  Feel free to follow along with the screenshots presented below, or have a look at the site yourself: Start Here!

A great start to a great site.

A great start to a great site.

Say you have one (1) task to accomplish on the U.O. website:

  1. You need to figure out what is required for a move to CERN (e.g., from your home institution)

That’s it. To begin, you have a few options based on the offerings on the lovely home page.  Intuitively, you would choose to click on the ‘Before Coming to CERN’ link.  After clicking, up pops a lovely PDF file with a flowchart; after three minutes of perusing this, you realize it’s the flowchart from hell.  In fact, you’re not even sure where to go from the first balloon.  Back to the drawing board. Glancing again at the home page, you think, “Perhaps it’s useful to read the Newcomers Guide — after all, it’s on my to-do list.”  After clicking the link (NB: you can choose the link from the menu sidebar or from the body of the page), you’re shocked and astounded by the transformation which has taken place. (more…)

cutting-edge water conservation system

CERN’s new water conservation initiative

1

Working at a world-class institution like CERN is tremendously exciting. As you might assume, not only does CERN lead the world in particle physics, its general infrastructure is also top-notch and maintained by a tireless team of highly dedicated individuals. On a daily basis, you see the same incredible human ingenuity and generous financial resources used to probe the building blocks of matter also being put to use for more mundane things like plumbing. On a recent trip to the toilet, I discovered a bold new water conservation initiative apparently underway. And boy, does it work!

urine?

I ... think I'm done washing now.

First I should tell you a dirty little secret about myself. I can be a bit of a glutton, and sometimes this gluttony gets into the realm of wastefulness. One of the forbidden pleasures I allow myself is the use of warm water for hand-washing. Please don’t think I’m such a bad person, it just feels so warm and comfy, and when nobody is watching I just love it. Well, the CERN water engineers are far too clever for reprobates like me! They’ve installed a system whereby the warm water starts out clear but slowly turns yellow, until it is the color of unhealthy urine. Well let me tell you, I shut that hot water faucet off pretty quick! Some people like me never learn, but when your hands are covered in what is probably urine, you start to catch on! Although, I’ll be honest with you – and this is kind of embarrassing – the urine-based warning system has been in full production for several months and yet I still fall back to my old ways.

cutting-edge water conservation system

cutting-edge water conservation system

The story is not over though, because I hadn’t learned my lesson yet. I turned on the cold water and went right back to enjoying myself, getting all that soap off my hands, and I’ll admit, basking a little too long in the cooling water massage. I was so focused on my own pleasure that I didn’t immediately notice the warning signal, in the form of a splashing sound over and above the normal splashing from the sink. Well, I ignored that warning and I finally got the punishment I deserved. I suddenly realized my feet were soaking wet and my gorgeous Italian leather shoes were ruined. Because, get this, the water was going straight out through the drain onto the floor! Brilliant! This time I finally got the message.

I shut that water off immediately and will think very seriously about how often I wash my hands from now on. I can’t begin to imagine the level of sophisticated Swiss engineering needed to implement such an advanced water-conservation system, but CERN is obviously willing to shell out some big money to make it happen. Kudos to them! Hopefully I can be a better world citizen and steward of our precious natural resources from now on.

2D histograms plotted with the default palette (left) and SetPalette(1) (right)

The ROOT of all my frustrations

12

If you work in high energy physics (HEP) you almost certainly come in contact with some software called ROOT on a very regular basis. ROOT is a collection of tools and a framework of C++ classes developed at CERN specifically for the data collection and processing that many physicists perform.  It defines a “Tree” format designed specifically for HEP data (the name is a play on the name ROOT and not much of a tree in the classic algorithms-and-data-structures sense), it produces nearly all the plots that we show each other at meetings, and it provides a C++ environment that can be used both interactively and compiled.  (There is also a Python interface which I actually use more often these days.)  If you use something every day you are bound to become frustrated with it in some way or another.  Unfortunately, ROOT’s annoyances are very pernicious:

  1. Its default behavior is to produce hideous plots, and
  2. Every now and then you can come up with the simplest of goals (something such as “set the color of these histograms to red”) that teases you with the prospect of an easy solution but instead sucks you into a whirlwind of failure that invariably transports you to the colorful land of the ROOT source code where you search for a way home skipping from function call to function call until you find the solution didn’t make any sense at all but was right in front of you the whole time.  If you are luck enough to reach this point it is probably 4am.

These issues frustrate my personality especially because

  1. I’m particular when it comes to aesthetics, and
  2. I’m a stubborn optimist always willing to stay up just a little bit longer.

This post will feature a couple examples of item 1, but the infinitely long scroll of bits that this blog could fill is just barely long enough for the further rants I may produce.

Below is an example of two fitted histograms.  The left is a plot drawn with the default style and the right is using the “Plain” style.  There are two main issues with the default style: the uniform gray background makes it an eyesore on almost any white page or white presentation background, and the last time the chamfering and shadow effects were cool was back in 1995.  I have seen no circumstance in which the “Plain” style on the right wasn’t a clearly better choice.

Histograms plotted with the default (left) and "Plain" (right) styles

Histograms plotted with the default (left) and "Plain" (right) styles

What’s madding is the Plain style can be enabled with one simple line of code, and yet after I started using ROOT every day and was immediately struck by these offensive plots I went months between the stages of realizing

  1. The backgrounds of my plots are not just a stupid mistake on my part;
  2. I can fix this with five lines of boilerplate code at the top of all my programs;
  3. I can put this code in a configuration file that appears in every directory where I run;
  4. I can set a ROOT path and put this code in a single configuration file for my entire login session; and finally,
  5. That there are perfectly good styles build into the code called “Plain” and “Pub” that setup every as you wanted it to begin with using a single line of code.

These days when I see a presentation with these ugly gray backgrounds I presume the presenter has either not been using ROOT for very long (at least not long enough to produce a publication, since no publication would accept such plots), or they are still on stages 2 or 3 and the plots where made in a hurry.  Both of these scenarios are common.

What’s even more maddening is that I didn’t reach stage 5 by reading the documentation, which really needs to begin with

In order for your ROOT plots to not suck be sure to set a Unix.*.Root.MacroPath: in your ~/.rootrc file and then add gROOT->SetStyle(“Plain”); to a  rootlogon.C file somewhere in this path.

Admittedly, this style setting stuff is in the documentation, but a section called “Create or Modify a Style” is not one you would read too carefully when you are rushing to make plots for your next presentation.  Instead, I came upon the “Plain” and “Pub” styles by finding them in the source code while on one of those lovely journeys mentioned in item 2 of my opening.

Finally, here is another example of crap that ROOT gives you by default.  It’s possible the default plot offers some advantages to those who are color blind or to those who are 13 years old and are really trying to piss me off, but otherwise why?  Why?

2D histograms plotted with the default palette (left) and SetPalette(1) (right)

2D histograms plotted with the default palette (left) and gStyle->SetPalette(1) (right)

E-mail Etiquette

1

CERN Lovers,
Please, allow us to suggest a template for your use when composing e-mails to a working group, or even for your use in everyday communication with colleagues:

The _____ (1) is enabled only for people on _____ (2), coipled[sic] to _____ (3). People not holdig[sic] any expert role are thus not able any longeer[sic] to open a terminal in _____ (4), nor to do any operation on _____ (5). This will stay like this from now on.

Legend:

(1) Insert role here

(2) Insert roster for horrible job here

(3) Insert barely-working scheduling software here

(4) Insert dismal office area here

(5) Insert barely-working physics software here

NB: incorrect spelling is encouraged, and correct grammar should be used sparingly.

Best,
lovehurts

elephant

Elephant love

0

Below we present a verbatim transcription of the first paragraph of an actual talk given by a CERN physicist before an audience of hundreds.

elephant

elephant or snuffleupagus?

So … ahh … I’m here to talk about database access, which ah, is a, essential part of your day, so in, in putting together this talk I was thinking about, about what jobs need and, and how it was much like adopting a pet elephant and what what we’ve done so far is we’ve, we have simulated elephants we’ve been taking care of and elephants can be productive and teach us a lot of things, but, um, and what, and what we basically know is that when our real elephants come they’re gonna need database access and data, and they’re gonna need some efficient and I/O and CPU to get … and we have to take care of all their needs for them to tell us everything that we need to know, but what is really gonna arrive in mid-November is maybe some different creature like a Snuffleupagus, that is somewhat like an elephant but it may be very different.

This speech contains some technical terms, so as physicists and Grid experts, we have uploaded an analysis.

Analysis: Sorry … elephants?? Elephants are like grid jobs? What?!

(more…)

The border crossing in front of CERN from the Swiss side, traffic on the right is heading to France.  The truck is bringing a very large boat into Switzerland.

International travels: interrogations

0
The border crossing in front of CERN

Border crossing in front of CERN

Just beyond the main entrance, the road in front of CERN crosses from Switzerland to France at an important border station.  CERN is not just international in its political status and spirit, it is physically international: the main site straddles the two countries.  In its early years CERN was entirely within Switzerland, but only just barely.  Later expansion now puts most of its area in France.  Still, outside of limited weekday hours the only entrance is from Switzerland, and many employees and users from other countries choose to live in France. The international border has kept the “French suburbs” of Geneva, which surround the city on three sides, distinctly less developed. Because of this, housing can be cheaper and distinctly easier to find on the French side of the border (though prices have been equalizing over time and apartment searches are still not without their frustrations).  So for many the everyday the commute requires a border crossing.  This was the situation I was in a few years back.
(more…)

Any given Tuesday

1

On a day which I dubbed suitable for a couple “quick errands,” it all started with a quotidian morning at the bureaucratic and meeting-laden wonderland that is the world’s premiere high energy laboratory:

08:00 – Snooze. Hard.
09:30 – Wake, prepare, bike to CERN. Coffee. To the Users’ Office!
09:55 – Users’ Office lines are my 2nd favorite.
10:55 – Users’ Office experience complete, for now…
11:05 – Arrive at Financial Office after minor confusion navigating Buidlings 3,4, and 58.
11:07 – Walk ashamedly away from Financial Office. Pick-up for reimbursement: the Post Office (?).
11:10 – Post Office lines are my favorite.

11:16 – Awkwardly ask Mr. Post Office for my money, struggle to verify my identity.
11:20 – Leave Post Office, rejected.  Reimbursements need 24 hrs to be processed.
11:30 – European lunch (of course).

13:30 – Return to Users’ Office with the morning’s missing documents.
13:52 – Users’ Office Round 2 complete.
14:29 – Read e-mail from Users’ Office; understand vacuum of U.O. internal communication.
14:31 – Head to Users’ Office for Round 3…
15:00 – Group meeting.
16:42 – Much-needed coffee.
17:00 – Finally, time for work.

Somehow, they pay me to do physics.  I have to respect a place that can throw time into a hole so deftly.

hurtling water bottle

Playing a serious game of catch…

0
hurtling water bottle

hurtling water bottle

… with a water bottle. A plastic water bottle, full, possibly unopened. On the green lawn in the evening, outside the patio of R1,

CERN’s pre-eminent cafeteria. Three summer students, with earnest demeanor, spent their evening hours dramatically cocking back their throwing arms as if pitching baseballs, and throwing a water bottle to each other, 50 meters apart, back and forth.

Not laughing. Not joking. Just throwing and catching. As professional athletes do.

where it happened

where it happened

Back and forth.

Back and forth.

Catch this plastic water bottle, intercept its hard corners. Touch its pregnant belly so full of water, as it hurtles towards your face. It is not a baseball; it is a water bottle.

Dan Brown, you know nothing of CERN. We don’t need frisbees; we have water bottles.

A fully loaded bike in Meyrin

Around town: unmatched cargo to vehicle weight ratio

0

A fully loaded bike in Meyrin

You might be amazed at what you can move with two wheels and a few CCs.  We passed this fellow in Meyrin on the main route from Geneva to CERN.  The bike is motorized, but only barely, notice it has pedals too!  This is near the top of the hill in Meyrin, the ideal place to be with a rig like this.  Most importantly, you have to appreciate this man’s impeccable sense of style: the plaid dog-bag perfectly coordinates dog, bike, and attire.

Go to Top