The access to the results is done by going to special page.

Additionally the previous results are available on this legacy page

A few points should be explained to fully utilize the capabilities of this tool.

  • It is possible to make a rectangular selection for specifing zooming limits with a mouse.

  • If one would just click the bin on the plot the tooltip with a value of that bin will appear.

  • In the "Statistics" groupbox one can see a minimum, maximum and average value of the bins in the current plane("2D-plane") or in the selected volume("3D-box"), the zoom limits are treated as border, if the "Zoom" checkbox is not selected, then entire volume/plane is used.

  • If the "overlap schematics" is checked, application looks for the closest to the point picture available. Also it is possible to select schematics manually.


UPDATE: Deployment is now done in OpenShift using

A very complicated task is the deployment, which consists of compiling application from sources, putting it to the right place, configuring of the web-server, configuration of the application itself, supplying data.

As for compilation the dependencies are the following: ROOT (, WT (, BOOST (

Some words about the WT framework (pronounced witty). This framework can generate applications with an internal web-server or provide FastCGI enabled executable modules. The FastCGI modules can run in two modes: the shared and the dedicated. The shared mode means all the sessions to the page correspond to a distinct threads contained in the one process of the FastCGI application. The dedicated mode results in every session launches a separeate process on the server side. The obvious benefit of using dedicated mode is that all the sessions are isolated from each other, a fault in one of them will not affect others. This is a preffered mode as all we know that sometimes ROOT just go into the backtrace loop after fault and should be killed manually. The operation mode can be changed in the "/etc/wt/wt_config.xml" file

How to deploy the compiled FastCGI modules is explained on the WT wiki ( I have installed the module on my workstation and configured it for a lighttpd web server. The only CERN related issue is to generate a proper SELinux policy. In the development stage I just switched SELinux to so called "permissive mode".

As for lighttpd "bin-path" in configuration file alse sets the working directory for FastCGI script to the place where it resides. Thus the configuration file ("layout.yaml"), root files with data and schematics pictures should be placed to the same working directory. Also if one does not want to fill system directories /usr/lib/ and /usr/local/lib/ with a project related libraries, they can be placed elsewhere, but the LD_LIBRARY_PATH enviroment variable should be corrected.

Some words about application configuration file.

The configuration file is "layout.yaml" it mostly consists of translation table for decrypting short abreviated identificators of the plots in the root file to somes more human friendly. The configuration file is written in YAML language (more information about YAML can be found on the or wikipedia).

Layout consists of three sections: the default mappings, the image dimensions and the overlay mappings.

--- # Defaults
- file:  none
  title: Default mappings
    - { key: VELOEqDo,    title: "VELO Dose Equivalent",     unit: 'mSv', conversion_factor: 1e-9,  limits: [1e-12,1e+6] } # avg_fort.40

--- # Images
- { file: pics/x0.png,    title: "Cross section X=0",        axis: x, type: yz, point:    0, hdim: [-800, 800], vdim:  [-1100, 2300] }

--- # Main configuration
- file:  maps_1.root
  title: Generic maps 3.5x3.5 TeV
  hide:  n
    - { key: sample.00, title: "Sample map", unit: "uSv/h", conversion_factor: 1.6e19, limits: [1e-5, 1e+5] }

I think the file itself is self-explaining. For example if there is an object in the ROOT file with a key avg_fort.40 and named "VELOEqDo", first of all it will be looked in the "Main configuration" section for appropriate file. If it will not be found in the main section, then it will be searched in the default section but not for a key==avg_fort.40, instead the name of the object "VELOEqDo" will be used. The results of simulation with a different conditions will have the same layout thus there is no need to duplicate the same information. Also it is possible to hide certain maps or even whole files from the user's vision by changing the "hide" property to 'y'.

As for images the PNG files with a transparent background are used. However the PNG file itself does not contain information about the orientation and dimensions when overlapped over the histogram, so it should be given in the configuration file.

The source of data for application is the ROOT files. There is no need to change the configuration file in order to make ROOT file visible in the web page. Just put new file into the working directory. Application will look for all ROOT files in the working directory and subdirectories recursively, if there is no information about this file in the configuration, the filename will be used as a title, so by using a reasonable filename like "bgsimulation_14TeV.root" one can eliminate a need to change the configuration file.

Some of maps are decided to be hidden and only seen by experts, this is done by utilizing "RESTRICTED_ACCESS" enviroment variable if it is set to "enabled" then users will not see the hidden maps and rootfiles. So two pages should be deployed, one with this variable set and another with the unset variable for experts.

How to make a new schematics pictures

The simpliest way is to lanch FLAIR load the input file with a geometry. Then one goes "Plot", Add "Geometry" plot double click it. And in the page appeared center(XYZ), the basis(X-Y or Y-Z or X-Z) and the extends should be set.

For example for a X=0 cross section, one can set center=(0,0,1000), basis=Y-Z and extends deltaU=700; deltaV=1000, so the ranges will be Y in [-700, 700] and Z in [0, 2000]. Then just click "PLOT" button. If the plot is correct then change the image format to PNG on the top and click "SAVE" button on the bottom.

Afterwards the PNG file just needs to remove all the numbers and be cropped to the frame. It can be easily done in GIMP, just delete the numbers and the use autocrop function. The frame will be still present so just make plots with a bigger dimensions so as the frame rectanlge will be out of view. Once the PNG image is complete, put it to the applications working directory and fix the configuration file so that the new image will be recognized.

How to make the ROOT files for web-application

The ROOT files should contain TH3F histograms. To convert results of simulation to the ROOT file I have a ROOT macro which internally calls ruby script to get usable information and print it in more distinct way. The macro circulate through some files in predefined directory and populate ROOT file with plots.

-- VasilyKudryavtsev - 11-Sep-2012

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r6 - 2019-09-24 - ChrisBurr
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback