-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add ConditionalParameter class * properly initialize and link the conditioning param * make Parameters prepoerties work with conditional params * add example config * add all those properties to the ConditionalParam * revert separation in Parameters properties * fix parameter evaluation * add some missing methods & run pre-commit hook * add unittest * some suggestions from pylint * oops * make Parameters __str__ more readable for ConditionalParameters
- Loading branch information
Showing
3 changed files
with
356 additions
and
21 deletions.
There are no files selected for viewing
144 changes: 144 additions & 0 deletions
144
alea/examples/configs/unbinned_wimp_statistical_model_mass_dependent_efficiency.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
parameter_definition: | ||
wimp_mass: | ||
nominal_value: 50 | ||
fittable: false | ||
description: WIMP mass in GeV/c^2 | ||
|
||
livetime_sr0: | ||
nominal_value: 0.2 | ||
ptype: livetime | ||
fittable: false | ||
description: Livetime of SR0 in years | ||
|
||
livetime_sr1: | ||
nominal_value: 1.0 | ||
ptype: livetime | ||
fittable: false | ||
description: Livetime of SR1 in years | ||
|
||
wimp_rate_multiplier: | ||
nominal_value: 1.0 | ||
ptype: rate | ||
fittable: true | ||
fit_limits: | ||
- 0 | ||
- null | ||
parameter_interval_bounds: | ||
- 0 | ||
- null | ||
|
||
er_rate_multiplier: | ||
nominal_value: 1.0 | ||
ptype: rate | ||
uncertainty: 0.2 | ||
relative_uncertainty: true | ||
fittable: true | ||
fit_limits: | ||
- 0 | ||
- null | ||
fit_guess: 1.0 | ||
|
||
signal_efficiency: | ||
conditioning_parameter_name: wimp_mass | ||
nominal_value: 1.0 | ||
ptype: efficiency | ||
uncertainty: | ||
5: 0.3 | ||
10: 0.2 | ||
50: 0.15 | ||
100: 0.1 | ||
500: 0.1 | ||
relative_uncertainty: true | ||
fittable: true | ||
fit_limits: | ||
- 0 | ||
- 10. | ||
fit_guess: 1.0 | ||
description: Parameter to account for the uncertain signal expectation given a certain cross-section | ||
|
||
er_band_shift: | ||
nominal_value: 0 | ||
ptype: shape | ||
uncertainty: 'stats.uniform(loc=-2, scale=4)' | ||
# relative_uncertainty: false | ||
fittable: true | ||
blueice_anchors: | ||
- -2 | ||
- -1 | ||
- 0 | ||
- 1 | ||
- 2 | ||
fit_limits: | ||
- -2 | ||
- 2 | ||
description: ER band shape parameter (shifts the ER band up and down) | ||
|
||
likelihood_config: | ||
likelihood_weights: [1, 1, 1] | ||
template_folder: null # will try to find the templates in alea | ||
likelihood_terms: | ||
# SR0 | ||
- name: sr0 | ||
default_source_class: alea.template_source.TemplateSource | ||
likelihood_type: blueice.likelihood.UnbinnedLogLikelihood | ||
analysis_space: | ||
- cs1: np.linspace(0, 100, 51) | ||
- cs2: np.geomspace(100, 100000, 51) | ||
in_events_per_bin: true | ||
livetime_parameter: livetime_sr0 | ||
slice_args: {} | ||
sources: | ||
- name: er | ||
histname: er_template # TODO: implement a default histname based on the source name | ||
parameters: | ||
- er_rate_multiplier | ||
- er_band_shift | ||
named_parameters: | ||
- er_band_shift | ||
template_filename: er_template_{er_band_shift}.ii.h5 | ||
histogram_scale_factor: 1 | ||
|
||
- name: wimp | ||
histname: wimp_template | ||
parameters: | ||
- wimp_mass | ||
- wimp_rate_multiplier | ||
- signal_efficiency | ||
named_parameters: | ||
- wimp_mass | ||
template_filename: wimp{wimp_mass:d}gev_template.ii.h5 | ||
apply_efficiency: True | ||
efficiency_name: signal_efficiency | ||
|
||
# SR1 | ||
- name: sr1 | ||
default_source_class: alea.template_source.TemplateSource | ||
likelihood_type: blueice.likelihood.UnbinnedLogLikelihood | ||
analysis_space: | ||
- cs1: np.linspace(0, 100, 51) | ||
- cs2: np.geomspace(100, 100000, 51) | ||
in_events_per_bin: true | ||
livetime_parameter: livetime_sr1 | ||
slice_args: {} | ||
sources: | ||
- name: er | ||
histname: er_template | ||
parameters: | ||
- er_rate_multiplier | ||
- er_band_shift | ||
named_parameters: | ||
- er_band_shift | ||
template_filename: er_template_{er_band_shift}.ii.h5 | ||
histogram_scale_factor: 2 | ||
|
||
- name: wimp | ||
histname: wimp_template | ||
parameters: | ||
- wimp_mass | ||
- wimp_rate_multiplier | ||
- signal_efficiency | ||
named_parameters: | ||
- wimp_mass | ||
template_filename: wimp{wimp_mass:d}gev_template.ii.h5 | ||
apply_efficiency: True | ||
efficiency_name: signal_efficiency |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.