35 InDetTrackSmearingTool::InDetTrackSmearingTool(
const std::string& name )
36 :
InDet::InDetTrackSystematicsTool( name )
39#ifndef XAOD_STANDALONE
40 declareInterface<IInDetTrackSmearingTool>(
this);
51 ATH_MSG_INFO(
"Using dedicated CTIDE smearing maps for tracks in jets" );
63 return StatusCode::SUCCESS;
70 float pt = 1.e-3*track.pt();
71 float eta = track.eta();
74 if (!
isActive(TRK_RES_D0_MEAS, filtered)) {
76 return std::sqrt(sigma_D0);
81 if (d0hist ==
nullptr)
ATH_MSG_ERROR(
"d0 histogram is null!" );
91 sigma_D0 += d0Smear*d0Smear;
93 return std::sqrt(sigma_D0);
101 float pt = 1.e-3*track.pt();
102 float eta = track.eta();
103 float sigma_Z0 = 0.f;
105 if (!
isActive(TRK_RES_Z0_MEAS, filtered)) {
107 return std::sqrt(sigma_Z0);
112 if (z0hist ==
nullptr)
ATH_MSG_ERROR(
"z0 histogram is null!" );
122 sigma_Z0 += z0Smear*z0Smear;
124 return std::sqrt(sigma_Z0);
132 static_cast<uint32_t
>(std::abs(track.phi()) * 1e6),
133 static_cast<uint32_t
>(std::abs(track.eta()) * 1e3),
139 static const SG::AuxElement::Accessor< float > accD0(
"d0" );
140 static const SG::AuxElement::Accessor< float > accZ0(
"z0" );
143 if ( sigmaD0 > 0. ) accD0( track ) = std::normal_distribution<double>( track.d0(), sigmaD0 )(prng);
144 if ( sigmaZ0 > 0. ) accZ0( track ) = std::normal_distribution<double>( track.z0(), sigmaZ0 )(prng);
165 return TrackCorrTool_t::correctedCopy(in, out);
170 return TrackCorrTool_t::applyContainerCorrection(cont);
180 return RecommendedSystematics;
186 return RecommendedSystematics;
197 if(
eta>2.499 )
eta= 2.499;
198 if(
eta<-2.499 )
eta=-2.499;
199 if ( pt < histogram->GetXaxis()->GetXmin() ) {
200 pt =
histogram->GetXaxis()->GetXmin() + 0.01;
202 if ( pt >=
histogram->GetXaxis()->GetXmax() ) {
203 pt =
histogram->GetXaxis()->GetXmax() - 0.01;
Scalar eta() const
pseudorapidity method
#define ATH_CHECK
Evaluate an expression and check for errors.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
static const Attributes_t empty
ServiceHandle< StoreGateSvc > & evtStore()
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.
static const CP::SystematicSet RecommendedSystematics
static const std::unordered_map< InDet::TrackSystematic, CP::SystematicVariation, std::hash< int > > TrackSystematicMap
uint64_t getEventNumber(Store &&store)
Return the event number for the currently-executing event.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".