Muon Selection Tool Quality

Good day!

I am trying to access the muon in the data events that has a medium quality. This is the code

import ROOT

root_file = root://eospublic.cern.ch//eos/opendata/atlas/rucio/data16_13TeV/DAOD_PHYSLITE.37019888._000001.pool.root.1

chain = ROOT.TChain("CollectionTree")
chain.Add(root_file)
df = ROOT.RDataFrame(chain)
df.Snapshot("CollectionTree", "quality.root","AnalysisMuonsAuxDyn.quality")

Then I looked at the distribution of the values on the “AnalysisMuonsAuxDyn.quality” branch

%jsroot on  
f = ROOT.TFile.Open("quality.root")
t = f.Get("CollectionTree")
h = ROOT.TH1D("h", "Muon Quality Distribution", 30, -10, 20)
t.Draw("AnalysisMuonsAuxDyn_quality >> h")
c = ROOT.TCanvas("c", "Canvas", 800, 600)

h.SetLineColor(ROOT.kBlue)
h.SetFillColor(ROOT.kBlue)
h.GetXaxis().SetTitle("value")
h.GetYaxis().SetTitle("count")

h.Draw()
c.Draw() 

Based on some literature, the values of the quality should just range from 0-5 namely 0=Tight, 1=Medium, 2=Loose, 3=VeryLoose, 4=HighPt, 5=LowPtEfficiency

May I know what the branches represent? if it is the quality, where can I find the mapping to specific working points?

Thank you!

Hi @fjumawan ,

This has tripped up people inside ATLAS as well. Can I ask which documentation you’re looking at that says the working points should be 0-5? (Just up front: this problem is not well documented, which I will try to improve; I’d just like to know which documentation you’re reading)

The issue is that our MuonCreatorTool, which makes the muons, checks the muon quality and checks if the muon passes the ID cuts. If it passes the ID cuts, it sets an extra bit in the quality, so for the majority of muons you want to check for 8–13 rather than 0–5. For most analyses you want to throw out anything that doesn’t pass the ID cuts, so better to cut out muons with quality<8 than just check quality%8.

Best,

Zach

Hi @zmarshal,

Thank you for the answer!
I found this code of a MuonSelectionTool from ATLAS software (link). On line 179, it states that

Quality to select. Values correspond to 0=Tight, 1=Medium, 2=Loose, 3=VeryLoose (only for debug, not supported), 4=HighPt, 5=LowPtEfficiency"}

I am aiming to use the “Medium” Quality Muons in my analysis. Is there any documentation for the new mapping of the “Medium” quality muons from 8-13?

Thank you!

Best,

Francis

Hi @fjumawan ,

It should be the setup, just offset, so is_medium = (quality==8 || quality==9)

I’ll try to get that into the documentation ASAP. You found a good spot (it’s just a shame this isn’t documented there!)

Best,

Zach

1 Like