CMS Open Data Example #3: Di-Muon Resonances


Import Modules and Turn on Javascript

In [3]:
from ROOT import TTree, TFile, TCanvas, TH1F, TLorentzVector

%jsroot on
Welcome to JupyROOT 6.07/07

Read in Data from Input File

In [4]:
file = TFile("data/Dimuons.root","READ");

Compute Di-Muon Invariant Mass

Let's calculate again the invariant mass $M$ of two muons and focus on various parts of the dimuon mass spectrum

Exercise: Can You Spot Other Di-Muon Resonances in the Dimuon Spectrum?

Plot a Gaussian Curve for Each Resonance

In [10]:
Upsilon = TH1F("ϒ", "#mu#mu mass;#mu#mu mass [GeV];Events", 100, 8.0, 12.5)
In [11]:
for dimu in file.Dimuons:
    if dimu.Muon1_Global and dimu.Muon2_Global:
        
        muon1 = TLorentzVector(dimu.Muon1_Px, dimu.Muon1_Py, dimu.Muon1_Pz, dimu.Muon1_Energy)
    
        muon2 = TLorentzVector(dimu.Muon2_Px, dimu.Muon2_Py, dimu.Muon2_Pz, dimu.Muon2_Energy)
        
        Invariant_Mass = (muon1+muon2).M()
        
        if Invariant_Mass > 0.0 and Invariant_Mass < 120.0:
        
            Upsilon.Fill(Invariant_Mass)
In [12]:
from ROOT import TF1, kGreen, kRed, kYellow, kOrange

Canvas = TCanvas()
In [13]:
Gaussian = TF1("Gaussian","gaus", 9.23, 9.6)
Background  = TF1("Background","pol2", 8, 12.5)
Gaussian1 = TF1("Gaussian","gaus", 9.7, 10.2)
Gaussian2 = TF1("Gaussian","gaus",10.25, 10.45)

Gaussian.SetLineColor(kRed)
Background.SetLineColor(kGreen)
Gaussian1.SetLineColor(kYellow)
Gaussian2.SetLineColor(kOrange)

Upsilon.Fit(Gaussian,"R")
Upsilon.Fit(Background,"R+")
Upsilon.Fit(Gaussian1,"R++")
Upsilon.Fit(Gaussian2,"R+++")
Canvas.Draw()
 FCN=129.611 FROM MIGRAD    STATUS=CONVERGED      79 CALLS          80 TOTAL
                     EDM=3.72629e-07    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  Constant     2.23626e+03   2.67862e+01   1.05039e-01   3.01623e-05
   2  Mean         9.44597e+00   1.47445e-03   7.95168e-06  -6.01384e-02
   3  Sigma        1.29456e-01   1.92562e-03   2.21217e-05   2.14839e-01

****************************************
Minimizer is Linear
Chi2                      =      5823.89
NDf                       =           97
p0                        =     -11545.9   +/-   169.277     
p1                        =      2289.96   +/-   34.3334     
p2                        =     -104.204   +/-   1.7093      
 FCN=92.7142 FROM MIGRAD    STATUS=CONVERGED     101 CALLS         102 TOTAL
                     EDM=7.87272e-08    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  Constant     1.26738e+03   1.67043e+01   5.54257e-02  -1.62258e-05
   2  Mean         1.00214e+01   5.58077e-03   1.93186e-05   1.64938e-02
   3  Sigma        2.48927e-01   8.95793e-03   4.57262e-05   6.26346e-03
 FCN=0.83442 FROM MIGRAD    STATUS=CONVERGED     131 CALLS         132 TOTAL
                     EDM=3.96479e-10    STRATEGY= 1      ERROR MATRIX ACCURATE 
  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME      VALUE            ERROR          SIZE      DERIVATIVE 
   1  Constant     1.18081e+03   2.76034e+01   1.15695e-02  -9.96052e-07
   2  Mean         1.03421e+01   1.03389e-02   6.82040e-06   1.07995e-03
   3  Sigma        1.85942e-01   4.67600e-02   8.20126e-05  -2.13027e-04
In [ ]: