Coder Social home page Coder Social logo

colevent's Introduction

colevent

Tools for the Les Houches Event File (LHEF) and LHC Olympics (LHCO) data analyses using C++. If you want to use Haskell, see lhevent.

Prerequisite

  • C++ compiler supporting C++11 features (Clang >= 3.3, GCC >= 4.8.1),
  • (optional) ROOT.

Installation

./configure
make
make install

If ROOT is not located in the system path, it can be set by ./configure --with-rootsys=path/of/root.

  • Nix users can build this package by running
nix-build

See default.nix.

Usage

  • LHEF
#include <fstream>
#include <iostream>
#include "lhef/lhef.h"

int main(int, char *argv[]) {
    std::ifstream fin(argv[1]);
    auto event = lhef::parseEvent(&fin);
    for (int ieve = 1; !event.done(); event = lhef::parseEvent(&fin), ++ieve) {
        std::cout << "-- event : " << ieve << '\n';
        const auto final_states{lhef::finalStates(event)};
        std::cout << lhef::show(final_states) << '\n';
    }
}
  • LHCO
#include <fstream>
#include <iostream>
#include "lhco/lhco.h"

using std::cout;

int main(int, char *argv[]) {
    std::ifstream fin(argv[1]);
    auto event = lhco::parseEvent(&fin);
    for (int ieve = 1; !event.done(); event = lhco::parseEvent(&fin), ++ieve) {
        cout << "-- event : " << ieve << '\n';
        for (const auto &j : event.jets()) { cout << lhco::show(j) << '\n'; }
        cout << "missing energy = " << lhco::missingET(event) << '\n';
    }
}

See also test_parser_@(lhco|lhef).cc and test_render_@(lhco|lhef).cc in src.

Setting flags might be necessary for building your programs. For example, you can add

COLEVENT := /path/to/colevent
CXXFLAGS += -I$(COLEVENT)/include/colevent
LDFLAGS  += -L$(COLEVENT)/lib -lcolevent

to the Makefile.

If it has been installed to the system path, pkg-config will provide the proper flags:

pkg-config --cflags --libs colevent

References

colevent's People

Contributors

cbpark avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.