27 InDetTrackBiasingTool::InDetTrackBiasingTool(
const std::string&
name) :
28 InDetTrackSystematicsTool(
name)
31 #ifndef XAOD_STANDALONE
32 declareInterface<IInDetTrackBiasingTool>(
this);
35 declareProperty(
"biasD0", m_biasD0);
36 declareProperty(
"biasZ0", m_biasZ0);
37 declareProperty(
"biasQoverPsagitta", m_biasQoverPsagitta);
38 declareProperty(
"runNumber", m_runNumber);
39 declareProperty(
"isData", m_isData);
40 declareProperty(
"isSimulation", m_isSimulation);
42 declareProperty(
"calibFileData15", m_calibFileData15 =
"InDetTrackSystematicsTools/CalibData_22.0_2022-v00/REL22_REPRO_2015.root");
43 declareProperty(
"calibFileData16_1stPart", m_calibFileData16_1stPart =
"InDetTrackSystematicsTools/CalibData_22.0_2022-v00/REL22_REPRO_2016_1stPart.root");
44 declareProperty(
"calibFileData16_2ndPart", m_calibFileData16_2ndPart =
"InDetTrackSystematicsTools/CalibData_22.0_2022-v00/REL22_REPRO_2016_2ndPart.root");
45 declareProperty(
"calibFileData17_1stPart", m_calibFileData17_1stPart =
"InDetTrackSystematicsTools/CalibData_22.0_2022-v00/REL22_REPRO_2017_1stPart.root");
46 declareProperty(
"calibFileData17_2ndPart", m_calibFileData17_2ndPart =
"InDetTrackSystematicsTools/CalibData_22.0_2022-v00/REL22_REPRO_2017_2ndPart.root");
47 declareProperty(
"calibFileData18_1stPart", m_calibFileData18_1stPart =
"InDetTrackSystematicsTools/CalibData_22.0_2022-v00/REL22_REPRO_2018_1stPart.root");
48 declareProperty(
"calibFileData18_2stPart", m_calibFileData18_2ndPart =
"InDetTrackSystematicsTools/CalibData_22.0_2022-v00/REL22_REPRO_2018_2ndPart.root");
56 if (m_isData && m_isSimulation) {
57 ATH_MSG_ERROR(
"Cannot manually set for both data and simulation!" );
58 return StatusCode::FAILURE;
63 <<
" mm (not part of an official recommendation)" );
67 <<
" mm (not part of an official recommendation)" );
69 if (m_biasQoverPsagitta != 0.) {
70 ATH_MSG_INFO(
"overall QoverP sagitta bias added = " << m_biasQoverPsagitta
71 <<
" TeV^-1 (not part of an official recommendation)" );
74 if (m_runNumber > 0) {
75 ATH_MSG_WARNING(
"Using manually-set run number (" << m_runNumber <<
") to determine which calibration file to use." );
82 return StatusCode::SUCCESS;
85 InDetTrackBiasingTool::~InDetTrackBiasingTool() {
91 [[maybe_unused]]
static const bool firstTime = [&]() {
92 if ( ! firstCall().isSuccess() ) {
93 throw std::runtime_error(
"Error calling InDetTrackBiasingTool::firstCall");
99 TH2* biasD0Histogram =
nullptr;
100 TH2* biasZ0Histogram =
nullptr;
101 TH2* biasQoverPsagittaHistogram =
nullptr;
102 TH2* biasD0HistError =
nullptr;
103 TH2* biasZ0HistError =
nullptr;
104 TH2* biasQoverPsagittaHistError =
nullptr;
114 if (m_runNumber > 0) {
116 }
else if (m_isSimulation && randomRunNumber.
isAvailable(*eventInfo)) {
117 runNumber = randomRunNumber(*(eventInfo));
126 ATH_MSG_INFO(
"Calibrating for 2015 HI and 5 TeV pp runs (286282 to 287931)." );
127 ATH_MSG_ERROR(
"The 5 TeV and heavy ion runs do not have biasing maps for release 22. "
128 "Contact the tracking CP group to discuss the derivation of these maps." );
132 biasD0Histogram = m_data15_biasD0Histogram.get();
133 biasZ0Histogram = m_data15_biasZ0Histogram.get();
134 biasQoverPsagittaHistogram = m_data15_biasQoverPsagittaHistogram.get();
135 biasD0HistError = m_data15_biasD0HistError.get();
136 biasZ0HistError = m_data15_biasZ0HistError.get();
137 biasQoverPsagittaHistError = m_data15_biasQoverPsagittaHistError.get();
139 biasD0Histogram = m_data16_1stPart_biasD0Histogram.get();
140 biasZ0Histogram = m_data16_1stPart_biasZ0Histogram.get();
141 biasQoverPsagittaHistogram = m_data16_1stPart_biasQoverPsagittaHistogram.get();
142 biasD0HistError = m_data16_1stPart_biasD0HistError.get();
143 biasZ0HistError = m_data16_1stPart_biasZ0HistError.get();
144 biasQoverPsagittaHistError = m_data16_1stPart_biasQoverPsagittaHistError.get();
146 biasD0Histogram = m_data16_2ndPart_biasD0Histogram.get();
147 biasZ0Histogram = m_data16_2ndPart_biasZ0Histogram.get();
148 biasQoverPsagittaHistogram = m_data16_2ndPart_biasQoverPsagittaHistogram.get();
149 biasD0HistError = m_data16_2ndPart_biasD0HistError.get();
150 biasZ0HistError = m_data16_2ndPart_biasZ0HistError.get();
151 biasQoverPsagittaHistError = m_data16_2ndPart_biasQoverPsagittaHistError.get();
153 biasD0Histogram = m_data17_1stPart_biasD0Histogram.get();
154 biasZ0Histogram = m_data17_1stPart_biasZ0Histogram.get();
155 biasQoverPsagittaHistogram = m_data17_1stPart_biasQoverPsagittaHistogram.get();
156 biasD0HistError = m_data17_1stPart_biasD0HistError.get();
157 biasZ0HistError = m_data17_1stPart_biasZ0HistError.get();
158 biasQoverPsagittaHistError = m_data17_1stPart_biasQoverPsagittaHistError.get();
160 biasD0Histogram = m_data17_2ndPart_biasD0Histogram.get();
161 biasZ0Histogram = m_data17_2ndPart_biasZ0Histogram.get();
162 biasQoverPsagittaHistogram = m_data17_2ndPart_biasQoverPsagittaHistogram.get();
163 biasD0HistError = m_data17_2ndPart_biasD0HistError.get();
164 biasZ0HistError = m_data17_2ndPart_biasZ0HistError.get();
165 biasQoverPsagittaHistError = m_data17_2ndPart_biasQoverPsagittaHistError.get();
167 biasD0Histogram = m_data18_1stPart_biasD0Histogram.get();
168 biasZ0Histogram = m_data18_1stPart_biasZ0Histogram.get();
169 biasQoverPsagittaHistogram = m_data18_1stPart_biasQoverPsagittaHistogram.get();
170 biasD0HistError = m_data18_1stPart_biasD0HistError.get();
171 biasZ0HistError = m_data18_1stPart_biasZ0HistError.get();
172 biasQoverPsagittaHistError = m_data18_1stPart_biasQoverPsagittaHistError.get();
174 biasD0Histogram = m_data18_2ndPart_biasD0Histogram.get();
175 biasZ0Histogram = m_data18_2ndPart_biasZ0Histogram.get();
176 biasQoverPsagittaHistogram = m_data18_2ndPart_biasQoverPsagittaHistogram.get();
177 biasD0HistError = m_data18_2ndPart_biasD0HistError.get();
178 biasZ0HistError = m_data18_2ndPart_biasZ0HistError.get();
179 biasQoverPsagittaHistError = m_data18_2ndPart_biasQoverPsagittaHistError.get();
187 m_doD0Bias = biasD0Histogram !=
nullptr;
188 m_doZ0Bias = biasZ0Histogram !=
nullptr;
189 m_doQoverPBias = biasQoverPsagittaHistogram !=
nullptr;
193 if (!m_doQoverPBias)
ATH_MSG_WARNING(
"Will not perform q/p sagitta bias." );
205 bool d0WmActive = isActive( TRK_BIAS_D0_WM );
206 if ( m_isData || d0WmActive ) {
207 accD0(
track ) += readHistogram(m_biasD0, biasD0Histogram,
phi,
eta);
208 if ( m_isData && d0WmActive ) {
209 accD0(
track ) += readHistogram(0., biasD0HistError,
phi,
eta);
214 bool z0WmActive = isActive( TRK_BIAS_Z0_WM );
215 if ( m_isData || z0WmActive ) {
216 accZ0(
track ) += readHistogram(m_biasZ0, biasZ0Histogram,
phi,
eta);
217 if ( m_isData && z0WmActive ) {
218 accZ0(
track ) += readHistogram(0., biasZ0HistError,
phi,
eta);
222 if ( m_doQoverPBias ) {
223 bool qOverPWmActive = isActive( TRK_BIAS_QOVERP_SAGITTA_WM );
224 if ( m_isData || qOverPWmActive ) {
225 auto sinTheta = 1.0/cosh(
eta);
227 accQOverP(
track ) += 1.e-6*sinTheta*readHistogram(m_biasQoverPsagitta, biasQoverPsagittaHistogram,
phi,
eta);
228 if ( m_isData && qOverPWmActive ) {
229 accQOverP(
track ) += 1.e-6*sinTheta*readHistogram(0., biasQoverPsagittaHistError,
phi,
eta);
240 TH2* data15_biasD0Histogram_tmp =
nullptr;
241 TH2* data15_biasZ0Histogram_tmp =
nullptr;
242 TH2* data15_biasQoverPsagittaHistogram_tmp =
nullptr;
243 TH2* data15_biasD0HistError_tmp =
nullptr;
244 TH2* data15_biasZ0HistError_tmp =
nullptr;
245 TH2* data15_biasQoverPsagittaHistError_tmp =
nullptr;
247 TH2* data16_1stPart_biasD0Histogram_tmp =
nullptr;
248 TH2* data16_1stPart_biasZ0Histogram_tmp =
nullptr;
249 TH2* data16_1stPart_biasQoverPsagittaHistogram_tmp =
nullptr;
250 TH2* data16_1stPart_biasD0HistError_tmp =
nullptr;
251 TH2* data16_1stPart_biasZ0HistError_tmp =
nullptr;
252 TH2* data16_1stPart_biasQoverPsagittaHistError_tmp =
nullptr;
254 TH2* data16_2ndPart_biasD0Histogram_tmp =
nullptr;
255 TH2* data16_2ndPart_biasZ0Histogram_tmp =
nullptr;
256 TH2* data16_2ndPart_biasQoverPsagittaHistogram_tmp =
nullptr;
257 TH2* data16_2ndPart_biasD0HistError_tmp =
nullptr;
258 TH2* data16_2ndPart_biasZ0HistError_tmp =
nullptr;
259 TH2* data16_2ndPart_biasQoverPsagittaHistError_tmp =
nullptr;
261 TH2* data17_1stPart_biasD0Histogram_tmp =
nullptr;
262 TH2* data17_1stPart_biasZ0Histogram_tmp =
nullptr;
263 TH2* data17_1stPart_biasQoverPsagittaHistogram_tmp =
nullptr;
264 TH2* data17_1stPart_biasD0HistError_tmp =
nullptr;
265 TH2* data17_1stPart_biasZ0HistError_tmp =
nullptr;
266 TH2* data17_1stPart_biasQoverPsagittaHistError_tmp =
nullptr;
268 TH2* data17_2ndPart_biasD0Histogram_tmp =
nullptr;
269 TH2* data17_2ndPart_biasZ0Histogram_tmp =
nullptr;
270 TH2* data17_2ndPart_biasQoverPsagittaHistogram_tmp =
nullptr;
271 TH2* data17_2ndPart_biasD0HistError_tmp =
nullptr;
272 TH2* data17_2ndPart_biasZ0HistError_tmp =
nullptr;
273 TH2* data17_2ndPart_biasQoverPsagittaHistError_tmp =
nullptr;
275 TH2* data18_1stPart_biasD0Histogram_tmp =
nullptr;
276 TH2* data18_1stPart_biasZ0Histogram_tmp =
nullptr;
277 TH2* data18_1stPart_biasQoverPsagittaHistogram_tmp =
nullptr;
278 TH2* data18_1stPart_biasD0HistError_tmp =
nullptr;
279 TH2* data18_1stPart_biasZ0HistError_tmp =
nullptr;
280 TH2* data18_1stPart_biasQoverPsagittaHistError_tmp =
nullptr;
282 TH2* data18_2ndPart_biasD0Histogram_tmp =
nullptr;
283 TH2* data18_2ndPart_biasZ0Histogram_tmp =
nullptr;
284 TH2* data18_2ndPart_biasQoverPsagittaHistogram_tmp =
nullptr;
285 TH2* data18_2ndPart_biasD0HistError_tmp =
nullptr;
286 TH2* data18_2ndPart_biasZ0HistError_tmp =
nullptr;
287 TH2* data18_2ndPart_biasQoverPsagittaHistError_tmp =
nullptr;
290 ATH_CHECK ( initObject<TH2>(data15_biasD0Histogram_tmp, m_calibFileData15, m_d0_nominal_histName) );
291 ATH_CHECK ( initObject<TH2>(data15_biasZ0Histogram_tmp, m_calibFileData15, m_z0_nominal_histName) );
292 ATH_CHECK ( initObject<TH2>(data15_biasQoverPsagittaHistogram_tmp, m_calibFileData15, m_sagitta_nominal_histName) );
293 ATH_CHECK ( initObject<TH2>(data15_biasD0HistError_tmp, m_calibFileData15, m_d0_uncertainty_histName) );
294 ATH_CHECK ( initObject<TH2>(data15_biasZ0HistError_tmp, m_calibFileData15, m_z0_uncertainty_histName) );
295 ATH_CHECK ( initObject<TH2>(data15_biasQoverPsagittaHistError_tmp, m_calibFileData15, m_sagitta_uncertainty_histName) );
298 ATH_CHECK ( initObject<TH2>(data16_1stPart_biasD0Histogram_tmp, m_calibFileData16_1stPart, m_d0_nominal_histName) );
299 ATH_CHECK ( initObject<TH2>(data16_1stPart_biasZ0Histogram_tmp, m_calibFileData16_1stPart, m_z0_nominal_histName) );
300 ATH_CHECK ( initObject<TH2>(data16_1stPart_biasQoverPsagittaHistogram_tmp, m_calibFileData16_1stPart, m_sagitta_nominal_histName) );
301 ATH_CHECK ( initObject<TH2>(data16_1stPart_biasD0HistError_tmp, m_calibFileData16_1stPart, m_d0_uncertainty_histName) );
302 ATH_CHECK ( initObject<TH2>(data16_1stPart_biasZ0HistError_tmp, m_calibFileData16_1stPart, m_z0_uncertainty_histName) );
303 ATH_CHECK ( initObject<TH2>(data16_1stPart_biasQoverPsagittaHistError_tmp, m_calibFileData16_1stPart, m_sagitta_uncertainty_histName) );
306 ATH_CHECK ( initObject<TH2>(data16_2ndPart_biasD0Histogram_tmp, m_calibFileData16_2ndPart, m_d0_nominal_histName) );
307 ATH_CHECK ( initObject<TH2>(data16_2ndPart_biasZ0Histogram_tmp, m_calibFileData16_2ndPart, m_z0_nominal_histName) );
308 ATH_CHECK ( initObject<TH2>(data16_2ndPart_biasQoverPsagittaHistogram_tmp, m_calibFileData16_2ndPart, m_sagitta_nominal_histName) );
309 ATH_CHECK ( initObject<TH2>(data16_2ndPart_biasD0HistError_tmp, m_calibFileData16_2ndPart, m_d0_uncertainty_histName) );
310 ATH_CHECK ( initObject<TH2>(data16_2ndPart_biasZ0HistError_tmp, m_calibFileData16_2ndPart, m_z0_uncertainty_histName) );
311 ATH_CHECK ( initObject<TH2>(data16_2ndPart_biasQoverPsagittaHistError_tmp, m_calibFileData16_2ndPart, m_sagitta_uncertainty_histName) );
314 ATH_CHECK ( initObject<TH2>(data17_1stPart_biasD0Histogram_tmp, m_calibFileData17_1stPart, m_d0_nominal_histName) );
315 ATH_CHECK ( initObject<TH2>(data17_1stPart_biasZ0Histogram_tmp, m_calibFileData17_1stPart, m_z0_nominal_histName) );
316 ATH_CHECK ( initObject<TH2>(data17_1stPart_biasQoverPsagittaHistogram_tmp, m_calibFileData17_1stPart, m_sagitta_nominal_histName) );
317 ATH_CHECK ( initObject<TH2>(data17_1stPart_biasD0HistError_tmp, m_calibFileData17_1stPart, m_d0_uncertainty_histName) );
318 ATH_CHECK ( initObject<TH2>(data17_1stPart_biasZ0HistError_tmp, m_calibFileData17_1stPart, m_z0_uncertainty_histName) );
319 ATH_CHECK ( initObject<TH2>(data17_1stPart_biasQoverPsagittaHistError_tmp, m_calibFileData17_1stPart, m_sagitta_uncertainty_histName) );
322 ATH_CHECK ( initObject<TH2>(data17_2ndPart_biasD0Histogram_tmp, m_calibFileData17_2ndPart, m_d0_nominal_histName) );
323 ATH_CHECK ( initObject<TH2>(data17_2ndPart_biasZ0Histogram_tmp, m_calibFileData17_2ndPart, m_z0_nominal_histName) );
324 ATH_CHECK ( initObject<TH2>(data17_2ndPart_biasQoverPsagittaHistogram_tmp, m_calibFileData17_2ndPart, m_sagitta_nominal_histName) );
325 ATH_CHECK ( initObject<TH2>(data17_2ndPart_biasD0HistError_tmp, m_calibFileData17_2ndPart, m_d0_uncertainty_histName) );
326 ATH_CHECK ( initObject<TH2>(data17_2ndPart_biasZ0HistError_tmp, m_calibFileData17_2ndPart, m_z0_uncertainty_histName) );
327 ATH_CHECK ( initObject<TH2>(data17_2ndPart_biasQoverPsagittaHistError_tmp, m_calibFileData17_2ndPart, m_sagitta_uncertainty_histName) );
330 ATH_CHECK ( initObject<TH2>(data18_1stPart_biasD0Histogram_tmp, m_calibFileData18_1stPart, m_d0_nominal_histName) );
331 ATH_CHECK ( initObject<TH2>(data18_1stPart_biasZ0Histogram_tmp, m_calibFileData18_1stPart, m_z0_nominal_histName) );
332 ATH_CHECK ( initObject<TH2>(data18_1stPart_biasQoverPsagittaHistogram_tmp, m_calibFileData18_1stPart, m_sagitta_nominal_histName) );
333 ATH_CHECK ( initObject<TH2>(data18_1stPart_biasD0HistError_tmp, m_calibFileData18_1stPart, m_d0_uncertainty_histName) );
334 ATH_CHECK ( initObject<TH2>(data18_1stPart_biasZ0HistError_tmp, m_calibFileData18_1stPart, m_z0_uncertainty_histName) );
335 ATH_CHECK ( initObject<TH2>(data18_1stPart_biasQoverPsagittaHistError_tmp, m_calibFileData18_1stPart, m_sagitta_uncertainty_histName) );
338 ATH_CHECK ( initObject<TH2>(data18_2ndPart_biasD0Histogram_tmp, m_calibFileData18_2ndPart, m_d0_nominal_histName) );
339 ATH_CHECK ( initObject<TH2>(data18_2ndPart_biasZ0Histogram_tmp, m_calibFileData18_2ndPart, m_z0_nominal_histName) );
340 ATH_CHECK ( initObject<TH2>(data18_2ndPart_biasQoverPsagittaHistogram_tmp, m_calibFileData18_2ndPart, m_sagitta_nominal_histName) );
341 ATH_CHECK ( initObject<TH2>(data18_2ndPart_biasD0HistError_tmp, m_calibFileData18_2ndPart, m_d0_uncertainty_histName) );
342 ATH_CHECK ( initObject<TH2>(data18_2ndPart_biasZ0HistError_tmp, m_calibFileData18_2ndPart, m_z0_uncertainty_histName) );
343 ATH_CHECK ( initObject<TH2>(data18_2ndPart_biasQoverPsagittaHistError_tmp, m_calibFileData18_2ndPart, m_sagitta_uncertainty_histName) );
347 m_data15_biasD0Histogram = std::unique_ptr<TH2>(data15_biasD0Histogram_tmp);
348 m_data15_biasZ0Histogram = std::unique_ptr<TH2>(data15_biasZ0Histogram_tmp);
349 m_data15_biasQoverPsagittaHistogram = std::unique_ptr<TH2>(data15_biasQoverPsagittaHistogram_tmp);
350 m_data15_biasD0HistError = std::unique_ptr<TH2>(data15_biasD0HistError_tmp);
351 m_data15_biasZ0HistError = std::unique_ptr<TH2>(data15_biasZ0HistError_tmp);
352 m_data15_biasQoverPsagittaHistError = std::unique_ptr<TH2>(data15_biasQoverPsagittaHistError_tmp);
354 m_data16_1stPart_biasD0Histogram = std::unique_ptr<TH2>(data16_1stPart_biasD0Histogram_tmp);
355 m_data16_1stPart_biasZ0Histogram = std::unique_ptr<TH2>(data16_1stPart_biasZ0Histogram_tmp);
356 m_data16_1stPart_biasQoverPsagittaHistogram = std::unique_ptr<TH2>(data16_1stPart_biasQoverPsagittaHistogram_tmp);
357 m_data16_1stPart_biasD0HistError = std::unique_ptr<TH2>(data16_1stPart_biasD0HistError_tmp);
358 m_data16_1stPart_biasZ0HistError = std::unique_ptr<TH2>(data16_1stPart_biasZ0HistError_tmp);
359 m_data16_1stPart_biasQoverPsagittaHistError = std::unique_ptr<TH2>(data16_1stPart_biasQoverPsagittaHistError_tmp);
361 m_data16_2ndPart_biasD0Histogram = std::unique_ptr<TH2>(data16_2ndPart_biasD0Histogram_tmp);
362 m_data16_2ndPart_biasZ0Histogram = std::unique_ptr<TH2>(data16_2ndPart_biasZ0Histogram_tmp);
363 m_data16_2ndPart_biasQoverPsagittaHistogram = std::unique_ptr<TH2>(data16_2ndPart_biasQoverPsagittaHistogram_tmp);
364 m_data16_2ndPart_biasD0HistError = std::unique_ptr<TH2>(data16_2ndPart_biasD0HistError_tmp);
365 m_data16_2ndPart_biasZ0HistError = std::unique_ptr<TH2>(data16_2ndPart_biasZ0HistError_tmp);
366 m_data16_2ndPart_biasQoverPsagittaHistError = std::unique_ptr<TH2>(data16_2ndPart_biasQoverPsagittaHistError_tmp);
368 m_data17_1stPart_biasD0Histogram = std::unique_ptr<TH2>(data17_1stPart_biasD0Histogram_tmp);
369 m_data17_1stPart_biasZ0Histogram = std::unique_ptr<TH2>(data17_1stPart_biasZ0Histogram_tmp);
370 m_data17_1stPart_biasQoverPsagittaHistogram = std::unique_ptr<TH2>(data17_1stPart_biasQoverPsagittaHistogram_tmp);
371 m_data17_1stPart_biasD0HistError = std::unique_ptr<TH2>(data17_1stPart_biasD0HistError_tmp);
372 m_data17_1stPart_biasZ0HistError = std::unique_ptr<TH2>(data17_1stPart_biasZ0HistError_tmp);
373 m_data17_1stPart_biasQoverPsagittaHistError = std::unique_ptr<TH2>(data17_1stPart_biasQoverPsagittaHistError_tmp);
375 m_data17_2ndPart_biasD0Histogram = std::unique_ptr<TH2>(data17_2ndPart_biasD0Histogram_tmp);
376 m_data17_2ndPart_biasZ0Histogram = std::unique_ptr<TH2>(data17_2ndPart_biasZ0Histogram_tmp);
377 m_data17_2ndPart_biasQoverPsagittaHistogram = std::unique_ptr<TH2>(data17_2ndPart_biasQoverPsagittaHistogram_tmp);
378 m_data17_2ndPart_biasD0HistError = std::unique_ptr<TH2>(data17_2ndPart_biasD0HistError_tmp);
379 m_data17_2ndPart_biasZ0HistError = std::unique_ptr<TH2>(data17_2ndPart_biasZ0HistError_tmp);
380 m_data17_2ndPart_biasQoverPsagittaHistError = std::unique_ptr<TH2>(data17_2ndPart_biasQoverPsagittaHistError_tmp);
382 m_data18_1stPart_biasD0Histogram = std::unique_ptr<TH2>(data18_1stPart_biasD0Histogram_tmp);
383 m_data18_1stPart_biasZ0Histogram = std::unique_ptr<TH2>(data18_1stPart_biasZ0Histogram_tmp);
384 m_data18_1stPart_biasQoverPsagittaHistogram = std::unique_ptr<TH2>(data18_1stPart_biasQoverPsagittaHistogram_tmp);
385 m_data18_1stPart_biasD0HistError = std::unique_ptr<TH2>(data18_1stPart_biasD0HistError_tmp);
386 m_data18_1stPart_biasZ0HistError = std::unique_ptr<TH2>(data18_1stPart_biasZ0HistError_tmp);
387 m_data18_1stPart_biasQoverPsagittaHistError = std::unique_ptr<TH2>(data18_1stPart_biasQoverPsagittaHistError_tmp);
389 m_data18_2ndPart_biasD0Histogram = std::unique_ptr<TH2>(data18_2ndPart_biasD0Histogram_tmp);
390 m_data18_2ndPart_biasZ0Histogram = std::unique_ptr<TH2>(data18_2ndPart_biasZ0Histogram_tmp);
391 m_data18_2ndPart_biasQoverPsagittaHistogram = std::unique_ptr<TH2>(data18_2ndPart_biasQoverPsagittaHistogram_tmp);
392 m_data18_2ndPart_biasD0HistError = std::unique_ptr<TH2>(data18_2ndPart_biasD0HistError_tmp);
393 m_data18_2ndPart_biasZ0HistError = std::unique_ptr<TH2>(data18_2ndPart_biasZ0HistError_tmp);
394 m_data18_2ndPart_biasQoverPsagittaHistError = std::unique_ptr<TH2>(data18_2ndPart_biasQoverPsagittaHistError_tmp);
396 return StatusCode::SUCCESS;
401 assert( ! (m_isData && m_isSimulation) );
404 auto sc = evtStore()->retrieve( ei,
"EventInfo" );
405 if ( !
sc.isSuccess() ) {
406 if (m_runNumber <= 0 || !(m_isData||m_isSimulation)) {
407 ATH_MSG_ERROR(
"Unable to retrieve from event store. Manually set data/simulation and/or run number." );
408 return StatusCode::FAILURE;
414 ATH_MSG_WARNING(
"Manually set to data setting, but the type is detected as simulation." );
417 m_isSimulation =
true;
420 if ( m_isSimulation ) {
421 ATH_MSG_WARNING(
"Manually set to simulation setting, but the type is detected as data." );
427 assert( m_isData != m_isSimulation );
428 if (m_isData)
ATH_MSG_INFO(
"Set to data. Will apply biases to correct those observed in data." );
429 if (m_isSimulation)
ATH_MSG_INFO(
"Set to simulation. Will apply biases in direction that is observed in data." );
433 if (m_isSimulation && !randomRunNumber.
isAvailable(*ei) && m_runNumber <= 0) {
434 ATH_MSG_WARNING(
"Set to simulation with no run number provided, but RandomRunNumber not available. Will use default run number from EventInfo, "
435 "but biasing won't accurately reflect intervals of validity throughout the year. Run PileupReweightingTool first to pick up RandomRunNumber decorations.");
437 return StatusCode::SUCCESS;
440 float InDetTrackBiasingTool::readHistogram(
float fDefault, TH2*
histogram,
float phi,
float eta)
const {
442 ATH_MSG_ERROR(
"Configuration histogram is invalid. Check the run number and systematic configuration combination.");
443 throw std::runtime_error(
"invalid configuration" );
447 if(
eta>2.499 )
eta= 2.499;
448 if(
eta<-2.499 )
eta=-2.499;
452 if (m_isSimulation)
f = -
f;
461 return TrackCorrTool_t::correctedCopy(in,
out);
466 return TrackCorrTool_t::applyContainerCorrection(cont);
471 return InDetTrackSystematicsTool::isAffectedBySystematic( syst );
476 return BiasSystematics;
481 return InDetTrackSystematicsTool::recommendedSystematics();
486 return InDetTrackSystematicsTool::applySystematicVariation(systs);