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);
131 if (
evtStore()->retrieve(event_info,
"EventInfo").isFailure()) {
136 int seed = std::abs(track.phi()) * 1e6 + std::abs(track.eta()) * 1e3 + event_info->
eventNumber();
142 static const SG::AuxElement::Accessor< float > accD0(
"d0" );
143 static const SG::AuxElement::Accessor< float > accZ0(
"z0" );
146 if ( sigmaD0 > 0. ) accD0( track ) = std::normal_distribution<double>( track.d0(), sigmaD0 )(prng);
147 if ( sigmaZ0 > 0. ) accZ0( track ) = std::normal_distribution<double>( track.z0(), sigmaZ0 )(prng);
168 return TrackCorrTool_t::correctedCopy(in, out);
173 return TrackCorrTool_t::applyContainerCorrection(cont);
183 return RecommendedSystematics;
189 return RecommendedSystematics;
200 if(
eta>2.499 )
eta= 2.499;
201 if(
eta<-2.499 )
eta=-2.499;
202 if ( pt < histogram->GetXaxis()->GetXmin() ) {
203 pt =
histogram->GetXaxis()->GetXmin() + 0.01;
205 if ( pt >=
histogram->GetXaxis()->GetXmax() ) {
206 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 eventNumber() const
The current event's event number.
EventInfo_v1 EventInfo
Definition of the latest event info version.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".