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;
67 float pt = 1.e-3*track.pt();
68 float eta = track.eta();
71 bool isActiveD0Meas =
isActive(TRK_RES_D0_MEAS);
73 if (isActiveD0Meas == 0) {
75 return std::sqrt(sigma_D0);
80 if (d0hist ==
nullptr)
ATH_MSG_ERROR(
"d0 histogram is null!" );
90 sigma_D0 += d0Smear*d0Smear;
92 return std::sqrt(sigma_D0);
97 float pt = 1.e-3*track.pt();
98 float eta = track.eta();
101 bool isActiveZ0Meas =
isActive(TRK_RES_Z0_MEAS);
103 if (isActiveZ0Meas == 0) {
105 return std::sqrt(sigma_Z0);
110 if (z0hist ==
nullptr)
ATH_MSG_ERROR(
"z0 histogram is null!" );
120 sigma_Z0 += z0Smear*z0Smear;
122 return std::sqrt(sigma_Z0);
128 if (
evtStore()->retrieve(event_info,
"EventInfo").isFailure()) {
133 int seed = std::abs(track.phi()) * 1e6 + std::abs(track.eta()) * 1e3 + event_info->
eventNumber();
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);
152 return TrackCorrTool_t::correctedCopy(in, out);
157 return TrackCorrTool_t::applyContainerCorrection(cont);
167 return RecommendedSystematics;
173 return RecommendedSystematics;
184 if(
eta>2.499 )
eta= 2.499;
185 if(
eta<-2.499 )
eta=-2.499;
186 if ( pt < histogram->GetXaxis()->GetXmin() ) {
187 pt =
histogram->GetXaxis()->GetXmin() + 0.01;
189 if ( pt >=
histogram->GetXaxis()->GetXmax() ) {
190 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)
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
SG::Accessor< T, ALLOC > Accessor
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".