APIο
Hitsο
- class liquidreco.hit.Hit(position=(None, None, None), time=None, weight=None, direction=(None, None, None), is_peak=(False, False, False))ο
Very generic detector hit, probably shouldnβt use directly, should instead use one of the derived classes
- dir_xο
x position of the hit
- dir_yο
y position of the hit
- dir_zο
z position of the hit
- is_peak(direction: str | None = None) boolο
Checks if this hit is considered
Can specify a direction to check if it is a peak in a particular direction i.e. more position info than just the fiber position
- Parameters:
direction (str) β Check if the hit is a peak in a specific direction, defaults to None
- Returns:
True if this hit is a peak hit
- Return type:
bool
- is_x_peakο
is a peak in x direction
- is_y_peakο
is a peak in the y direction
- posο
position of the hit
- set_direction(new_dir: Tuple[Any] | List[Any] | Dict[str, Any]) Noneο
Set a new direction for this hit
This will normalise the direction before setting the variables
- Parameters:
new_dir (Tuple[float]) β New direction (must have length 3)
- set_is_peak(new_is_peak: Tuple[Any] | List[Any] | Dict[str, Any]) Noneο
Set info about peakness of the hit
- Parameters:
new_is_peak (Tuple[bool]) β New position (must have length 3)
- set_position(new_pos: Tuple[Any] | List[Any] | Dict[str, Any]) Noneο
Set a new position for this hit
- Parameters:
new_pos (Tuple[float]) β New position (must have length 3)
- timeο
time of the hit
- weightο
the βweightβ of this hit. Typically the charge/light collected
- xο
x position of the hit
- yο
y position of the hit
- zο
z position of the hit
- class liquidreco.hit.Hit2D(pos=(None, None, None), fiber_pos=(None, None, None), time=None, weight=None, secondary_hits=None)ο
Describes a 2D WLS fiber hit
- static get_mean_pos(hits: List[Hit2D], direction: str) floatο
Get the mean position of a list of 2D hits in a particular dimension
- Parameters:
hits (List[Hit2D]) β The hits to take the average of
direction (str) β the dimension to take the average in. e.g. βxβ to get the mean x position βyβ for mean yβ¦
- Returns:
the weighted mean position
- Return type:
float
- set_fiber_position(new_fiber_pos: Tuple[Any] | List[Any] | Dict[str, Any]) Noneο
Set a new fiber position for this hit
- Parameters:
new_fiber_pos β New fiber direction (must have length 3)
- class liquidreco.hit.Hit3D(position=(None, None, None), voxel_x=None, voxel_y=None, voxel_z=None, time=None, weight=None, x_fiber_hit=None, y_fiber_hit=None, z_fiber_hit=None)ο
Describes a 3D hit constructed from two or three WLS fibers
- static from_fiber_hits(x_fiber_hit: Hit2D | None = None, y_fiber_hit: Hit2D | None = None, z_fiber_hit: Hit2D | None = None, n_required_peaks: int | None = None) Hit3Dο
Create a Hit3D from some 2D fiber hits
- Parameters:
x_fiber_hit (Hit2D) β The x fiber
y_fiber_hit (Hit2D) β The y fiber
z_fiber_hit (Hit2D, optional) β The (optional) z fiber, defaults to None
n_required_peaks (int) β require this number of peak hits to be present in each direction to successfuly create a hit. e.g. if n_required_peaks = 1 and 0 of the provided fibers are classified as z peaks, the hit will not be valid. defaults to None
- Returns:
The constructed 3D hit, None if the n_required_peaks condition is not satisfied in any direction
- Return type:
- liquidreco.hit.local_normalisation(event_hits, window_size, x_bins, y_bins, z_bins)ο
do a local normalisation of the hits so that lokal peaks have βchargeβ of 1 and hits in the neighbourhood have their charges normalised by this value
- liquidreco.hit.tuple_from_maybe_dict(vec: Tuple[Any] | List[Any] | Dict[str, Any]) Tuple[Any]ο
Geta tuple representing a 3 vector from input that could be iterable or could be dict of form {βxβ: *, βyβ: *, βzβ: *}
- Parameters:
vec (Tuple[Any] | List[Any] | Dict[str, Any]) β The variable to extract 3 vector from
- Returns:
3-tuple representing 3 vector
- Return type:
Tuple[Any]
Eventsο
- class liquidreco.event.Eventο
Holds event data, is read from and written to by the various modules
- add_data(key: str, data: Any) Noneο
Add some information about the event to the internal data table.
Can be whatever you want, hit positions, total energy deposited, a nickname for the event, go crazy!
- Parameters:
key (str) β A key for the data being added, used by modules to access the data
data (Any) β The actual data
- get_keys() List[str]ο
Get all the data containers that are currently available in this event
- Returns:
List of all the keys in the internal data table
- Return type:
List[str]
Modulesο
Accessing Modulesο
Base Modulesο
- class liquidreco.modules.module_base.ModuleBaseο
Base class of modules that can be run over events.
Any requirements should be given by name in the requirements member variable. Any outputs should be given by name in the outputs member variable.
To be overrriddenο
_process() - REQUIRED
_initialise() - OPTIONAL
_finalise() - OPTIONAL
_setup_cli_options() - OPTIONAL
_help() - OPTIONAL
- _check_outputs(event: Event) Noneο
Checks that the event has all the specified outputs
- Parameters:
event (Event) β the event to check
- Raises:
ValueError β if the event doesnβt have the promised outputs
- _check_requirements(event: Event) Noneο
Checks that the event has all the required inputs for this module
- Parameters:
event (Event) β the event to check
- Raises:
ValueError β if the event doesnβt have the required inputs
- _finalise() Noneο
Add anything here that is neaded to tear down the object e.g. closing any files, freeing resources etc.
- _help() strο
Should return a help string that will be printed to the command line for this module
Default behaviour is to use the class docstring of the module
- Returns:
helpful message about your module
- Return type:
str
- _initialise() Noneο
Set up anything here that needs to be initialised
This gets called AFTER argument parsing is done so anything that depends on command line inputs needs to go in here and NOT in the __init__() method
- abstract _process(event: Event) Noneο
This method should be implemented by any modules you write. Should process a single event and add any results to the event object.
- Parameters:
event (Event) β event to be processed
- Raises:
NotImplementedError β if not implemented
- _setup_cli_options(parser: ArgumentParser) Noneο
Override this to set up any command line options for this module
The parser passed to this will be a subparser associated with this module. you can call any number of commands defined by argparse which will then be available inside of your module via self.args.
- Parameters:
parser (ArgumentParser) β The subparser for this module
- finalise() Noneο
Tear down the module
- help() strο
Get help message for cmd line for this module
- Returns:
help string
- Return type:
str
- initialise() Noneο
Set up the module
- parse_args(args: List[str]) Noneο
Parse arguments for this module passed in from the command line
This sets the internally used args variable which lets user code access config arguments, so this should be called before the module is called on any events.
- Parameters:
args (List[str]) β List of arguments as strings
- Raises:
ValueError β if the arg parser has not yet been set up for this module
- parse_object(cfg_object: Dict[str, Any]) Noneο
Parse arguments for this module passed in as a dict
Use for parsing objects specified via json config. This sets the internally used args variable which lets user code access config arguments, so this should be called before the module is called on any events.
- Parameters:
cfg_object (Dict[str, Any]) β Dict containing arguments
- Raises:
ValueError β if the arg parser has not yet been set up for this module
- process(event: Event) Noneο
Process a single event
- Parameters:
event (Event) β event to be processed
- Raises:
ValueError β if the given event does not contain the specified pre-requisite inputs to at the start, or the promised outputs at the end
- setup_parser(parser: ArgumentParser) Noneο
Setup argument parser for this module
- Parameters:
parser (ArgumentParser) β The parser to be set up
Hit Buildingο
- class liquidreco.modules.hit_building.HitBuilder2Dο
Absolute base level module to build 2D hits from raw hit information
The starting point for any good reconstruction chain. Takes in raw hit info and turns it into more structiured hits.
- _initialise()ο
Set up anything here that needs to be initialised
This gets called AFTER argument parsing is done so anything that depends on command line inputs needs to go in here and NOT in the __init__() method
- _process(event: Event) Noneο
This method should be implemented by any modules you write. Should process a single event and add any results to the event object.
- Parameters:
event (Event) β event to be processed
- Raises:
NotImplementedError β if not implemented
- _setup_cli_options(parser)ο
Override this to set up any command line options for this module
The parser passed to this will be a subparser associated with this module. you can call any number of commands defined by argparse which will then be available inside of your module via self.args.
- Parameters:
parser (ArgumentParser) β The subparser for this module
- class liquidreco.modules.hit_building.HitBuilder3Dο
Makes 3D hits from 2d fiber hits
- _initialise()ο
Set up anything here that needs to be initialised
This gets called AFTER argument parsing is done so anything that depends on command line inputs needs to go in here and NOT in the __init__() method
- _process(event: Event) Noneο
This method should be implemented by any modules you write. Should process a single event and add any results to the event object.
- Parameters:
event (Event) β event to be processed
- Raises:
NotImplementedError β if not implemented
- _setup_cli_options(parser)ο
Override this to set up any command line options for this module
The parser passed to this will be a subparser associated with this module. you can call any number of commands defined by argparse which will then be available inside of your module via self.args.
- Parameters:
parser (ArgumentParser) β The subparser for this module
Peak Findingο
- class liquidreco.modules.peak_finding.HesseRidgeDetection2Dο
Performs βridge detectionβ using the Hessian of a 2D image of the detector
- _compute_ridgeness(hist: array, hess_eigenvals: array) arrayο
Compute the βridgenessβ score for each pixel in an input image
- Parameters:
hist (np.array) β The 2D input image
hess_eigenvals (np.array) β The eigenvalues of the hessian for the image (computed using the _hess_eigen() method)
- Returns:
The 2D array of ridgeness scores
- Return type:
np.array
- _do_make_debug_plots(hist: array, u_name: str, v_name: str)ο
Make detailed plots of values used in the Hesse ridge detection algorithm
- Parameters:
hist (np.array) β The input image
u_name (str) β The label of the u direction (βxβ, βyβ or βzβ)
v_name (str) β The label of the v direction (βxβ, βyβ or βzβ)
- _finalise()ο
Add anything here that is neaded to tear down the object e.g. closing any files, freeing resources etc.
- _gradient(hist: array, normalise: bool = False) Tuple[array]ο
Calculate the gradient of an input image using central finite difference
- Parameters:
hist (np.array) β Histogram you want the gradient of
normalise (bool) β Do per-bin normalisation to the cantral value
- Returns:
arrays du and dv containing derivatives wrt u and v
- Return type:
Tuple[np.array]
- _hess_eigen(hist: array) Tuple[array]ο
Get the eigenvalues and vectors of the hessian matrix of an input image
- Parameters:
hist (np.array) β The input image
- Returns:
The Hessian eigenvalues and eigenvectors
- Return type:
Tuple[np.array]
- _hessian(hist: array, normalise: bool = False) Tuple[array]ο
Calculate the hessian matrix of an input image using central finite difference
- Parameters:
hist (np.array) β Histogram you want the hessian of
normalise (bool) β Do per-bin normalisation to the cantral value
- Returns:
arrays huu, hvv, huv, hvu containing each of the necessary double derivatives
- Return type:
Tuple[np.array]
- _initialise() Noneο
Set up anything here that needs to be initialised
This gets called AFTER argument parsing is done so anything that depends on command line inputs needs to go in here and NOT in the __init__() method
- _make_plot(ridgeness: array, hess_eigenvals: array, hess_eigenvecs: array, ax: axis) Noneο
Make plot of the ridgeness score of each pixel (fiber) with direction of the detected ridges overlaid
- Parameters:
ridgeness (np.array) β The 2D array defining the ridgeness score for each pixel
hess_eigenvals (np.array) β The 3D array of the eigenvalues of the hessian at each pixel
hess_eigenvecs (np.array) β The 3D array of the eigenvectors of the hessian at each pixel
u_name (str) β The label of the u direction (βxβ, βyβ or βzβ)
v_name (str) β The label of the v direction (βxβ, βyβ or βzβ)
ax (plt.axis) β The pyplot axis object to plot to
- _process(event: Event)ο
Perform Hough transform on an event and save the result to a given file
- Parameters:
event (Event) β Object describing the hits in an event
- _setup_cli_options(parser)ο
Override this to set up any command line options for this module
The parser passed to this will be a subparser associated with this module. you can call any number of commands defined by argparse which will then be available inside of your module via self.args.
- Parameters:
parser (ArgumentParser) β The subparser for this module
- class liquidreco.modules.peak_finding.HesseRidgeDetection3Dο
Performs βridge detectionβ using the Hessian of a 3D image of the detector
- _compute_ridgeness(hist: array, hess_eigenvals: array) arrayο
Compute the βridgenessβ score for each pixel in an input image
- Parameters:
hist (np.array) β The 2D input image
hess_eigenvals (np.array) β The eigenvalues of the hessian for the image (computed using the _hess_eigen() method)
- Returns:
The 2D array of ridgeness scores
- Return type:
np.array
- _finalise()ο
Add anything here that is neaded to tear down the object e.g. closing any files, freeing resources etc.
- _gradient(hist: array, normalise: bool = False) Tuple[array]ο
Calculate the gradient of an input image using central finite difference
- Parameters:
hist (np.array) β Histogram you want the gradient of
normalise (bool) β Do per-bin normalisation to the cantral value
- Returns:
arrays du and dv containing derivatives wrt u and v
- Return type:
Tuple[np.array]
- _hess_eigen(hist: array) Tuple[array]ο
Get the eigenvalues and vectors of the hessian matrix of an input image
- Parameters:
hist (np.array) β The input image
- Returns:
The Hessian eigenvalues and eigenvectors
- Return type:
Tuple[np.array]
- _hessian(hist: array, normalise: bool = False) Tuple[array]ο
Calculate the hessian matrix of an input image using central finite difference
- Parameters:
hist (np.array) β Histogram you want the hessian of
normalise (bool) β Do per-bin normalisation to the cantral value
- Returns:
arrays huu, hvv, huv, hvu containing each of the necessary double derivatives
- Return type:
Tuple[np.array]
- _initialise() Noneο
Set up anything here that needs to be initialised
This gets called AFTER argument parsing is done so anything that depends on command line inputs needs to go in here and NOT in the __init__() method
- _process(event: Event)ο
Perform Hough transform on an event and save the result to a given file
- Parameters:
event (Event) β Object describing the hits in an event
- _setup_cli_options(parser)ο
Override this to set up any command line options for this module
The parser passed to this will be a subparser associated with this module. you can call any number of commands defined by argparse which will then be available inside of your module via self.args.
- Parameters:
parser (ArgumentParser) β The subparser for this module
- class liquidreco.modules.peak_finding.LaplaceFitter(neighbourhood_dist: float = 45.0, peak_candidate_threshold: float = 100.0, amplitude_threshold: float = 50.0, fix_width: float | None = None, min_n_neighbours: int = 0, make_plots=False)ο
Performs a fit of an ensemble of laplace distributions to observed collected charges in fibers in order to try to determine which
- _fit_laplace(hits: List[Hit2D], peak_candidates: List[Hit2D], u: str, v: str) List[float]ο
Performs the fit of the laplace distributions
- Parameters:
hits (List['Hit2D']) β The hits that should be considered in the fit
peak_candidates (List['Hit2D']) β The hits that should be considered peak candidates
u (str) β The u direction, should be βxβ, βyβ or βzβ
v (str) β The v direction, should be βxβ, βyβ or βzβ
- Returns:
The fitted laplace amplitudes of all peak candidate fibers
- Return type:
List[float]
- _get_laplace_fn(fiber_positions: ndarray, fiber_charges: ndarray, neighbour_distances: array, neighbour_indices: List[array]) Callableο
Construct the ensemble of laplace functions used for fitting
- Parameters:
fiber_positions (np.ndarray) β Positions of all of the fibers included in the fit
fiber_charges (np.ndarray) β Measured charges for all fibers included in the fit
neighbour_distances (np.array) β The distances from all fibers to the peak candidates
neighbour_indices (np.array) β The indices indicating which peak candidate fibers contribute to the light in each fiber
- Returns:
Function that predicts charges in fibers, can then be used in fit.
- Return type:
Callable
- class liquidreco.modules.peak_finding.PeakFinder2Dο
Finds peaks in raw fiber hits and performs position corrections
- _cluster_hits(fiber_hits: List[Hit2D], u: str, v: str) List[List[Hit2D]]ο
Cluster hits using this PeakFinder2Ds _clusterer (default is DBSCAN but you can set it to whatever you want)
- Parameters:
fiber_hits (List['Hit2D']) β The hits to cluster
u (str) β the βuβ direction, should be βxβ, βyβ or βzβ depending on the projection
v (str) β the βvβ direction, should be βxβ, βyβ or βzβ depending on the projection
- Returns:
hits broken down into clusters
- Return type:
List[List[βHit2Dβ]]
- _finalise()ο
Tidy up and close open pdfs
- _find_peak_hits(main_hit: Hit2D, line_hits: list[Hit2D], direction: str) List[Hit2D]ο
Finds hits in a list whose charges are monotonically decreasing relative to some central hit
e.g. running on
β ____
___ / / ___/ ___/
where the arrow indicates the βmain hitβ would give
___
/ __
___/
- Parameters:
main_hit (Hit2D) β The central hit that defines the summit of the peak
line_hits (list['Hit2D']) β The hits to be searched (should include the main hit)
direction (str) β The direction along the βlineβ of hits, should be βxβ, βyβ or βzβ
- Returns:
list of hits that belong to the same peak as the main hit
- Return type:
List[βHit2Dβ]
- _get_diagonal_neighbours(hit: Hit2D, neighbourhood: List[Hit2D], u: str, v: str, u_pitch: float, v_pitch: float, diagonal_sign=1) List[Hit2D]ο
Gets neighbours of a hit along a diagonal line
- Parameters:
hit (Hit2D) β The main hit
neighbourhood (List['Hit2D']) β The hits to search for diagonal neighbours in
u (str) β the u direction, should be either βxβ, βyβ or βzβ
v (str) β the v direction, should be either βxβ, βyβ or βzβ
u_pitch (float) β fiber pitch in the u direction
v_pitch (float) β fiber pitch in the v direction
diagonal_sign (int, optional) β The gradient of the diagonal, defaults to +1
- Returns:
Hits from the neighbourhood that lie along the specified diagonal
- Return type:
List[βHit2Dβ]
- _help() strο
Should return a help string that will be printed to the command line for this module
Default behaviour is to use the class docstring of the module
- Returns:
helpful message about your module
- Return type:
str
- _initialise()ο
Set up anything here that needs to be initialised
This gets called AFTER argument parsing is done so anything that depends on command line inputs needs to go in here and NOT in the __init__() method
- _process(event: Event) Noneο
Perform the peak finding
- Returns:
peak hits in each projection
- Return type:
Tuple[List[βHit2Dβ]]
- _setup_cli_options(parser)ο
Override this to set up any command line options for this module
The parser passed to this will be a subparser associated with this module. you can call any number of commands defined by argparse which will then be available inside of your module via self.args.
- Parameters:
parser (ArgumentParser) β The subparser for this module
Reconstructionο
Module to be used to reconstruct tracks from hits.
- class liquidreco.modules.reconstruction.HoughTransformο
Performs simple Hough line transform
- _finalise()ο
Add anything here that is neaded to tear down the object e.g. closing any files, freeing resources etc.
- _initialise() Noneο
Set up anything here that needs to be initialised
This gets called AFTER argument parsing is done so anything that depends on command line inputs needs to go in here and NOT in the __init__() method
- _process(event: Event)ο
Perform Hough transform on an event and save the result to a given file
- Parameters:
event (Event) β Object describing the hits in an event
- _setup_cli_options(parser)ο
Override this to set up any command line options for this module
The parser passed to this will be a subparser associated with this module. you can call any number of commands defined by argparse which will then be available inside of your module via self.args.
- Parameters:
parser (ArgumentParser) β The subparser for this module
- class liquidreco.modules.reconstruction.LocalMeanDBSCAN(mean_ball_radius=25.0, mean_iterations=1, dbscan_eps=9.0, min_charge_thresh=0.0)ο
- _finalise()ο
Add anything here that is neaded to tear down the object e.g. closing any files, freeing resources etc.
- class liquidreco.modules.reconstruction.MinimumSpanningTree2Dο
- _finalise()ο
Add anything here that is neaded to tear down the object e.g. closing any files, freeing resources etc.
- _initialise()ο
Set up anything here that needs to be initialised
This gets called AFTER argument parsing is done so anything that depends on command line inputs needs to go in here and NOT in the __init__() method
- _process(event)ο
This method should be implemented by any modules you write. Should process a single event and add any results to the event object.
- Parameters:
event (Event) β event to be processed
- Raises:
NotImplementedError β if not implemented
- _setup_cli_options(parser)ο
Override this to set up any command line options for this module
The parser passed to this will be a subparser associated with this module. you can call any number of commands defined by argparse which will then be available inside of your module via self.args.
- Parameters:
parser (ArgumentParser) β The subparser for this module
Utilityο
- class liquidreco.modules.utility.WeightScalingο
- _help()ο
Should return a help string that will be printed to the command line for this module
Default behaviour is to use the class docstring of the module
- Returns:
helpful message about your module
- Return type:
str
- _initialise()ο
Set up anything here that needs to be initialised
This gets called AFTER argument parsing is done so anything that depends on command line inputs needs to go in here and NOT in the __init__() method
- _process(event: Event) Noneο
This method should be implemented by any modules you write. Should process a single event and add any results to the event object.
- Parameters:
event (Event) β event to be processed
- Raises:
NotImplementedError β if not implemented
- _setup_cli_options(parser: ArgumentParser)ο
Override this to set up any command line options for this module
The parser passed to this will be a subparser associated with this module. you can call any number of commands defined by argparse which will then be available inside of your module via self.args.
- Parameters:
parser (ArgumentParser) β The subparser for this module
Plottingο
- class liquidreco.modules.hit_building.HitBuilder2Dο
Absolute base level module to build 2D hits from raw hit information
The starting point for any good reconstruction chain. Takes in raw hit info and turns it into more structiured hits.
- _initialise()ο
Set up anything here that needs to be initialised
This gets called AFTER argument parsing is done so anything that depends on command line inputs needs to go in here and NOT in the __init__() method
- _process(event: Event) Noneο
This method should be implemented by any modules you write. Should process a single event and add any results to the event object.
- Parameters:
event (Event) β event to be processed
- Raises:
NotImplementedError β if not implemented
- _setup_cli_options(parser)ο
Override this to set up any command line options for this module
The parser passed to this will be a subparser associated with this module. you can call any number of commands defined by argparse which will then be available inside of your module via self.args.
- Parameters:
parser (ArgumentParser) β The subparser for this module
- class liquidreco.modules.hit_building.HitBuilder3Dο
Makes 3D hits from 2d fiber hits
- _initialise()ο
Set up anything here that needs to be initialised
This gets called AFTER argument parsing is done so anything that depends on command line inputs needs to go in here and NOT in the __init__() method
- _process(event: Event) Noneο
This method should be implemented by any modules you write. Should process a single event and add any results to the event object.
- Parameters:
event (Event) β event to be processed
- Raises:
NotImplementedError β if not implemented
- _setup_cli_options(parser)ο
Override this to set up any command line options for this module
The parser passed to this will be a subparser associated with this module. you can call any number of commands defined by argparse which will then be available inside of your module via self.args.
- Parameters:
parser (ArgumentParser) β The subparser for this module
Configurationο
- class liquidreco.configuration.Configurationο
Class responsible for parsing user configuration
The parse_args() method is used to parse command line arguments like parse_args(sys.argv[1:]). Then specified modules are available in the modules attribute and base config arguments like input file, output file etc. are available in the base_args attribute.
- _add_module_subparsers(parser: ArgumentParser)ο
add subparsers for each registered module
these wonβt actually be used when parsing but allow printing nice unified help message with all available modules listed
- Parameters:
parser (ArgumentParser) β The parser to add modules to
- _parse_cl_args(args: List[str]) Noneο
Parse command line arguments
- Parameters:
args (List[str]) β List of strings from command line (should use sys.argv[1:])
- Raises:
ValueError β If a module you are asking for is not recognised
- _parse_json_config(config_file: str) Noneο
Parse a json config file
This will overwrite the args member variable, effectively ignoring any previously specified module settings
- Parameters:
config_file (str) β The file to read the config from
- _setup_fit_parser() Noneο
Set up the parser that deals with arguments for the βfitβ command
Will set the _fit_parser member variable
- _setup_make_config_parser() Noneο
Set up the parser that deals with arguments for the βmake-configβ command
Will set the _make_config_parser member variable
- _setup_parser() Noneο
Set up the base argument parser - the one that deals with everything that isnβt some module specific parameter
- parse_args(args: List[str]) Noneο
Parse list of arguments
You probably want to pass in sys.argv[1:] - this will get you the command line arguments specified by a user
- Parameters:
args (List[str]) β The list of arguments to be parsed
- to_json() Dict[str, Dict[str, Any]]ο
Dump the module configuration to a json string
- Returns:
JSON formatted string containing configuration for all specified modules
- Return type:
str
Event Processorο
- class liquidreco.event_processor.EventProcessor(file_name: str, tree_name: str, modules: List[ModuleBase], max_n_events: int | None = None)ο
Main application loop for liquidreco
This is responsible for loading up events from the input file and looping over them, applying fit modules specified by the user.
- _read_hit_info() Noneο
load up the input root file and read event info from it
- event_loop() Noneο
Does the loop over all events, applying each specified module to them
Plottingο
Appsο
liquidrecoο
LiquidReco main app.
Takes a root file that contains 2D fiber hits, creates an EventProcessor based on the provided arguments, and processes the fiber hits using this.
- raises ValueError:
if input args are not valid