22 const IInterface*
p) :
25 declareInterface<DerivationFramework::IAugmentationTool>(
this);
31 ATH_MSG_ERROR(
"No decoration prefix name provided for the output of TracktoVertexWrapper!");
32 return StatusCode::FAILURE;
35 ATH_MSG_ERROR(
"No TrackParticle collection provided for TracktoVertexWrapper!");
36 return StatusCode::FAILURE;
42 std::vector<std::string>
names;
64 return StatusCode::SUCCESS;
69 return StatusCode::SUCCESS;
74 const EventContext& ctx = Gaudi::Hive::currentContext();
80 return StatusCode::FAILURE;
83 if ( !vertices.isValid() )
86 return StatusCode::FAILURE;
89 std::vector<SG::WriteDecorHandle<xAOD::TrackParticleContainer,float> >
92 for (
const auto *trItr : *tracks) {
93 std::unique_ptr<Trk::ImpactParametersAndSigma> iPandSigma;
94 std::unique_ptr<Trk::ImpactParametersAndSigma> iPandSigmaBiased;
96 for (
const auto *
const vx : *vertices) {
97 for (
const auto& tpLink : vx->trackParticleLinks()) {
98 if (*tpLink == trItr) {
103 if (foundVertex)
break;
106 iPandSigma=
m_tool->estimate(trItr,foundVertex,
true);
107 iPandSigmaBiased =
m_tool->estimate(trItr,foundVertex,
false);
108 if( !iPandSigma )
ATH_MSG_WARNING (
"trackToVertexIPEstimator failed !");
109 if( !iPandSigmaBiased )
ATH_MSG_WARNING (
"trackToVertexIPEstimator biased IP failed !");
112 ATH_MSG_DEBUG(
"No vertex associated to the track. Skipping it.");
139 if (iPandSigmaBiased) {
163 return StatusCode::SUCCESS;