Defending Your Life (Part 2)
20th October 2014 | By
I’ve been working on our simulation software for a long time, and I’m often asked “what on earth is that?” This is my attempt to help you love simulation as much as I do. This is a follow up to Part 1, which told you all about the first step of good simulation software, called “event generation”. In that step, we had software that gave us a list of stable particles that our detector might be able to see. And we’re trying to find some “meons” that our friend the theorist dreamed up.
One little problem with those wonderful event generators is that they don’t know anything about our experiment, ATLAS. We need a different piece of software to take those particles and move them through the detector one by one, helping model the detector’s response to each one of the particles as it goes. There are a few pieces of software that can do that, but the one that we use most is called Geant4. Geant4 is publicly available, and is described as a “toolkit” on their webpage. What that means is that it knows about basic concepts, but it doesn’t do specifics. Like building a giant lego house out of a bag of bricks, you have to figure out what fits where, and often throw out things that don’t fit.
The first part of a good detector simulation is the detector description. Every piece of the detector has to be put together, with the right material assigned to each. We have a detector description with over five million (!) volumes and about 400 different materials (from Xenon to Argon to Air to Aerogel and Kapton Cable). There are a few heroes of ATLAS who spend a lot of time taking technical drawings (and photographs, because the technical drawings aren’t always right!) of the detector and translating them into something Geant4 can use. You can’t put every wire and pipe in – the simulation would take an eternity! – so you have to find shortcuts sometimes. It’s a painstaking process that’s still ongoing today. We continuously refine and improve our description, adding pieces that weren’t important at the beginning several years ago but are starting to be important now (like polyboron neutron shielding in our forward region; few people thought early on that we would be able to model low-energy neutron flux in our detector with Geant4, because it’s really complex nuclear physics, but we’re getting so close to being able to do so that we’ve gone back to re-check that our materials’ neutron capture properties are correct). And sometimes we go back and revise things that were done approximately in the beginning because we think we can do better. This part also involves making a detailed magnetic field map. We can’t measure the field everywhere in the detector (like deep in the middle of the calorimeter), and it takes too much time to constantly simulate the currents flowing through the magnets and their effect on the particles moving through the detector, so we do that simulation once and save the magnetic field that results.
Next is a good set of physics models. Geant4 has a whole lot of them that you can use and (fortunately!) they have a default that works pretty well for us. Those physics models describe each process (the photoelectric effect, Compton scattering, bremsstrahlung, ionization, multiple scattering, decays, nuclear interactions, etc) for each particle. Some are very, very complicated, as you can probably imagine. You have to choose, at this point, what physics you’re interested in. Geant4 can be used for simulation of space, simulation of cells and DNA, and simulations of radioactive environments. If we used the most precise models for everything, our simulation would never finish running! Instead, we take the fastest model whose results we can’t really distinguish from the most detailed models. That is, we turn off everything that we don’t really notice in our detector anyway. Sometimes we don’t get that right and have to go back and adjust things further – but usually we’ve erred on the side of a slower, more accurate simulation.
The last part is to “teach” Geant4 what you want to save. All Geant4 cares about is particles and materials – it doesn’t inherently know the difference between some silicon that is a part of a computer chip somewhere in the detector and the silicon that makes up the sensors in much of our inner detector. So we have to say “these are the parts of the detector that we care about most” (called “sensitive” detectors). There are a lot of technical tricks to optimizing the storage, but in the end we want to write files with all the little energy deposits that Geant4 has made, their time and location – and sometimes information (that we call “truth”) about what really happened in the simulation, so later we can find out how good our reconstruction software was at correctly identifying photons and their conversions into electron-positron pairs, for example.
The fun part of working on the simulation software is that you have to learn everything about the experiment. You have to know how much time after the interaction every piece of the detector is sensitive, so that you can avoid wasting time simulating particles long after that time. You get to learn when things were installed incorrectly or are misaligned, because you need those effects in the simulation. When people want to upgrade a part of the detector, you have to learn what they have in mind, and then (often) help them think of things they haven’t dealt with yet that might affect other parts of the detector (like cabling behind their detector, which we often have to think hard about). You also have to know about the physics that each detector is sensitive to, what approximations are reasonable, and what approximations you’re already making that they might need to check on.
That also brings us back to our friend’s meons. If they decay very quickly into Standard Model particles, then the event generator will do all the hard work. But if they stick around long enough to interact with the detector, then we have to ask our friend for a lot more information, like how they interact with different materials. For some funny theoretical particles like magnetic monopoles, R-hadrons, and stable charginos, we have to write our own Geant4 physics modules, with a lot of help from theorists.
The detector simulation is a great piece of software to work on – but that’s not the end of it! After the simulation comes the final step, “digitization”, which I’ll talk about next time – and we’ll find out the fate of our buddy’s meon theory.