Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Towards dials that require event variables to evaluate #287

Open
nadrino opened this issue Apr 9, 2023 · 2 comments
Open

Towards dials that require event variables to evaluate #287

nadrino opened this issue Apr 9, 2023 · 2 comments
Assignees
Labels
feature/enhancement ✨ New feature or request

Comments

@nadrino
Copy link
Collaborator

nadrino commented Apr 9, 2023

Starting here a thread about implementing dials that need PhysicsEvent stored variable to evaluate.

As an example, the oscillation (survival) probability for SBL analysis:
$P(\nu_e \rightarrow \nu_e) = 1 - \sin^2(2\theta_{14})\sin^2\left(\Delta m^2_{41}L/4E\right)$.

Two fit parameters need to evaluate this formula $\theta_{14}$ and $\Delta m^2_{41}$, while $E$ is the neutrino energy which is different for each event.

DialInputBuffer seems to be the right candidate to handle the different inputs.

[TO BE CONTINUED]

@ClarkMcGrew
Copy link
Contributor

If I'm reading correctly, this is a proposal to have a closure around some event information (e.g. the neutrino energy), not a proposal for multi-parameter dials (which DialInputBuffer already supports in principle). If that's the case, the event information is a constant so it can be captured when a DialBase derived class is constructed. It's completely analogous to how spline knots are captured by GeneralSpline (and friends).

@riccioc riccioc added the feature/enhancement ✨ New feature or request label Apr 15, 2023
@ClarkMcGrew ClarkMcGrew added this to the Future Release milestone May 19, 2023
@nadrino
Copy link
Collaborator Author

nadrino commented Nov 30, 2023

@ClarkMcGrew it is a good solution indeed!
I also would like to think about the future additions such as having event vars that could move thanks to some dials. In that case we may need to capture the reference of the event var

@nadrino nadrino changed the title [Feature request] Towards dials that require event variables to evaluate Towards dials that require event variables to evaluate Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/enhancement ✨ New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants