Giter Site home page Giter Site logo

ifnplugin's Introduction

IFNPlugin

This code provides an implementation of the interleaved flavour-neutralisation (IFN) algorithm from

Flavoured jets with exact anti-kt kinematics and tests of infrared and collinear safety, by Fabrizio Caola, Radoslaw Grabarczyk, Maxwell Hutt, Gavin P. Salam, Ludovic Scyboz, and Jesse Thaler https://arxiv.org/abs/2306.07314

The code is structured following the pattern of a FastJet contrib (but not yet included in fjcontrib).

The IFNPlugin code needs FastJet โ‰ฅ 3.4.1 to compile

You will need fastjet-config to be in your path (otherwise edit the Makefile), and then you can

  • build the library: make -j
  • build the example: make -j example
  • run the example: ./example < data/pythia8_Zq_vshort.dat
  • check the output is correct: make -j check

To learn how to use the library, the example.cc code is a good place to get started.

Main principles of IFN

The IFN algorithm uses a base jet algorithm (anti-kt or C/A) and generates a clustering sequence that is kinematically equivalent to that base algorithm. At each clustering step, the algorithm checks whether it needs to perform flavour "neutralisation" of the particles involved in the clustering. The neutralisation can occur with other particles in the event, not involved in the kinematic clustering.

Code Structure

Various flavour-related utilities are to be found in FlavInfo.hh:

// given a particle assign a pdg_id to it, either via a FlavInfo 
// (stores a static flavour)
PseudoJet particle = ...;
particle.set_user_info(new FlavInfo(pdg_id));
// or via a FlavHistory (can track the evolution of the flavour)
// particle.set_user_info(new FlavHistory(pdg_id));

// Retrieve the amount of flavour of a given kind, e.g. amount of b-flavour
// (example given for a particle with a FlavHistory)
FlavInfo flav_info = FlavHistory::current_flavour_of(particle);
// net amount of b-flavour
int nb = flav_info[5];
cout << "nb = " << nb << ", full description: " << flav_info.description() << endl;

The main interface to the IFN algorithm is in IFNPlugin.hh:

// create a base jet definition
JetDefinition base_jet_def(antikt_algorithm, R);
// create an IFNPlugin based on the jet definition, with 
// a given alpha (recommended values, either 1 or 2)
double alpha = 2.0;
JetDefinition jet_def(new IFNPlugin(base_jet_def, alpha));
jet_def.delete_plugin_when_unused();

The plugin can be used as standard with the FastJet package, e.g.:

vector<PseudoJet> particles;
// ... fill the particles ...
auto jets = jet_def(particles);
for (const auto & jet : jets) {
  cout << "jet pt = " << jet.pt() 
       << ", flav = " << FlavHistory::current_flavour_of(jet) << endl;
}

ifnplugin's People

Contributors

gavinsalam avatar scybozl avatar

Stargazers

matplo avatar

Watchers

 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.