Versions Compared

Key

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

Area detector analysis in smalldata_tools is handled using sublclasses of DetObjectFunc. In order to be itnegrated in the workflow, the function must subclass that object.

Let's start with an example of how to add a ROI function to a detector and process it over a couple events:

Code Block
languagepy
themeRDark
titleDetObjectFunc simple example
from smalldata_tools.DetObject import DetObject, DetObjectFunc
from smalldata_tools.SmallDataUtils import getUserData
from smalldata_tools.ana_funcs.roi_rebin import ROIFunc

exp = 'xpptut15'
run = 650
dsname = f'exp={exp}:run={run}'
ds = ps.MPIDataSource(dsname)

det = dobj.DetObject('jungfrau1M', ds.env(), int(run))