TWiki> LHCb Web>LHCbComputing>LoKi>LoKiLUG (revision 1)EditAttachPDF

LoKi User Guide


LoKi is a package for the simple and user-friendly data analysis. LoKi is based on Gaudi architechture. The current functionality of LoKi includes the selection of particles, manipulaton with predefined kinematical expressions, loops over combinations of selected particles, creation of composite particles from various combinations of particles, flexible manipulation with various kinematical constrains and access to Monte Carlo truth information.

User Guide


All off-line OO software for simulation, digitization, recontruction, vizualization and analysis, for LHCb~\cite{LHCbTP} collaboration is based on Gaudi framework. All software is written on C++, which is currently the best suited language for large scale OO software projects. It is worth to mention here that for the experts coding in C++ is like a real fun. The language itself and its embedded abilities to provide ``ready-to-use'' nontrivial, brilliant and exiting solution for almost all ordinary, tedious and quite boring problems seems to be very attractive features for persons who has some knowledge and experience with OO programming. Unfortunately C++ requires significant amount of efforts from beginners to obtain some first results of acceptable quality. An essential static nature of the language itself requires the knowledge of compilation and linkage details. In addition quite often in the ``typical'' code fragments for physical analysis the explicit C++ semantics and syntax hide the ``physical'' meaning of the line and thus obscure the physical analysis algorithm. Often a simple operation corresponding to one ``physics'' statement results in an enormouse code with complicated and probably non-obvious content:

    ParticleVector::const_iterator im;
    for ( im = vDsK.begin(); im != vDsK.end(); im++ ) {
      if((*im)->particleID().pid() == m_DsPlusID||
      (*im)->particleID().pid() == m_DsMinusID) vDs.push_back(*im);
      else if((*im)->particleID().pid() == m_KPlusID||
      (*im)->particleID().pid() == m_KMinusID) vK.push_back(*im);
        log <<MSG::ERROR<< " some message here "<<endreq;
        return StatusCode::FAILURE;

The usage of comments becomes mandatory for understanding makes the code even longer and again results in additional complexity.

The idea of LoKi package is to provide the users with possibility to write the code, which does not obscure the actual physics content by technical C++ semantic. The idea of user-friendly components for physics analysis were essentially induced by the spirit of following packages:

  • KAL language (Kinematical Analysis Language) by genius Hartwig Albrecht. KAL is an interpreter language written on FORTRAN (It is cool, isn't it?). The user writes script-like ASCII file, which is interpreted and executed by standard KAL executable. The package was very successfully used for physics analysis by ARGUS collaboration.
\item {\sc{Pattern}}~\cite{Pattern}\index{{\sc{Pattern}}} and {\sc{GCombiner}}~\cite{GCombiner}\index{{\sc{GCombiner}}} packages by Thorsten Glebe. These nice, powerful and friendly C++ components are used now for the physics analysis by HERA-B collaboration \item Some obsolete {\sc{Clhep}}~\cite{Clhep}\index{{\sc{Clhep}}} classes, like {\tt{HepChooser}} and {\tt{HepCombiner}} \index{{\sc{Clhep}}!{\tt{HepChooser}}} \index{{\sc{Clhep}}!{\tt{HepCombiner}}} \item {\sc{Loki}}~\cite{Loki}\index{{\sc{Loki}}} library by Andrei Alexandrescu. The library from one side is a ``state-of-art'' for so called generic meta-programming and compile time programming, and simultaneously from another side it is the excellent cook-book, which contains very interesting, non-trivial and non-obvious recipes for efficient solving of major common tasks and problems. \end{itemize}

-- Main.ibelyaev - 11 Jul 2007

Edit | Attach | Watch | Print version | History: r9 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2007-07-11 - VanyaBelyaev
    • 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-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback