Abstract

This note introduces CutLang, a domain specific language that aims to provide a clear, human readable way to define analyses in high energy particle physics (HEP) along with an interpretation framework of that language. A proof of principle (PoP) implementation of the CutLang interpreter, achieved using C++ as a layer over the CERN data analysis framework ROOT, is presently available. This PoP implementation permits writing HEP analyses in an unobfuscated manner, as a set of commands in human readable text files, which are interpreted by the framework at runtime. We describe the main features of CutLang and illustrate its usage with two analysis examples. Initial experience with CutLang has shown that a just-in-time interpretation of a human readable HEP specific language is a practical alternative to analysis writing using compiled languages such as C++.Program summaryProgram title: CutLangProgram Files doi:http://dx.doi.org/10.17632/pym39s7vy7.1Licensing provisions: GNU General Public License 3 (GPL)Programming language: C++Nature of problem: Obtaining a physics result from high energy collider (e.g. LHC) data typically involves complex software frameworks for data analysis. Operating such analysis frameworks usually demands high computational expertise from the physicists, which makes trying simple analysis ideas difficult. The difficulty can be overcome by decoupling the description of all physics components of an analysis from the software framework. Analyses would thus be fully and unambiguously described by a framework-independent domain specific language. Defining such a language, which would be text-based and human readable is the first problem this paper investigates. Once a text-based language is available, a major task is to write an interpreter (or compiler) that converts it into instructions that can actually be executed, perhaps in some framework. The second problem addressed here is to write an automated, just-in-time interpreter to perform this task.Solution method: CutLang addresses the above problems by first constructing a domain specific language which aims to provide a clear, human readable way to define high energy physics analyses. The language is capable of defining various components of the analysis like object selection, event selection, and allows analysis tools like variable definition, χ2 minimization, multiple selection regions definition and many others. CutLang also provides an automated interpretation framework for the language, which is achieved using C++ classes as a layer over the CERN ROOT framework. The interpreter evaluates each component of the analysis description at runtime, without compilation. It handles event selection by classes which consist of a function that evaluates event-by-event object or event related quantities, a comparison operator, and one or two limit values, For each evaluation, the function result is compared to the limit values to find a boolean result of 0 or 1. Multiple selection criteria are combined together using logical operators. CutLang evaluates such expressions numerically by first converting them into Reverse Polish Notation, and then by parsing them with the Shunting Yard algorithm. Several properties of the interpreter are being able to work with multiple particle types, allowing particle combinations to make new particles, offering standard functions, histogramming, etc.Additional comments including restrictions and unusual features: The CutLang language and interpreter can work for a large number of physics analyses at the LHC. However it would benefit from some generalizations which would make it eligible for a larger variety of analysis. These generalizations could be achieved by inclusion of external functions for computing analysis-related variables, and allowing user-defined particle collections.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call