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