Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jim Pivarski
    @jpivarski
    @eduardo-rodrigues Thanks!
    Sezen Sekmen
    @ssekmen
    hello
    hbprosper
    @hbprosper
    hello!
    Eduardo Rodrigues
    @eduardo-rodrigues
    Hi everyone! Shame I missed the workshop, but I will try and catch up with the discussions.
    Gokhan Unel
    @unelg
    hello
    Jim Pivarski
    @jpivarski
    On the theme of the SQL relational model being good but the syntax being bad, there's this article: https://edgedb.com/blog/we-can-do-better-than-sql/ It's written by the EdgeDB developers pushing their alternative, but EdgeDB looks pretty good. Perhaps these EdgeDB expressions could be blocked into regions and systematic variations (per-event) and used to feed histograms?
    hbprosper
    @hbprosper
    Interesting article!
    Gabriele Benelli
    @gbenelli
    Testing the room :)
    hbprosper
    @hbprosper
    We need to start conversing!
    hbprosper
    @hbprosper
    Jim, if you're online, I have a question. Do you see any difficulty (conceptual or otherwise) in, on the one hand, having an ADL (in which no explicit loops occur) designed to be natural to a particle physicist, while on the other hand, having at least one backend that maps the AST to a model in which data are analyzed using some of the things you showed us? I don't see any difficulties, in principle. But, maybe, there are difficulties in practice. I don't see any!
    Jim Pivarski
    @jpivarski
    @hbprosper (I happened to find this accidentally—I won't get a notification unless you "@" me.) things that I showed you? The answer is probably yes...
    hbprosper
    @hbprosper
    @jpivarski Yes! for example, in your ADL talk at the LPC and in the one you gave this week at the CMS ML workshop; those things! The fact that the transpiler adl2tnm spits out a C++ program that uses a "traditional loop over events model" does not necessarily imply that the ADL is tied to that model. Indeed, I can imagine a transpiler that spits out a python program that hides completely the "loop over events model" in favor of the manipulation of large jaggedarrays in the manner in which you described in your talks.
    Jim Pivarski
    @jpivarski
    I think that Mason
    (@masonproffitt) I think that Mason in Gordon's group is transforming the LINQ-based ADL into both C++ and awkward-array.
    Jim Pivarski
    @jpivarski

    Hello @/all,

    Following up on Gordon's "SQL per event" idea, I implemented an SQL-like language that operates on particle physics events (named PartiQL). The implementation with explanations and executable notebooks on Binder can be found here:

    https://github.com/jpivarski/PartiQL#readme

    In short, if you have a complex combinatorics problem like @masonproffitt's Benchmark 8, "For events with at least three leptons and a same-flavor opposite-sign lepton pair, find the same-flavor opposite-sign lepton pair with the mass closest to 91.2 GeV and plot the pT of the leading other lepton," you can express it like

    leptons = electrons union muons
    
    cut count(leptons) >= 3 named "three_leptons" {
    
        Z = electrons as (lep1, lep2) union muons as (lep1, lep2)
                where lep1.charge != lep2.charge
                min by abs(mass(lep1, lep2) - 91.2)
    
        third = leptons except [Z.lep1, Z.lep2] max by pt
    
        hist third.pt by regular(100, 0, 250) named "third_pt" titled "Leading other lepton pT"
    }

    Nowhere in this are there any general-purpose functions: it's all done with set arithmetic (union, except) and an SQL-like surrogate key index. The purpose of this demo is to show what an idea like this can do, for incorporation into future languages.