EventSplineMonolith
- class pyMaCh3._pyMaCh3.splines.EventSplineMonolith
Bases:
SplineBase
This ‘monolith’ deals with event by event weighting using splines.
Methods Summary
evaluate
(self)Evaluate the splines at their current values.
get_event_weight
(self, event)Get the weight of a particular event.
set_param_value_array
(self, array)Set the array that the monolith should use to read parameter values from. Usage of this might vary a bit from what you're used to in python. Rather than just setting the values here, what you're really doing is setting pointers in the underlying c++ code. What that means is that you pass an array to this function like::.
sync_mem_transfer
(self)This is important when running on GPU.
Methods Documentation
- evaluate(self: pyMaCh3._pyMaCh3.splines.EventSplineMonolith) None
Evaluate the splines at their current values.
- get_event_weight(self: pyMaCh3._pyMaCh3.splines.EventSplineMonolith, event: int) float
Get the weight of a particular event. :param event: The index of the event whose weight you would like.
- set_param_value_array(self: pyMaCh3._pyMaCh3.splines.EventSplineMonolith, array: numpy.ndarray[numpy.float64]) None
Set the array that the monolith should use to read parameter values from. Usage of this might vary a bit from what you’re used to in python. Rather than just setting the values here, what you’re really doing is setting pointers in the underlying c++ code. What that means is that you pass an array to this function like:
event_spline_monolith_instance.set_param_value_array(array)
Then when you set values in that array as normal, they will also be updated inside of the event_spline_monolith_instance.
- sync_mem_transfer(self: pyMaCh3._pyMaCh3.splines.EventSplineMonolith) None
This is important when running on GPU. After calculations are done on GPU we copy memory to CPU. This operation is asynchronous meaning while memory is being copied some operations are being carried. Memory must be copied before actual reweight. This function make sure all has been copied.