Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All templates will start with a section where the experiment and run can be defined. The large commented block should be uncommented whenever actual data are being analyzed.


Sets of alias to better find the relevant quantities in the h5 files are also defined in the following cell, together with the quantity . This makes it convenient to change the target variable for the entire workflow, without having to change the variable name in each cell. The variables to be used for filtering (typically i0, timing tool fit, ...) are also defined here.

Code Block
languagepy
themeRDark
# helper dict to find data in file
dataDict = {'alias': 'path/in/the/h5',
			...
           }

filters =  {}
filters['alias_filt1'] = [low,high]
filters['alias_filt2'] = [low,high]
	...

print('Filter selection:')
for key,value in filters.items():
	print('\t{} : {}'.format(key, value))
hist_bins = {key: 35 for key in filters.keys()}

Make sure to adapt the alias to the detectors names in your actual data. The object rr (created from rr = tables.File(f).root) in the workspace allows for easy tab-exploration of the content of the h5 file to figure out variable names.

The goodness of the filters be be evaluated in the next cell, where histograms of the variables are shown together with the selected boundaries.