![]() |
Belle II Software release-09-00-03
|
Class for the PXD background generator module. More...


Public Member Functions | |
| def | __init__ (self, str model="convnet", Union[None, str, pathlib.Path] checkpoint=None, Union[None, int] seed=None, int nintra=1, int ninter=1, str globaltag="PXDBackgroundGenerator") |
| Constructor for the PXD background generator module. | |
| def | initialize (self) |
| Method called before event processing to initialize the module. | |
| def | event (self) |
| Method called each time an event is processed. | |
Public Attributes | |
| model | |
| Name of the generator model. | |
| checkpoint | |
| Path to the checkpoint file with the pre-trained model weights. | |
| seed | |
| Integer number in the interval | |
| nintra | |
| Number of intra-op threads utilized. | |
| ninter | |
| Number of inter-op threads utilized. | |
| globaltag | |
| Global tag of the conditions database providing the default checkpoints stored as payloads. | |
Protected Attributes | |
| _generate_func | |
| Generation function applied on the model instance to return an output that is transcoded into digits. | |
| _generator | |
| Generator model instance. | |
| _vxdids | |
| Sequence of identifier objects for each PXD module. | |
| _pystorearray | |
| Accessor for PXD background digits in the data store. | |
Class for the PXD background generator module.
Generates PXD background samples for background overlay on the fly.
:param model: Name of the generator model to use - either "convnet" or "resnet",
defaults to "convnet" (optional)
:type model: str
:param checkpoint: Path to the checkpoint file with weights for the selected model,
defaults to None - use the default checkpoint from the conditions database (optional)
:type checkpoint: str
:param seed: Integer number in the interval :math:`[-2^{63}, 2^{63} - 1]`
used internally as the initial seed,
defaults to None - derive a deterministic seed from the
value returned by :py:func:`basf2.get_random_seed` (optional)
:type seed: int
:param nintra: Number of intra-op threads to be utilized for the generation,
defaults to 1 (optional)
:type nintra: int
:param ninter: Number of inter-op threads to be utilized for the generation,
defaults to 1 (optional)
:type ninter: int
:param globaltag: Global tag of the conditions database
providing the default checkpoints stored as payloads,
defaults to "PXDBackgroundGenerator" (optional)
:type globaltag: str
Definition at line 137 of file __init__.py.
| def __init__ | ( | self, | |
| str | model = "convnet", |
||
| Union[None, str, pathlib.Path] | checkpoint = None, |
||
| Union[None, int] | seed = None, |
||
| int | nintra = 1, |
||
| int | ninter = 1, |
||
| str | globaltag = "PXDBackgroundGenerator" |
||
| ) |
Constructor for the PXD background generator module.
| model | Name of the generator model to use - either "convnet" or "resnet", defaults to "convnet" |
| checkpoint | Path to the checkpoint file with weights for the selected model, defaults to None - use the default checkpoint from the conditions database |
| seed | Integer number in the interval basf2.get_random_seed() |
| nintra | Number of intra-op threads to be utilized for the generation, defaults to 1 |
| ninter | Number of inter-op threads to be utilized for the generation, defaults to 1 |
| globaltag | Global tag of the conditions database providing the default checkpoints stored as payloads, defaults to "PXDBackgroundGenerator" |
Definition at line 191 of file __init__.py.
| def event | ( | self | ) |
Method called each time an event is processed.
Definition at line 287 of file __init__.py.
| def initialize | ( | self | ) |
Method called before event processing to initialize the module.
Definition at line 224 of file __init__.py.
|
protected |
Generation function applied on the model instance to return an output that is transcoded into digits.
Definition at line 238 of file __init__.py.
|
protected |
Generator model instance.
Definition at line 241 of file __init__.py.
|
protected |
Accessor for PXD background digits in the data store.
Definition at line 282 of file __init__.py.
|
protected |
Sequence of identifier objects for each PXD module.
Definition at line 272 of file __init__.py.
| checkpoint |
Path to the checkpoint file with the pre-trained model weights.
Definition at line 205 of file __init__.py.
| globaltag |
Global tag of the conditions database providing the default checkpoints stored as payloads.
Definition at line 217 of file __init__.py.
| model |
Name of the generator model.
Definition at line 202 of file __init__.py.
| ninter |
Number of inter-op threads utilized.
Definition at line 214 of file __init__.py.
| nintra |
Number of intra-op threads utilized.
Definition at line 211 of file __init__.py.
| seed |
Integer number in the interval ![$ [-2^{63}, 2^{63} - 1] $](form_51.png)
Definition at line 208 of file __init__.py.