This project was part of Google Summer Of Code 2021 under CERN-HSF organisation. Mentors Daniel Johnson and Thomas Kuhr belong to HFLAV group in CERN. All the work done for GSoC is contained in this single repository.
Title - Add support for in-browser interactive averaging of physics results
Project Proposal Link - https://docs.google.com/document/d/183ITuSvIMG3v7gPLlFWi2ONiAPeLQZEcs5Es1k-OSPU/edit?usp=sharing
Project Link( GSoC Website ) - https://summerofcode.withgoogle.com/projects/#5762974599348224
PreTask Repository Link - https://github.com/harshnitk17/hflav
Project Repository Link - https://gitlab.cern.ch/hflav/b2charm-webpage
Application Deployment Link - https://averages-hflav-b2charm-tst.app.cern.ch/
Student - Harsh Prakash Gupta (harshprakashgupta@gmail.com)
Mentors - Thomas Kuhr (Thomas.Kuhr@lmu.de) & Daniel Johnson (d.j@cern.ch)
The application uses PostgreSQL Database to store and process data and DJANGO framework as backend. Before setting up Django application, we need to install PostgreSQL on our local machine. All python libraries including Django must be preferably run inside a virtual python environment.
Follow this tutorial from DigitalOcean on how to install PostgreSQL
Upgrade pip to latest version :
python3 -m pip install --user --upgrade pip
Installing virtualenv :
python3 -m pip install --user virtualenv
Creating a virtual environment :
python3 -m venv <environment_name>
Activating a virtual environment :
source <environment_name>/bin/activate
Clone b2charm-webpage repository :
git clone https://gitlab.cern.ch/hflav/b2charm-webpage.git
Go inside the directory :
cd b2charm-webpage
Install required dependencies :
pip3 install -r requirements.txt
Project depends upon some environment variables to figure out database connections
Open ~/.bashrc file : sudo gedit ~/.bashrc
Add the following lines in bashrc file and save it.
export DATABASE_SERVICE_NAME=postgresql
export DATABASE_ENGINE=postgresql
export DATABASE_NAME=<database_name>
export DATABASE_USER=<database_user>
export DATABASE_PASSWORD=<database_password>
export postgresql_SERVICE_HOST=127.0.0.1
export postgresql_SERVICE_PORT=5432
export DJANGO_SECRET_KEY=<django_secret_key>
Run makemigrations command : python3 manage.py makemigrations
Migrate : python3 manage.py migrate
Dump data into database : python3 manage.py runscript dump_data
Generate plots for each branching fraction : python3 manage.py runscript generate_graphs
Run Development server : python3 manage.py runserver <port_number>
Go to : localhost:<port_number>
, from any browser.
1. Yellow columns (Initial Particle and Type of observable) are single-select only i.e. can't select more than one option from a column at a given time.
2. Blue columns (Charm mesons,etc.) are multi-select i.e you can select more than one filter from a column at a given time.
3. You can select a filter by clicking on it, which will then turn green and then deselect the same filter by clicking again on it, which will turn it again back to grey.
4. For the multi-select filters you can also set the number of such particles present in branching fraction through "Child Particle Numbers" column. Clicking '+' increases number 1 and clicking '-' decreases number by 1.
5. To view details of an individual branching fraction, click on 'Detail' ,present on right side of each row.
6. To clear all filters i.e deselect everything, click 'Clear Filters' button present on top-right of the nav bar
7. To generate overview plot of select fractions, select the fractions you want to plot, by clicking on the checkboxes presnt at leftmost of each row, and click on 'Generate Overview Plot' button present at the bottom of the table.
The Heavy Flavour AVeraging (HFLAV) group is responsible for collecting and combining measurements made at different High Energy Physics (HEP) experiments, at CERN and other particle physics laboratories, and combining them using robust statistical procedures. This group helps various scientists and researchers all over the world working in the field of particle physics to find the state of the art results from all over the field of particle physics, containing different kinds of experiments and measurements. The ‘Beauty to Charm’ subgroup is responsible for combinations of various measurements that involve the decay of a particle containing a Bottom Quark(or b-quark) to any final state where one of the particles involves a Charm Quark (or c-quark).
HFLAV averages are published periodically in peer-reviewed publications and journals. The HFLAV website provides a live snapshot of the latest data obtained from these latest publications. So the scientists and researchers all over the world can have quick access to these averages essential to their work anytime. The website contains numerous branching fractions i.e different configurations of b quarks transforming into c quarks. The biggest issue present was that the website was static i.e. written in pure HTML and had no backend framework or a database to store data. Also the website was hosted using CERN's EOS service which could only handle static websites. Need grew for the website to support user input i.e dynamic website which can respond back on basis of user input. Present framework that was only HTML could not support such behaviour thus there was a need to switch framework. Framework used for this project is Django.
This project aims to improve the experience of users using the HFLAV website. These averages could be of greater value to the particle physics community if the accessibility, interactivity and visibility of the current website can be improved. Thus this project seeks to transform user interaction with HFLAV’s ‘Beauty to Charm’ averages. The plan to increase the accessibility is by redesigning the whole user interface, making it easier to find a relevant data point ( branching fraction), by making use of dynamic tables using the DataTables plugin in jQuery which would enable easier searching of a particular data point through various filters like Initial Particle, Final Particle, etc. Interactivity and visibility will be increased by allowing the user to pick various branching fractions and plot their overview plot ( a plot showing combined averages of selected fractions). Also earlier data was stored directly in HTML pages which was unsafe as well as inefficient , introducing a backend framework like Django allows us to use a Database system like PostgreSQL to store data in.
Week | Work Done | Corresponding Commits |
---|---|---|
Week 1 |
|
|
Week 2 |
|
|
Week 3 |
|
|
Week 4 |
|
|
Week 5 |
|
|
Week 6 |
|
|
Week 7 |
|
|
Week 8 |
|
|
Week 9 |
|
|
Week 10 |
|
CERN's Platform-as-a-Service (PaaS) can be used to deploy and host applications in the CERN computing environment. The latest generation of CERN's PaaS is based on the newest community version of OpenShift: OKD4 (a.k.a. Openshift 4). You need a CERN username and password to access this service. [Link to OKD Web UI](https://paas.cern.ch/). Detailed documentation about this service and steps for deployment can be found [here](https://paas.docs.cern.ch/).