19 InDetTrackBiasingTool::InDetTrackBiasingTool(
const std::string& name) :
23#ifndef XAOD_STANDALONE
24 declareInterface<IInDetTrackBiasingTool>(
this);
33 <<
" mm (not part of an official recommendation)" );
37 <<
" mm (not part of an official recommendation)" );
41 <<
" TeV^-1 (not part of an official recommendation)" );
54 return StatusCode::SUCCESS;
64 ATH_MSG_ERROR(
"InDetTrackBiasingTool should only be run on MC." );
71 auto runNumber = randomRunNumber(*eventInfo);
77 if (runNumber >= 286282 && runNumber <= 287931) {
78 ATH_MSG_ERROR(
"The 5 TeV and heavy ion runs do not have biasing maps for release 22. "
79 "Contact the tracking CP group to discuss the derivation of these maps." );
96 ATH_MSG_ERROR(
"Run number = " << runNumber <<
" does not fall within any configured calibration period." );
118 const float phi = track.phi0();
119 const float eta = track.eta();
125 accD0( track ) += d0Corr;
127 accD0( track ) -= d0Corr;
132 accZ0( track ) += z0Corr;
134 accZ0( track ) -= z0Corr;
137 if ( doQoverPBias ) {
138 auto sinTheta = 1.0 / std::cosh(
eta);
140 accQOverP( track ) += qOverPCorr;
141 if (
isActive( TRK_BIAS_QOVERP_SAGITTA_WM ) ) {
142 accQOverP( track ) -= qOverPCorr;
153 ATH_MSG_ERROR(
"No calibration files configured. Set 'calibFiles' and (for multiple periods) "
154 "'runNumberBounds' for the relevant MC campaign via the python configuration." );
155 return StatusCode::FAILURE;
159 "calibFiles.size() + 1 = " << (
m_calibFiles.size() + 1) <<
" entries." );
160 return StatusCode::FAILURE;
163 ATH_MSG_ERROR(
"'runNumberBounds' must be set when multiple calibration files are configured." );
164 return StatusCode::FAILURE;
169 ATH_MSG_INFO(
"Calibration period 0 (all run numbers): file: "
172 ATH_MSG_INFO(
"Calibration period " << i <<
": run range ["
184 return StatusCode::SUCCESS;
189 ATH_MSG_ERROR(
"Configuration histogram is invalid. Check the run number and systematic configuration combination.");
190 throw std::runtime_error(
"invalid configuration" );
194 if(
eta>2.499 )
eta= 2.499;
195 if(
eta<-2.499 )
eta=-2.499;
206 return TrackCorrTool_t::correctedCopy(in, out);
211 return TrackCorrTool_t::applyContainerCorrection(cont);
222 if (
m_applyD0Bias) result.insert(InDet::TrackSystematicMap.at(TRK_BIAS_D0_WM));
223 if (
m_applyZ0Bias) result.insert(InDet::TrackSystematicMap.at(TRK_BIAS_Z0_WM));
224 if (
m_applyQoverPBias) result.insert(InDet::TrackSystematicMap.at(TRK_BIAS_QOVERP_SAGITTA_WM));
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Return value from object correction CP tools.
@ Error
Some error happened during the object correction.
@ Ok
The correction was done successfully.
Class to wrap a set of SystematicVariations.
SG::Accessor< T, ALLOC > Accessor
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".