spine.ana.template
Analysis module template.
Use this template as a basis to build your own analysis script. An analysis script takes the output of the reconstruction and the post-processors and performs basic selection cuts and stores the output to a CSV file.
Classes
|
Template analysis script showing the expected AnaBase interface. |
- class spine.ana.template.TemplateAna(arg0: Any, arg1: Any, obj_type: str | Sequence[str] | None = None, run_mode: str | None = None, **kwargs: Any)[source]
Template analysis script showing the expected AnaBase interface.
- Attributes:
dep_modesDictionary which maps the name of a true object deposition attribute with the underlying deposition array it points to.
keysDictionary of (key, necessity) pairs which determine which data keys are needed or optional for the analysis script to run.
point_modesDictionary which maps the name of a true object point attribute with the underlying point tensor it points to.
Methods
__call__(data[, entry])Runs the analysis script on one entry.
append(name, **kwargs)Append a row to a CSV log file.
close_writers()Close all CSV writers and flush any remaining data.
flush_writers()Flush all CSV writer buffers without closing the files.
get_base_dict(data)Builds the entry information dictionary.
get_index(obj)Get a certain pre-defined index attribute of an object.
get_points(obj)Get a certain pre-defined point attribute of an object.
initialize_writer(name)Adds a CSV writer to the list of writers for this script.
process(data)Pass data products corresponding to one entry through the analysis.
update_keys(update_dict)Update the underlying set of keys and their necessity in place.
- name = 'template'