Skip to content

Commit

Permalink
Test fast bb
Browse files Browse the repository at this point in the history
  • Loading branch information
andreicuceu committed Nov 12, 2023
1 parent 9c0c5cd commit 818ef96
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion vega/minimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,28 @@ def minimize(self, params=None):
for param, value in minuit_biases.values.to_dict().items():
self.params_init[param] = value

# If we have broadband polynomials, we first maximize one correlation at a time
print(self.params_init)
# If we have broadband polynomials we first maximize all other parameters,
# and then the broadband parameters one correlation at a time
bb_params = [par for par in self._names if 'BB-' in par]
if bool(len(bb_params)):
cf_bb_params = [par for par in self._names if 'BB-' not in par]
minuit_bb = self.run_iminuit(cf_bb_params)

for param, value in minuit_bb.values.to_dict().items():
self.params_init[param] = value

print(self.params_init)

for cf_name in self._cf_names:
cf_bb_params = [par for par in bb_params if cf_name in par]
minuit_bb = self.run_iminuit(cf_bb_params)

for param, value in minuit_bb.values.to_dict().items():
self.params_init[param] = value

print(self.params_init)

# Do the actual minimization
self._minuit = self.run_iminuit(self._names)

Expand Down

0 comments on commit 818ef96

Please sign in to comment.