Clone this repository in your current folder with
git clone https://github.com/aboletti/LIP-analysis-tutorial.gitYou can consult the GitHub documentation for information on how to set up git and clone a repository. However, if the command above worked without errors, there is no need to do that to continue with the tutorial.
Enter the folder with the code with
cd LIP-analysis-tutorialThe data that you will use in this tutorial have to be downloaded with
wget https://aboletti.web.cern.ch/aboletti/LIP-tutorial/Skim4.rootLoad root and create a folder for the plots you will produce with
module load root
mkdir plotsroot Skim4.rootThe TTree contains a set of TLorentzVector, one for each muon, and one that os obtained somming the other two. Try to plot the dimuon invariant mass spectrum with:
oniaTree->Draw("dimuon_p4.M()")How can we improve this plot?
Check the code, trying to understand its structure. Detailed information about any ROOT or RooFit class can be found in the reference manual, looking for the class name in this list, or simply writing the class name in a search engine.
Set the value of a._sdig to the day of your birthday (i.e. the day of the month, from 1 to 31), to "randomize" the set of data you are going to study.
Run the default configuration of the code
root -b -q dimuons.Cand check the output graphs and note down the fit results.
Optional: the code contains also a function to fit using standard ROOT objects (without RooFit). This is commented by default. You can try to run it (now, and also for the following steps) to compare the results of the fits. In any case, we will consider the RooFit results as the official ones.
The current fit uses a Gaussian function as signal model and an exponential as background model. This is not always enough to describe the peaks we are going to fit.
On the J/psi peak, the bad description is more evident if you fit the full sample (setting a._sdig = -1, try it).
Try different functions both for the signal model (like Crystal-Ball, Breit-Wigner, or the sum of two Gaussian functions), and for the background model (like a 1st or 2nd degree polynomial). Pay attention to the quality of the fit with each function and how the signal yield varies.
Until now, you worked only with the J/psi peak, but other ones are present in our spectrum.
Choose a different peak and adapt the code to fit it (by setting the appropriate mass range). Note that the Upsilon peaks are more challenging since they have to be fitted all three in the same fit.
Try also here different functions to find the one that better describes your peak.
Adapt the code to perform an unbinned fits (using a RooDataSet) instead of binned ones.
So far, you have measured the signal yield inclusively for the all sample. However, one interesting improvement is measuring the differential yield as a function of one particular variable (which can be used to measure a differential cross-section or branching ratio). This is obtained by splitting the sample in bins of that variable and for each bin computing the ratio between the yield and the size of the bin.
Start by drawing the distribution of the transverse momentum of the dimuon candidate, for the events present in the mass region you have chosen in step 2. Divide this distribution in a set of bins to use for your measurement; you are free to define the binning that you prefer, but try to follow these guidelines: it should cover the entire spectrum of the dimuon transverse momentum, it should be uneven (narrow bins where there is a high density of events, larger bins where the density is lower), and it should have at least 5 bins (but if your peak has a lot of events, you can try a larger number).
Then, add to the code a selection on the transverse momentum of the dimuon candidate, and measure the yield of your peak only in this region.
Finally, measure the yield for every single bin and create a graph with the dimuon transverse momentum on the x-axis, the measured yield divided by bin size on the y-axis.