I caught this article linked from the “SLAC Today” website: “UK pulls out of plan for the ILC”. With the recent speech by Dr. Raymond Orbach at Fermilab, encouraging the community to put on the brakes on the ILC, and with this financial crisis in the UK, it begins to feel like a once great international initiative is beginning to unravel. This, of course, isn’t to say that there isn’t great research needed to construct such a powerful machine, nor is the physics case diminished by such events. However, great science needs great funding, and this is not great news.
ROOT is an object-oriented data-analysis framework, written by the physics community in C++ and freely available. We all love it, we all hate it. It’s like Windows – ubiquitous, a big target for ire, and necessary. There are lots of pretty neat things you can do in ROOT, but some of the most useful are the most basic. In occasional posts, I’ll mention some ROOT tricks and tips that help me to survive the day.
This time around, I’ll tell you how to weight a number of data sets, group them together, and then plot them to make a comparison with unweighted data events. Let’s say you have a number of simulated samples, each generated with their own level of statistics that may, or may not, reflect their actual frequency in the real data. You need to weight them, add them, plot them, and then overlay data. Here’s one way to do it, a way I really like.
Let’s say you have two simulation samples that, when added together with the proper weights, should model the real data. If their files are stored in two subdirectories, sample1/ and sample2/, and each ROOT file contains a TTree called “ntuple”, then you would do the following to quickly plot some variable, x, and draw it in a histogram:
TH1F hx("hx","Histogram of the variable x",100,-10,10);
hx.Sumw2(); // correctly propagate the error on weighted events
sample1.Draw("x >> hx","0.20");
sample2.Draw("x >>+ hx", "0.40");
In the above example, sample1 is weighted by 0.20 and sample2 is weighted by 0.40. Now the events in the histogram, hx, should be representative of the data. Loading the data in another chain, projecting it into another histogram, and drawing the two overlaid will reveal the level of agreement.
Hope this helps!
A few months ago, the television program “Mythbusters” tackled a series of baseball myths, ranging from whether a corked bat makes a difference to the performance of a hitter, to whether sliding into a base is faster than just slowing down and landing on it. Overall, I was pretty impressed with the experiments they devised. More than once, the Mythbusters remarked on how the data they were collecting were the real story, where the real science happens. That kind of recognition of the importance of gathering and analyzing data warms my heart.
One myth they tried to tackle was the following: it’s possible to knock the hide off a baseball in a normal pitching/hitting environment. In their setup, they loaded baseballs into an air cannon and fired them at a stationary bat. The technical reason for doing so, I suspect, was that this pitching/hitting rig was not wholly reliable and the precision timing needed to hit the faster pitches was beyond the rig’s capability. They concluded from this setup – fast ball, fixed bat – that it was not possible to knock the skin off a baseball under normal conditions. In their experiment, the ball had to be traveling at about 437 mph in order to lose its skin after striking the bat.
As a particle physicist, I see this as a unique opportunity to think about fixed-target vs. colliding beam experiments. When you’re attempting to go for raw collision energy, without expending more energy than is necessary in any one part of the experiment, you should go for a “colliding beam” experiment. This is when both the target and the bullet are moving toward one another, relative to the reference frame of the laboratory. In baseball, the lab frame is the stadium, and in that frame we know that the bat and the ball are both moving when the ball gets hit.
Colliding beam experiments are typically held in contrast to the “fixed-target” experiment, in which the target is stationary (in the lab frame) and the bullet is moving. The Mythbusters conducted the experiment which doesn’t happen in baseball (unless the hitter bunts): they fired baseballs at a stationary, rather than a moving, bat. Could this explain why they concluded that the pitcher would have to be super-human in order to get the energy needed to part hide from baseball?