<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>October</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>DEVELOPMENT OF THE ELECTRONIC LOGBOOK FOR THE BM@N EXPERIMENT AT NICA</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>K.V. Gertsenberger</string-name>
          <email>gertsen@jinr.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>A.A. Moshkin</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>A.I. Chebotov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Konstantin Gertsenberger, Andrey Moshkin, Alexander Chebotov</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Laboratory of High Energy Physics, Joint Institute for Nuclear Research</institution>
          ,
          <addr-line>6 Joliot-Curie, Dubna, Moscow region, 141980</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2019</year>
      </pub-date>
      <volume>4</volume>
      <issue>2019</issue>
      <fpage>175</fpage>
      <lpage>179</lpage>
      <abstract>
        <p>The acquisition of experimental data is an integral part of all modern high-energy physics experiments. During experiment runs, not only data collected from detectors are important for understanding the produced collision events, but also records in a logbook, which are written by the shift crew and describe operating modes of various systems and detectors of the experiment and various types of occurred events. The article presents a new electronic logbook developed to automate the described process in the BM@N experiment, a fixed target experiment of the NICA project at the Joint Institute for Nuclear Research in Dubna. The online electronic logbook allows shift members to record information on current events, states of various systems, operation conditions of detectors and many others, which are further used in processing and physics analysis of the particle collision events. The system provides collaboration members with tools for convenient viewing, managing and searching for the required information in the logbook. The specialized Web service and application programming interface for storing and accessing the data are considered. The important task of integrating the online electronic logbook with the central experiment database is described. A set of auxiliary services has been developed and presented in the paper.</p>
      </abstract>
      <kwd-group>
        <kwd>NICA project</kwd>
        <kwd>BM@N experiment</kwd>
        <kwd>electronic logbook</kwd>
        <kwd>logbook platform</kwd>
        <kwd>online information system</kwd>
        <kwd>database</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The acquisition, storage, processing, and analysis of experimental data are an integral part of
modern high-energy physics experiments. These problems are of particular importance in the
experiments of the NICA (Nuclotron-based ion collider facility) megaproject [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], which is one of the
flagship projects of the Joint Institute for Nuclear Research in Dubna, due to the high interaction rate
and large multiplicity of events in heavy ion collisions. Therefore, the task of automating the
mentioned processes of data collecting, storing, processing and analysing is very urgent topic for the
NICA experiments.
      </p>
      <p>
        One of the key elements of the first stage of the NICA project is BM@N (Baryonic Matter at
Nuclotron) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], a fixed target experiment at extracted Nuclotron beams aimed at studying collisions of
ions with a fixed target at the energies up to 6 GeV per nucleon. Since 2015, a set of technical runs of
the BM@N experiment has been already conducted with deuteron, carbon, argon and krypton beams
collided with various targets at the beam energies from 2.3 to about 5 GeV per nucleon. The BM@N
detectors have recorded a large amount of experimental data being reconstructed and subsequently
analyzed.
      </p>
      <p>During runs of high-energy physics experiments, not only data obtained from detectors are
important for understanding the particle collision events, but also journal records made by shift
collaborators, which describe operating modes of various systems of the experiment, detectors, and
occurred events. Shift operators fill out a paper journal, in which they make notes about current
parameters of the experiment, as well as problems encountered in runs and taken actions and solutions.
Paper journals are quite traditional and have been used in experiment runs for a long time; however,
they are inconvenient in finding the necessary information and using it in further data processing and
physics analysis.</p>
      <p>
        The first version of the online electronic logbook for the first BM@N runs employed an
HTML table that was stored in a text file. The system solved the problem of finding the required
information on the Logbook Web page, but it did not provide the ability to search and access to the log
data for other software systems of the experiment, for example, for online histogramming, raw data
digitization and for data processing in the main BM@N software environment, BmnRoot [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. In
addition, the information in the logbook was recorded in a rather arbitrary format, which made it
impossible to automatically analyze stored parameters.
      </p>
      <p>The following main disadvantages of the first logbook system with the file storing approach
can be highlighted. Some of the logbook information was duplicated at different columns or never
used. There was no interface for searching and obtaining the required logbook data by external
BM@N systems for experimental data processing and analysis. The complexity of the task on
automatically parsing the text file of the logbook containing the tabular data in columns of arbitrary
formats in order to transfer necessary data to other information systems was comparable with the
complexity of creating an artificial intelligence. To solve the above problems, a new information
system with stricter rules was required.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Development of the Electronic Logbook for the BM@N experiment</title>
      <p>Today the use of databases is a prerequisite for storing and managing data in high-energy
physics experiments, therefore a new electronic logbook, called e-Log platform, was implemented
based on the developed database. The e-Log platform provides shift members with a web interface to
store and share information with offline users on various events or problems occurred in the BM@N
experiment during its operation. The information on current events, states of various experiment
systems, operation conditions of detectors and others, such as record type and time, current shift
leader, period and run number, status of the data acquisition system, trigger type, magnetic field
values, type of the beam particle and its energy, target and its width, and additional comment are
recorded during experiment runs. Then the required data can be read from the electronic logbook and
further used in the processing and physics analysis of the particle collision events.</p>
      <p>Since the logbook information is employed in analysis of experimental data in the BM@N
experiment, providing a correct multi-user access to the electronic logbook is important while
executing data processing algorithms. The e-Log platform uses the implemented Logbook Database to
store the experiment logbook data, ensure correct multi-user access, data consistency, integrity and
provide automatic regular data backup for cases of software errors or hardware failures. The diagram
of the database designed on the PostgreSQL database management system is shown in Figure 1.</p>
      <p>The main table with all logbook records (record_ table located in the center of the figure) uses
the following set of dictionaries:
● a dictionary of all possible beam particles;
● a dictionary of all possible targets;
● a dictionary of all possible trigger types;
● a dictionary of record types, such as ‘shift started’, ‘problem report’, ‘configuration’, ‘new
run’, etcetera;
● a list of the shift members.</p>
      <p>In addition, the e-Log platform allows attaching files to a record with some supporting
information, for example, a photo of corrected detector mapping.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Implementation of the Web and API interfaces for the e-Log platform</title>
      <p>To provide users with a convenient viewing, transparent managing and searching for the
required information in the electronic logbook and ensure a unified access to the logbook data for
various online and offline systems of the BM@N experiment, the Web-based and application
programming (API) interfaces have been developed.</p>
      <p>One of the important BM@N software systems that requires electronic logbook data is the
BmnRoot environment, which serves for event simulation, reconstruction of experimental and
simulated data and physics analysis of particle collisions with a fixed target at the BM@N facility. To
obtain logbook information for raw data digitization, event reconstruction and physics analysis tasks, a
specialized C++ programming interface has been developed as a set of C++ class wrappers for all
database tables with many specific functions. It allows for the access to the necessary data of the
electronic logbook without SQL statements from the experiment software, such as online
histogramming system, raw data digitizer and BmnRoot.</p>
    </sec>
    <sec id="sec-4">
      <title>4. The e-Log platform online integration and additional services</title>
      <p>
        The integration of the developed logbook platform into online data processing was
accomplished in the following way. When a shift operator records information on a new experiment
run into the electronic logbook, the fields, such as period and run numbers, beam particle and its
energy, target and magnetic field are automatically transferred to the Unified Database [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] of the
experiment for further use in the offline processing and analysis of the collision events. Moreover, the
online histogramming system converts raw data obtained from the detectors and fills the remaining
fields (start and end time of the run, event count, raw file path and its size) of the record in the BM@N
database.
      </p>
      <p>The e-Log platform is constantly improving via development of many additional services. An
email notification service of the logbook platform has been implemented. It has fully configurable
mechanism depending on different entry properties, such as record type (for example, “shift started”,
“problem report”, “configuration”, “inform all”) and systems affected list, and some specific user
actions. Users subscribed to certain types of events receive the notifications by email if a record of the
corresponding type is added to the electronic logbook. The section called Private Cabinet of the web
interface can be used to configure these email notifications.</p>
      <p>Another service, Logbook FreeIPA Authentication has been also implemented. The FreeIPA
system provides centralized authentication, authorization and account information by storing data
about BM@N users, groups and other objects necessary to manage the security aspects of the e-Log
platform. The central FreeIPA server has been deployed, and the collaboration members have been
registered to have an access to the electronic logbook. Three groups for administrators, shift operators
and readers have been created in the FreeIPA system to restrict user access to the e-Log platform,
depending on which the corresponding actions in the logbook interfaces are available.</p>
      <p>In addition, it is planned to develop an Auto Recovery Service for the e-Log platform in the
nearest future. The service will include Diagnostic and Recovery Agents, which will eliminate
downtime in the operation of the online logbook system in the case of hardware failures.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>The developed e-Log platform of the BM@N experiment is relevant and important for the
successful operation of the experiment. The implemented Web-based interface provides convenient
logbook viewing and managing for administrators, shift operators and users, and the developed C++
database interface ensures a unified access to the required logbook data for online and offline systems
of the experiment. A part of the logbook data is automatically transferred to the central database of the
experiment to use it in the offline event analysis. The developed additional services, such as email
notifications and FreeIPA authorization improve the functionality of the e-Log platform and increase
the convenience of its use by collaboration members of the experiment. The electronic logbook
platform was successfully tested, and now it is planned to expand the system for using it in the future
MPD experiment of the NICA project. The implementation of such information system is a necessary
step for the successful future operation of the NICA experiments. The detailed information on the
developed electronic logbook can be found on the BM@N official Web site: bmn.jinr.ru.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Acknowledgment</title>
      <p>The work was funded by the Russian Foundation for Basic Research (RFBR) grant according
to the research project №18-02-40125. The grant was assigned for the development of information
systems designed to increase the efficiency of acquiring, storing, processing and analyzing data of the
NICA experimental setups as well as providing collaboration members with a set of convenient
information services. The electronic logbook platform is one the first systems implemented in the
frame of this grant.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Kekelidze</surname>
            <given-names>V.D.</given-names>
          </string-name>
          <article-title>NICA project at JINR: status</article-title>
          and prospects // Journal of Instrumentation.
          <year>2017</year>
          . V. 12. P.
          <volume>06012</volume>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Baranov</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kapishin</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mamontova</surname>
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pokatashkin</surname>
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rufanov</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vasendina</surname>
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zinchenko</surname>
            <given-names>A</given-names>
          </string-name>
          .
          <string-name>
            <surname>The</surname>
            <given-names>BM</given-names>
          </string-name>
          @
          <article-title>N experiment at JINR: status</article-title>
          and physics program // KnE Energy &amp; Physics.
          <year>2018</year>
          . V. 3. pp.
          <fpage>291</fpage>
          -
          <lpage>296</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Batyuk</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gertsenberger</surname>
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Merts</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rogachevsky</surname>
            <given-names>O</given-names>
          </string-name>
          .
          <article-title>The BmnRoot framework for experimental data processing in the BM@N experiment at</article-title>
          NICA // EPJ Web of Conferences.
          <year>2019</year>
          . V. 214. P.
          <volume>05027</volume>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Gertsenberger</surname>
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rogachevsky</surname>
            <given-names>O.</given-names>
          </string-name>
          <article-title>The Unified Database for BM@N experiment data handling // EPJ Web of Conferences</article-title>
          .
          <year>2018</year>
          . V. 177. P.
          <volume>05001</volume>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>