NuWro / nuwro

The main distribution of NuWro
GNU General Public License v3.0
13 stars 15 forks source link

Filereading framework #13

Closed KajetanNiewczas closed 6 years ago

KajetanNiewczas commented 6 years ago

I have created a framework that allows for dynamic loading text files with data into nuwro. The format of the data is more or less YAML ("-" new point, "xxx:yyy" data, "#" comment). The essential files are automatically loaded according to params. Empty fields are automatically filled in: copied on the sides, interpolated between data points. For every dataset one declares the names of the fields and the type of interpolation in the code. In order to add new data to the existing dataset, one only needs to create a txt file with the name of the param and the value. Containers with data automatically do the interpolation. One just needs to set up the point of taking data and get the value for a proper field.

This framework has been implemented into NN part of the cascade and tested to work properly. The speed of the NN cascade itself reduced by 5%. It has been manually tested running the "kaskada" routine. This should come from the fact that now the data for nucleons has been split into 3 datasets (xsec, inel, angle), because "Oset" parametrisation only changes the "inel" part. Soon the new PDG data will only change the "xsec".