Scripted inline particle filter


PlutoScript is an in-line scripting language which is designed to operate inside the event loop in order to modify particles and variables. Observables can be calculated on-the-fly and projected to histograms and ntuples. This feature allows also to connect data objects (like acceptance or resolution TH1,2,3 matrices) with the Pluto event loop and develop high-level detector description ROOT-files which can be distributed and expanded by Pluto users with one single command.

The problem

One very common mission in event generation is to filter the produced events with an acceptance matrix and to smear the particle momenta with the detector resolution. The normal way is that for this purpose a collaboration provides a software package which included data (matrices) and software (handling of the matrices and smearing). But sometimes also ROOT macros together with ROOT files are provided. This means that the ROOT file and the analysis macro should be provided in a common package. This is unconvinient and can be even a source of mistakes (inconsistencies). Moreover, if the file format or the meaning of the axes of the matrices changes, also the analysis macro has to changed. Also, multi-particle correlations can be hardly described with matrices.

The solution

Starting with Pluto v5.35 the packing of ROOT objects with PlutoScript is possible. In order to fulfill the above-mentioned aim the script language provides the following features:

  • One can call all methods (also Set-methods) of the PParticle-object.
  • One can access the PUtilsREngine to do random sampling (flat, Gaus, ...)
  • The script provides loops, jumps and sub-programs features.
  • The "packed" ROOT file can be attached to the data base, script and matrices are extracted automatically.


Download our dummy detector and put the ROOT file in your working directory (where Pluto is installed, e.g. the macro dir)

//Load and extract the demo detector:
//Setup the reaction as usual:
PReaction my_reaction("3.5","p","p", "p p eta [g dilepton [e+ e-]]","eta_dalitz");
//Run the event loop:

Each filter is dumping a readme during extraction. Since a filter can be configured (by means of global variables), the readme should provide information about the handling of the filter file.