![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
20 return StatusCode::FAILURE;
25 return StatusCode::FAILURE;
65 return StatusCode::SUCCESS;
82 return StatusCode::FAILURE;
117 decor_z0(*
track) =
ip->IPz0SinTheta;
118 decor_d0_sigma(*
track) =
ip->sigmad0;
119 decor_z0_sigma(*
track) =
ip->sigmaz0SinTheta;
121 " z0SinTheta= " <<
ip->IPz0SinTheta <<
122 " sigmad0= " <<
ip->sigmad0 <<
123 " sigmaz0SinTheta= " <<
ip->sigmaz0SinTheta );
125 ATH_MSG_WARNING(
"failed to estimate track impact parameter, using dummy values" );
126 decor_d0(*
track) = NAN;
127 decor_z0(*
track) = NAN;
128 decor_d0_sigma(*
track) = NAN;
129 decor_z0_sigma(*
track) = NAN;
135 std::unique_ptr< const Trk::TrackParameters > extrap_pars(
m_extrapolator->extrapolate(ctx,
136 track->perigeeParameters(),
146 ATH_MSG_DEBUG(
"vertex_pos (x,y,z)= (" << vertex_pos.x() <<
", " << vertex_pos.y() <<
", " << vertex_pos.z() <<
")");
147 ATH_MSG_DEBUG(
"track_pos (x,y,z)= (" << track_pos.x() <<
", " << track_pos.y() <<
", " << track_pos.z() <<
")");
148 ATH_MSG_DEBUG(
"track_displacement (x,y,z)= (" << position.x() <<
", " << position.y() <<
", " << position.z() <<
")");
151 std::vector< float > out_vec_pos( position.data(), position.data() + position.size() );
154 decor_track_pos (*
track) = out_vec_pos;
155 decor_track_mom (*
track) = out_vec_mom;
157 ATH_MSG_WARNING(
"failed to extrapolate track coordinates at primary vertex, using dummy values");
159 std::vector< float > out_vec_pos = {NAN,NAN,NAN};
160 std::vector< float > out_vec_mom = {NAN,NAN,NAN};
162 decor_track_pos (*
track) = out_vec_pos;
163 decor_track_mom (*
track) = out_vec_mom;
165 bool invalid = !(
ip && extrap_pars);
166 decor_invalid(*
track) = invalid ? 1 : 0;
169 return StatusCode::SUCCESS;
173 if ( vertexCollection.
empty() ) {
186 return vertexCollection.front();
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_invalid
StatusCode execute(const EventContext &ctx) const override final
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_z0
Gaudi::Property< std::string > m_prefix
const Amg::Vector3D & position() const
Access method for the position.
SG::ReadHandleKey< xAOD::VertexContainer > m_VertexContainerKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrackContainerKey
const std::string & key() const
Return the StoreGate ID for the referenced object.
BTagTrackAugmenterAlg(const std::string &name, ISvcLocator *pSvcLocator)
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_track_pos
::StatusCode StatusCode
StatusCode definition for legacy code.
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_track_mom
Handle class for adding a decoration to an object.
#define CHECK(...)
Evaluate an expression and check for errors.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_d0
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_d0_sigma
The namespace of all packages in PhysicsAnalysis/JetTagging.
Eigen::Matrix< double, 3, 1 > Vector3D
ToolHandle< Trk::ITrackToVertexIPEstimator > m_track_to_vx
const Amg::Vector3D & momentum() const
Access method for the momentum.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Class describing a Vertex.
#define ATH_MSG_WARNING(x)
const xAOD::Vertex * getPrimaryVertex(const xAOD::VertexContainer &) const
ToolHandle< Trk::IExtrapolator > m_extrapolator
Class describing a TrackParticle.
StatusCode initialize() override final
size_type size() const noexcept
Returns the number of elements in the collection.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_z0_sigma
bool empty() const noexcept
Returns true if the collection is empty.