Demonstrates a simple plot of Muon Track pT from the CMS OpenData Higgs to 4 lepton dataset, size of 58.2 GB with 22 files and http://opendata.cern.ch/record/16 size of 6.7 TB with 1697 files.
For coffea-casa AF add in .servicex
configuration file the next endpoint:
api_endpoints:
- name: cms_run1_aod
endpoint: http://opendataaf-servicex-aod-servicex-app:8000
type: cms_run1_aod
from func_adl_servicex import ServiceXSourceCMSRun1AOD
from hist import Hist
import mplhep as mpl
# This is CMS data...
# mpl.style.use(mpl.style.CMS)
data = ServiceXSourceCMSRun1AOD("cernopendata://16") \
.SelectMany(lambda e: e.TrackMuons("globalMuons")) \
.Select(lambda m: m.pt()) \
.AsAwkwardArray(['mu_pt']) \
.value()
cernopendata://16: 0%| | 0/9000000000.0 [00:00]
cernopendata://16 Downloaded: 0%| | 0/9000000000.0 [00:00]
h = (Hist.new
.Reg(50, 0, 200, name='mu_pt', label='Muon Track $p_T$')
.Int64()
)
h.fill(data['mu_pt'])
_ = h.plot()