<jupyter_start><jupyter_text>Simple ATLAS AnalysisCrude form to fetch ATLAS data and plot it<jupyter_code>from func_adl_servicex import ServiceXSourceUpROOT
from func_adl import ObjectStream
from servicex import ignore_cache
from hist import Hist
import mplhep as mpl
import awkward as ak

from utils import files
def make_ds(name: str):
    '''Create a ServiceX Datasource for a particular ATLAS Open data file
    '''
    return ServiceXSourceUpROOT(files[name]['files'], files[name]['treename'], backend_name='dev_uproot')
def apply_event_cuts (source: ObjectStream) -> ObjectStream:
    '''Event level cuts for the analysis. Keep from sending data that we aren't going to need at all in the end.
    '''
    return (source
        .Where(lambda e: e.trigE or e.trigM))
ds = make_ds('ggH125_ZZ4lep')
good_events = apply_event_cuts(ds)
data = (good_events
    .Select(lambda e: {
        'lep_pt': e['lep_pt']
        })
    .AsAwkwardArray()
    .value())
len(data['lep_pt']), len(ak.flatten(data['lep_pt']))<jupyter_output><empty_output><jupyter_text>Some info on how the cuts are going

| cuts |  Events |  Leptons |
| -: | -: | -: |
| None | 164,716 | 659806 |
| E/M Trigger |  164,715 | 659802 |

Total datasize of the full query: 25 MB<jupyter_code>ak.count(data['lep_pt'], axis=1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11277072442120986, 'fraction_numerical': 0.02315160567587752, 'mean_word_length': 4.214007782101167, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '290676', 'license': 'MIT', 'n_tokens_mistral': 501, 'n_tokens_neox': 461, 'n_words': 129, 'path': 'notebooks/atlas-demo-fetch-good-lepton-info.ipynb', 'repo_name': 'ivukotic/opendata-higgs-discovery', 'size': '1339'}