Skip to content

Commit

Permalink
HL acc-models lattice and fix for deprecated optics
Browse files Browse the repository at this point in the history
  • Loading branch information
awegsche committed Sep 20, 2023
1 parent 9cc86d2 commit 49133d1
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions omc3/model/accelerators/lhc.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,10 @@ def log_status(self) -> None:

def load_main_seq_madx(self) -> str:
if self.acc_model_path is not None:
return f'call, file = \'{self.acc_model_path / "lhc.seq"}\';'
main_call = f'call, file = \'{self.acc_model_path / "lhc.seq"}\';'
if self.year.startswith('hl'):
main_call += f'\ncall, file = \'{self.acc_model_path / "hllhc_sequence.madx"}\';'
return main_call
try:
return _get_call_main_for_year(self.year)
except AttributeError:
Expand Down Expand Up @@ -414,14 +417,8 @@ def get_base_madx_script(self, best_knowledge: bool = False) -> str:
for modifier in self.modifiers
)


model_year = 100000000
try:
model_year = int(self.year)
except:
pass

if self.year.startswith("hl") or model_year <= 2021:
if self.year in ['2012', '2015', '2016', '2017', '2018', '2021', 'hllhc1.3']:
# backwards compatibility with pre acc-models optics
madx_script += (
f"\n! ----- Defining Configuration Specifics -----\n"
f"xing_angles = {'1' if self.xing else '0'};\n"
Expand Down

0 comments on commit 49133d1

Please sign in to comment.