10 __all__ = [
"graFEI",
"lcaSaver"]
13 from grafei.modules.GraFEIModule
import GraFEIModule
14 from grafei.modules.LCASaverModule
import LCASaverModule
25 payload_config_name="graFEIConfigFile",
26 payload_model_name="graFEIModelFile",
29 Wrapper function to add the GraFEIModule to the path in a single call.
31 Applies graFEI model to a particle list in basf2.
32 GraFEI information is stored as extraInfos.
35 particle_list (str): Name of particle list.
36 path (basf2.Path): Module is added to this path.
37 cfg_path (str): Path to config file. If `None` the config file in the global tag is used.
38 param_file (str): Path to parameter file containing the model. If `None` the parameter file in the global tag is used.
39 sig_side_lcas (list): List containing LCAS matrix of signal-side.
40 sig_side_masses (list): List containing mass hypotheses of signal-side.
41 gpu (bool): Whether to run on a GPU.
42 payload_config_name (str): Name of config file payload. The default should be kept, except in basf2 examples.
43 payload_model_name (str): Name of model file payload. The default should be kept, except in basf2 examples.
48 param_file=param_file,
49 sig_side_lcas=sig_side_lcas,
50 sig_side_masses=sig_side_masses,
52 payload_config_name=payload_config_name,
53 payload_model_name=payload_model_name,
55 path.add_module(graFEI)
66 Wrapper function to add the LCASaverModule to the path.
68 Save Lowest Common Ancestor matrix of each MC Particle in the given list.
71 particle_lists (list): Name of particle lists to save features of.
72 features (list): List of features to save for each particle.
73 mcparticle_list (str): Name of particle list to build LCAs from (will use as root).
74 output_file (str): Path to output file to save.
75 path (basf2.Path): Module is added to this path.
78 particle_lists=particle_lists,
80 mcparticle_list=mcparticle_list,
81 output_file=output_file,
83 path.add_module(root_saver_module)
87 ____ ____ _ ____ ____ _
88 | _ |__| /_\ |___ |___ |
94 / \ |-----\ |\ /| |-----\ |0 1 3 3 5|
95 o \ |----- \ | \ / | |----- \ |1 0 3 3 5|
96 / \ \ |----- / | x | |----- / |3 3 0 1 5|
97 / \ \ |-----/ | / \ | |-----/ |3 3 1 0 5|
98 / \ \ |/ \| |5 5 5 5 0|
103 Authors: Jacopo Cerasoli, Giulio Dujany, Lucas Martel, Corentin Santos. 2022 - 2024
104 Model description: https://indico.cern.ch/event/1106990/papers/4996235/files/12252-ACAT_2022_proceedings.pdf
105 Based on the work of Kahn et al: https://iopscience.iop.org/article/10.1088/2632-2153/ac8de0
106 Please consider citing both articles.
107 Code adapted from https://github.com/Helmholtz-AI-Energy/BaumBauen