FilesManipulator

class nndm_library.FilesManipulator(path, particle_ids=None, var_of_interest=None, outgoing=False, verbose=0)[source]

General methods intended for the manipulation of the files and its names in a given directory(ies).

Parameters
  • path (string) – the direction to the file containing all the events information.

  • partcile_ids – ids of the particles to extract from the file according to the pdg,

By default: None, which means exctract all the particles. :type partcile_ids: list of integers

Parameters
  • var_of_interest (list of strings) – names of the variables to extract from the lhe. eg. [“e”,”angle”], [“e”,”px”,”py”] …. By default: None, which means exctract all the variables.

  • outgoing (bool) – filtrate to obtain all the outgoing particles

Variables

scan

it is a dictionary with the values of the benchmark points, each with its respective result sets of vaues of the variable of interest (var_of_interest). Note that the benchmark points are read from the name. Format is as follows: {particle_name}_{param1}_{value1}_{param2}_{value2}_{param3}_{value3}*.lhe An example would be eta_decay_events_mk_0.38_eps2_5.404557191441203e-07.lhe. Here we have pictorical description of the scan:

First, a list of ints is [int, int, …] == [(int)]. So a list of a list of floats is: [[(float)], [(float)], …] == [( [(float)] )] {id: [(int)], typ: [(str)], mk: [(float)], eps2: [(float)], px: [[(float)], [(float)], …], py: [( [(float)] )], pz: [( [(float)] )] } Note that momentum and energy are a list of arrays, where each array correspons to a param point