Skip to content

allow to randomize parameters …#121

Open
NilsHuesken wants to merge 1 commit intomasterfrom
rand_prod_pars_per_name
Open

allow to randomize parameters …#121
NilsHuesken wants to merge 1 commit intomasterfrom
rand_prod_pars_per_name

Conversation

@NilsHuesken
Copy link
Copy Markdown
Collaborator

… with different maximal fractions based on amplitude name.
This is useful when one expects some set of amplitudes to dominate, while others are expected to be small.
Also added a function that allows setting (i.e. changing) production parameters for FitResults, which can be used to plot mathematically ambiguous results to any given FitResult (given the relation is known).

@NilsHuesken NilsHuesken marked this pull request as ready for review August 29, 2023 10:19
Copy link
Copy Markdown
Owner

@mashephe mashephe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that setProductionParameter is not consistent with the design/intent of the FitResults class, which represents the result of a fit. Once you call setProductionParameter then the class is no longer in a state defined by the end of a fit. For example, the likelihood is not updated or the covariance matrix is no longer consistent with the parameter values.

What specific use case are you trying to address with setProductionParameter? I wonder if there is a better way to accomplish this in the framework.

@mashephe
Copy link
Copy Markdown
Owner

If the goal is to modify production parameters in the plotting framework, then introducing a member function to the base class PlotGenerator might be the best option. You can see there that in the constructor it copies the production parameters from the fit results object to local member data. It also has a same length vector of zeroes and finally another vector that will hold either zero or the production parameter of fit results depending on whether the amplitude is toggled on or off. The pointer to this latter is the used by the IntensityManager in computing the intensities for weighting. (I know it is weird/non-conventional to have a class hold a pointer to data that is outside this class, but this is necessary/efficiency if you want many classes to "see" common parameters updated by MINUIT.) In any case, when plotting the plot generator holds the bank of production parameters. You could modify them with a member function. I'd recommend your member function modify: m_fitProdAmps and you'll probably need to look up the index in the map m_ampIndex. By modifying this, the change will be persistent if the user subsequently toggles off and and on the amplitude.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants