Exploring JavaScript and ROOT technologies to create Web-based ATLAS analysis and monitoring tools

We explore the potential of current web applications to create online interfaces that allow the visualization, interaction and real cut-based physics analysis and monitoring of processes through a web browser. The project consists in the initial development of web- based and cloud computing services to allow students and researchers to perform fast and very useful cut-based analysis on a browser, reading and using real data and official Monte- Carlo simulations stored in ATLAS computing facilities. Several tools are considered: ROOT, JavaScript and HTML. Our study case is the current cut-based H → ZZ → llqq analysis of the ATLAS experiment. Preliminary but satisfactory results have been obtained online.


Introduction
The cut-optimization procedure is a very time-consuming process during the development of a physics analysis. When immersed in the coding procedure, the researcher often is not able to think about the physics of the data studied until a plot is produced. The idea is to simplify the beginning of the analysis, where the researcher follows the behavior of variables while making cuts in an "on the fly" regime. Nowadays, powerful computers and faster internet connections allow the analysis of large sets of data using a web browser in ways that were impossible just a few years ago. This permits simple but useful analysis with a performance compatible with a ROOT [1] session run on a laptop or an user interface facility. In order to show the advantages of our online tools, and the possibility to use them for a real analysis, we took Monte-Carlo (MC) samples for the Higgs [2] decay H → ZZ → llqq and Standard Model background processes and applied a simplified version of cuts from H → ZZ → llqq analysis [3] of the ATLAS[4] Experiment using a website form. In this exercise, the numbers of remaining events after each cut are very close to those from the official analysis (see Table 1). Apart from locating such scripts on single web-pages, it is also possible to include them in TWiki[5] pages, that are widely used for sharing updates, analysis strategies, status of current studies, preliminary results, cutflow comparisons, and so forth within the collaboration. All this, together with commercial analytical services (i.e. provided by Google [6]) can be used not to produce a final paper plot, but to create a faster way to exchange ideas, tutorials, classes and real useful information for the ATLAS analyses for the next data taking at LHC, so-called Run 2, where one of the aspects to take in consideration is the huge amount of data, analyses, tunings and techniques to put under review and test for the coming years.

Objectives and Vision
We can summarise the objectives of this work in the following way: • Create a web-based system that allows physics or performance analysis selections over real ATLAS samples in ROOT format. • Generate a collaborative tool where students and researches can learn how to perform new and current physics analysis. • Generate fast preliminary results for checks of selection performance, sample production integrity or online monitoring.

Workflow of an ideal Web Analysis
The cycle ( Figure 1) starts with the reading of the input files from a local disk in the server or an external repository in one of the ATLAS distributed computer facilities (GRID) [7]. The server reads, filters and transforms the files, sending them to the client. The analyzers can work with them in a browser using custom JavaScript[8] applications, performing online selections and send the results to the server, recreating and delivering a ROOT file to the client as a product of the performed work. Due to the fact that this is an ongoing project, some of the procedures mentioned below have been developed successfully, and others are still under construction:

Request of input files
The client asks for input files using a menu and/or inserting a string. This request is sent to the server which looks for the files in its internal storage or on the GRID using https protocols. In principle, some kind of identification procedure has to be performed, using the GRID certification that every member of the collaboration has, and/or some account for external user (e.g. students). This step is under development.

Scan of the input files
The ROOT files must be scanned looking just for the variables that are needed in the current web analysis, to perform a transformation to comma-separated values (.csv ) format files that will be sent to the client as the JavaScript application input. This step has been developed.

Working with the Web-Apps
The creation of the .csv files is done and the analyzer can perform different selections or cuts on the variables one by one or in any desired combination to create a physics analysis test and/or optimization without coding and just using bars or mouse selection in the webpage. This step has been developed.

Converting selection in .csv files
At the end of the online selections (cuts) those results are recorded by the client and saved as .csv files using an user-button execution. This will send those files to the server for conversion. This step is under development.

Sending .csv output files
Final results for all the variables used in the online analysis are saved in .csv files. Using PHP instructions those files are sent to the server where a temporary folder stores the files for conversion. This step is under development.

Transformation to ROOT files
The results in .csv files are transformed to ROOT files using the inverse scripts of the step one of this workflow. A temporary HTML page is created to allows the user to download her/his final results. This step has been developed.

Scan of the input files
Visualization of the output ROOT files can be done using it web browser 1 or another web application, as in Figure 4. This step has been developed.

Current Results
As an example, we considered different signal and background MC samples for the H → ZZ → llqq analysis in order to check how large will be the possible differences in the number of events remaining after some basic cuts from official analysis [3] in the Cross-Filter [9] web-page and those from the official cutflows. For example, for the MC signal sample H → ZZ → llqq for 400 GeV Higgs (see Figure 5) we applied the following cuts: • OppositeSign: The product of the charges of the two selected muons should be equal to -1.
• TwoJets: The number of jets should be at least 2.
• DileptonMass: The invariant mass of the two leptons must be between 83 GeV and 99 GeV .
• MET: The value of the Missing Transverse Energy should be less than 60 GeV .
• NumTagJets[0-1-2]: Number of b-jets is equal to 0 (or 1 or 2). As a note, the analysis is divided in three categories with respect to the number of b-jets, so this and the next 2 cuts are applied for each of the cases: 0 or 1 or 2 b-jets into the event.  Table 1 shows how the number of events changes after the cutflow for the electron channel. The numbers after each of the cuts are close by ≈ 1%, this is quite good for the pre-analysis. Again, our objective is not to do the complete analysis, but to simplify and speed-up the estimation of the right cuts. These would then need to be clarified in the next stage with the usual coding procedure.
Here you can find the Cross-Filter web-pages for signal and background MC samples for H → ZZ → llqq analysis processes 2 :  Figure 5. Some views of the web-based analysis tool in action. It is showed some cuts in variables relative H → ZZ → llqq ATLAS analysis.

Conclusions
Several tools and examples have been tested and preliminary results show that it is possible to handle a simple cut-based analysis in a browser using web applications. The ATLAS H → ZZ → llqq analysis was used to test the performance and the numbers obtained after each of the cuts are rather close [10]. Part of such applications, like the JavaScript Scatter-Matrix Libraries were already developed and we considered them as example tools, mostly, for data visualisation. Another tool, JavaScript Multivariable Cross-Filter, was rewritten and it was found particularly useful for the pre-analysis since it is visual and allows to see the behaviour of the variables in real time. The current project is to complete the workflow (as in 3) and start to test the website using current ATLAS analyses at the so-called Run 2, where already several groups have shown interest to see how this project can be extended for current and new physics analysis, monitoring and outreach of the HEP.