ReadFileBase
- class nndm_library.ReadFileBase(path, recursive=False, ext='.txt', relabel_events=True)[source]
Class to read the labeled data coming in a format like the following:
data1 data2 data3
v11 v12 v13
. . .
. . .
. . .
vn1 vn2 vn3
where data1, data2, … respresent names and vij, a value in the given i row and column dataj.
- Parameters
path (string) – the direction to the file containing all the events information.
recursive (bool) – read all the .lhe files found in all paths inside a given files_dir
ext (str) – extension of the files to read
relabel_events (bool) – there is an id for each possible event. For instance a collision have an id for it and two sub ids for the particle that interact in it. When relabel_events is True, the values of id are associated unequivocally with each event.
- Variables
data – dataframe with the read events
files_dir – directory with the name of the files read and its id
- add_angle(axes=['px', 'py', 'pz'], angle_axis='pz')
Calculate the angle of the particles starting from a list of the form [px, py, pz]. This with respect to the “axis” element.