![]() |
Belle II Software
release-08-02-05
|
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. More... | |
| 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. | |
Private 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.