BjetTLA.jl
Run 3 TLA analysis with Beautiful jets
ANA-EXOT-2024-01
The scope of this package is to take TLA private ntuples (produced by these xAH config files) and produce analysis plots and histograms. In the future, it may include also fitting or statistical interpretations.
If you have access to /eos/atlas
are, you can find the input files at:
/eos/atlas/atlascerngroupdisk/phys-exotics/jdm/ANA-EXOT-2024-01_dibjetISR/ntuples
If you are running analysis on AF UChicago, you can find the same set of input files at:
/data/jiling/TLA/eos_ntuples
Note
See Private ntuple schema page for the full description about data and how it's prepared.
To get the "right" number of expected events into histograms when using MC samples, you need to worry keep track of weights. In particular, you need three weights, the sumOfWeight
and pmgWeight
are not event-wise, you obtain them from metadata (either in a histogram inside the same file, or from a PMG file on /cvmfs/
are), see also get_pmg_weight
.
julia> using BjetTLA, UnROOT, FHist
julia> file_path = "/data/jiling/TLA/eos_ntuples/mc23a/Zprime_bb/user.sfranche.510392.MGPy8EG_S1_qqa_Ph25_mRp125_gASp1_qContentUDSC.e8514_s4162_r15315._nv0.1_tree.root/user.sfranche.38342968._000001.tree.root";
julia> weight_hist = UnROOT.parseTH(ROOTFile(file_path)["MetaData_EventCount"]; raw=false);
julia> sumOfWeight = bincounts(weight_hist)[3]
111726.1421289444
julia> dsid = BjetTLA.extract_dsid(file_path)
"510392"
julia> pmgWeight = BjetTLA.get_pmg_weight(dsid)
0.7831930217100002
Then you can write your event-loop and fill histograms using the obtained weights in combination with the per-event evt.mcEventWeight
:
julia> tree = LazyTree(file_path, "TreeAlgo_noCalib/nominal");
julia> myhist = Hist1D(; binedges = 0:10)
julia> for evt in tree
genWeight = evt.mcEventWeight
wgt = genWeight * (pmgWeight / sumOfWeight)
n_hard_photon = count(>(20), evt.ph_pt)
push!(myhist, n_hard_photon, wgt)
end
julia> myhist
edges: [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
bin counts: [0.010480257533107834, 0.26589324498441064, 0.004167311195126139, 3.1301815413685986e-5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
total count: 0.2805721155280583
At the end of this example, the bincounts of myhist
correspond to number of expected events for this signal process if we have
julia> run2022_lumi = 24537.39;
julia> myhist * run2022_lumi
edges: [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
bin counts: [257.1581663903048, 6524.326250548028, 102.25494004617617, 0.7680648525136243, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
total count: 6884.507421837022
The packages that are good to be familiar with: