136def InDetTrackBiasingCalibKwargs(flags):
137 """Return calibFiles/runNumberBounds kwargs for InDetTrackBiasingTool.
138
139 Selects campaign-specific calibration files and (for multi-period
140 campaigns) run-number boundaries. Raises ValueError for unknown
141 campaigns or geometries.
142 """
143 c2 = "InDetTrackSystematicsTools/CalibData_22.0_2022-v00"
144 c3 = "InDetTrackSystematicsTools/CalibData_25.2_2025-v00"
145 if flags.GeoModel.Run is LHCPeriod.Run2:
146 if flags.Input.MCCampaign is Campaign.MC20a:
147
148 return {
149 "calibFiles": [
150 f"{c2}/REL22_REPRO_2015.root",
151 f"{c2}/REL22_REPRO_2016_1stPart.root",
152 f"{c2}/REL22_REPRO_2016_2ndPart.root",
153 ],
154 "runNumberBounds": [0, 296938, 301912, 999999],
155 }
156 elif flags.Input.MCCampaign is Campaign.MC20d:
157
158 return {
159 "calibFiles": [
160 f"{c2}/REL22_REPRO_2017_1stPart.root",
161 f"{c2}/REL22_REPRO_2017_2ndPart.root",
162 ],
163 "runNumberBounds": [0, 334842, 999999],
164 }
165 elif flags.Input.MCCampaign is Campaign.MC20e:
166
167 return {
168 "calibFiles": [
169 f"{c2}/REL22_REPRO_2018_1stPart.root",
170 f"{c2}/REL22_REPRO_2018_2ndPart.root",
171 ],
172 "runNumberBounds": [0, 353000, 999999],
173 }
174 else:
175 raise ValueError(
176 'No biasing recommendations found for campaign "'
177 + flags.Input.MCCampaign.value
178 + '" in Run 2. Please check the configuration.'
179 )
180 elif flags.GeoModel.Run is LHCPeriod.Run3:
181 if flags.Input.MCCampaign is Campaign.MC23a:
182
183 return {
184 "calibFiles": [
185 f"{c3}/2022_d0z0qoverp_biasing_factor.root",
186 ]
187 }
188 elif flags.Input.MCCampaign is Campaign.MC23d:
189
190 return {
191 "calibFiles": [
192 f"{c3}/2023_d0z0qoverp_biasing_factor.root",
193 ]
194 }
195 elif flags.Input.MCCampaign is Campaign.MC23e:
196
197 return {
198 "calibFiles": [
199 f"{c3}/2024_d0z0qoverp_biasing_factor.root",
200 ]
201 }
202 else:
203 raise ValueError(
204 'No biasing recommendations found for campaign "'
205 + flags.Input.MCCampaign.value
206 + '" in Run 3. Please check the configuration.'
207 )
208 else:
209 raise ValueError(
210 'No biasing recommendations found for geometry "'
211 + flags.GeoModel.Run.value
212 + '". Please check the configuration.'
213 )
214
215