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

added fixed_bsm #73

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions n3fit/src/n3fit/model_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions n3fit/src/n3fit/performfit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down