20 InDetTrackBiasingTool::InDetTrackBiasingTool(
const std::string& name) :
24#ifndef XAOD_STANDALONE
25 declareInterface<IInDetTrackBiasingTool>(
this);
34 <<
" mm (not part of an official recommendation)" );
38 <<
" mm (not part of an official recommendation)" );
42 <<
" TeV^-1 (not part of an official recommendation)" );
56 return StatusCode::SUCCESS;
65 ATH_MSG_ERROR(
"applySystematicVariation() was not called before applyCorrection()." );
83 ATH_MSG_ERROR(
"InDetTrackBiasingTool should only be run on MC." );
90 const unsigned int runNumber = randomRunNumber(*eventInfo);
96 if (runNumber >= 286282 && runNumber <= 287931) {
97 ATH_MSG_ERROR(
"The 5 TeV and heavy ion runs do not have biasing maps for release 22. "
98 "Contact the tracking CP group to discuss the derivation of these maps." );
115 ATH_MSG_ERROR(
"Run number = " << runNumber <<
" does not fall within any configured calibration period." );
137 const float phi = track.phi0();
138 const float eta = track.eta();
144 accD0( track ) += d0Corr;
145 if (
isActive( TRK_BIAS_D0_WM, filtered ) ) {
146 accD0( track ) -= d0Corr;
151 accZ0( track ) += z0Corr;
152 if (
isActive( TRK_BIAS_Z0_WM, filtered ) ) {
153 accZ0( track ) -= z0Corr;
156 if ( doQoverPBias ) {
157 auto sinTheta = 1.0 / std::cosh(
eta);
159 accQOverP( track ) += qOverPCorr;
160 if (
isActive( TRK_BIAS_QOVERP_SAGITTA_WM, filtered ) ) {
161 accQOverP( track ) -= qOverPCorr;
172 ATH_MSG_ERROR(
"No calibration files configured. Set 'calibFiles' and (for multiple periods) "
173 "'runNumberBounds' for the relevant MC campaign via the python configuration." );
174 return StatusCode::FAILURE;
178 "calibFiles.size() + 1 = " << (
m_calibFiles.size() + 1) <<
" entries." );
179 return StatusCode::FAILURE;
182 ATH_MSG_ERROR(
"'runNumberBounds' must be set when multiple calibration files are configured." );
183 return StatusCode::FAILURE;
188 ATH_MSG_INFO(
"Calibration period 0 (all run numbers): file: "
191 ATH_MSG_INFO(
"Calibration period " << i <<
": run range ["
203 return StatusCode::SUCCESS;
208 ATH_MSG_ERROR(
"Configuration histogram is invalid. Check the run number and systematic configuration combination.");
209 throw std::runtime_error(
"invalid configuration" );
213 if(
eta>2.499 )
eta= 2.499;
214 if(
eta<-2.499 )
eta=-2.499;
225 return TrackCorrTool_t::correctedCopy(in, out);
230 return TrackCorrTool_t::applyContainerCorrection(cont);
241 if (
m_applyD0Bias) result.insert(InDet::TrackSystematicMap.at(TRK_BIAS_D0_WM));
242 if (
m_applyZ0Bias) result.insert(InDet::TrackSystematicMap.at(TRK_BIAS_Z0_WM));
243 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_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_INFO(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.
Handle class for reading a decoration on an object.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".