from ROOT import TTree, TFile, TCanvas, TH1F, TLorentzVector
%jsroot on
Welcome to JupyROOT 6.07/07
file = TFile("data/Dimuons.root","READ");
Let's calculate again the invariant mass $M$ of two muons and focus on various parts of the dimuon mass spectrum
Canvas = TCanvas()
For dimuon mass regions of interest 2.5-3.5 GeV and 80-100 GeV
J_psi = TH1F("J_psi", "#mu#mu mass;#mu#mu mass [GeV];Events", 100, 2.5, 3.5)
Z_boson = TH1F("Z_Boson","#mu#mu mass;#mu#mu mass [GeV];Events", 200, 80, 100)
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)
InvariantMass = (muon1 + muon2).M()
if InvariantMass > 2.0 and InvariantMass < 3.5:
J_psi.Fill(InvariantMass)
if InvariantMass > 60.0 and InvariantMass < 120.0:
Z_boson.Fill(InvariantMass)
J_psi.Draw()
Canvas.Draw()
Canvas.Clear()
Z_boson.Draw()
Canvas.Draw()
from ROOT import TTree, TFile, TCanvas, TH1F, TLorentzVector
%jsroot on
file = TFile("data/Dimuons.root","READ");
Canvas = TCanvas()
Upsilon = TH1F("Upsilon", "#mu#mu mass;#mu#mu mass [GeV];Events", 10, 8.5, 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)
InvariantMass = (muon1 + muon2).M()
if InvariantMass > 8.5 and InvariantMass < 11:
Upsilon.Fill(InvariantMass)
Upsilon.Draw()
Canvas.Draw()
from ROOT import TTree, TFile, TCanvas, TH1F, TLorentzVector
%jsroot on
file = TFile("data/Dimuons.root","READ");
Canvas = TCanvas()
Psi2s = TH1F("Psi2s", "#mu#mu mass;#mu#mu mass [GeV];Events", 20, 3.2, 4)
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)
InvariantMass = (muon1 + muon2).M()
if InvariantMass > 3.2 and InvariantMass < 4:
Psi2s.Fill(InvariantMass)
Psi2s.Draw()
Canvas.Draw()