Finding the J/ψ


To calculate information about any  mesons formed in the collider, you’ll need to write a ROOT program to loop over all of the data.  You already have the basic framework of this program.  Open it up and take a look by typing:
            emacs JPsiMass.C &
This program creates a new ROOT file which will contain histograms and a tree of new variables.  It then begins a nested loop function.  It loops over every event in the data set, and within each event it loops over muon tracks to find every possible pair of a muon and an anti-muon.  A few cuts are made along the way to single out only those tracks recorded by the most sensitive parts of the detector, which will make your end results more precise. 

There is an empty space inside the muon loops for your code.  You will need to write a few lines here to calculate the mass of the J/ψ candidate.  That mass is stored in a leaf of the output tree and in the mass histogram, using the “fill” command as given in the program.  The loops continue, saving the mass from every possible muon pair, until finally the program writes the output ROOT file to disk.

Some parameters given in the jpmm0d_stripped.root file which you may need to calculate J/ψ mass or other quantities:

Try writing some code to calculate the J/ψ mass.  When you’re ready to run the program, save the changes to JPsiMass.C and execute it by starting root and typing:
            .x JPRun.C
Wait until the program finishes running, then open up your output file:
            TFile* inputFile = new TFile("jpm.root","READ");
View the contents of the file using the browser.  You should see several leaves and your mass histogram.  Open up the histogram and check that it has an obvious peak at the J/
ψ mass.  Congratulations, you have found some J/ψs!

One useful feature of ROOT is its ability to modify histograms with a custom fit.  The file bellbkg.C contains a definition for a Gaussian function with 4 parameters to be fit:
               
With jpm.root open in root so that the mass histogram is accessible, load up bellbkg.C:
            .L bellbkg.C
Now enter these commands to set up the fit.  The first command creates a fit object and defines the range of values to fit over (3.00 to 3.20 GeV in this case) and the number of parameters to fit (4).  The second gives starting estimates for the four parameters to be fit:
            TF1 *func = new TF1("func", gausbkg, 3.00, 3.20, 4);
            func->SetParameters(5.0, 3.09, 0.01, 1.0);
Now try to apply the fit to your histogram: 
            jpm->Fit("func");
You should see a bell curve drawn on the canvas.  If you get a flat line instead, try entering the last line again.  The parameters of the fit are displayed in the ROOT command line.

 

Once you have your mass histogram, try adding more code inside the muon loops to fill the other leaves of the tree.  Some things to calculate are: