Commit de0138c7 authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Optionally freeze POIs in GOF task when set explicitly.

parent 6c90fea1
......@@ -892,6 +892,7 @@ class POITask(DatacardTask, ParameterValuesTask):
force_n_pois = None
allow_parameter_values_in_pois = False
freeze_pois_with_parameter_values = False
sort_pois = True
@classmethod
......@@ -1034,8 +1035,14 @@ class POITask(DatacardTask, ParameterValuesTask):
return self._joined_parameter_values()
def _joined_frozen_parameters(self, join=True):
params = tuple()
# optionally add pois whose value is set explicitly in parameter_values
if self.freeze_pois_with_parameter_values:
params += tuple(p for p in self.pois if p in self.parameter_values_dict)
# unused pois
params = tuple(self.other_pois)
params += tuple(self.other_pois)
# manually frozen parameters
params += tuple(self.frozen_parameters)
......
......@@ -36,6 +36,8 @@ class GoodnessOfFitBase(POITask):
)
unblinded = None
allow_parameter_values_in_pois = True
freeze_pois_with_parameter_values = True
def store_parts(self):
parts = super(GoodnessOfFitBase, self).store_parts()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment