From db4a935bff63f4a3442cd92a936624314d47d0ae Mon Sep 17 00:00:00 2001 From: Francesco Merlotti Date: Wed, 19 Jun 2024 11:43:16 +0100 Subject: [PATCH] added fixed_bsm --- n3fit/src/n3fit/model_trainer.py | 5 +++++ n3fit/src/n3fit/performfit.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/n3fit/src/n3fit/model_trainer.py b/n3fit/src/n3fit/model_trainer.py index f43f1170b..524aa3025 100644 --- a/n3fit/src/n3fit/model_trainer.py +++ b/n3fit/src/n3fit/model_trainer.py @@ -125,6 +125,7 @@ def __init__( simu_parameters_scales=None, bsm_fac_initialisations=None, bsm_initialisation_seed=0, + fixed_bsm=False, debug=False, kfold_parameters=None, max_cores=None, @@ -188,6 +189,7 @@ def __init__( self.simu_parameters_scales = simu_parameters_scales self.bsm_fac_initialisations = bsm_fac_initialisations self.bsm_initialisation_seed = bsm_initialisation_seed + self.fixed_bsm = fixed_bsm self.fixed_pdf = fixed_pdf self.replicas = replicas @@ -515,6 +517,9 @@ def _generate_observables( replica_number=self.replicas[0], ) + if self.fixed_bsm: + combiner.trainable = False + log.info(f"Using bsm_factor scales: {self.simu_parameters_scales}") self.combiner = combiner diff --git a/n3fit/src/n3fit/performfit.py b/n3fit/src/n3fit/performfit.py index f05a011bb..807ce7563 100644 --- a/n3fit/src/n3fit/performfit.py +++ b/n3fit/src/n3fit/performfit.py @@ -44,6 +44,7 @@ def performfit( parallel_models=False, simu_parameters_names=None, bsm_initialisation_seed=0, + fixed_bsm=False, ): """ This action will (upon having read a validcard) process a full PDF fit @@ -208,6 +209,7 @@ def performfit( simu_parameters_scales=simu_parameters_scales, bsm_fac_initialisations=bsm_fac_initialisations, bsm_initialisation_seed=bsm_initialisation_seed, + fixed_bsm=fixed_bsm, ) # This is just to give a descriptive name to the fit function