27 (
const std::string&
type,
28 const std::string& name,
29 const IInterface* parent)
31 m_resolver (
"TrackParticlePerigeeAtPVAssociationTool",
35 declareProperty (
"SGKey",
m_vxCandidate =
"PrimaryVertices,VxPrimaryCandidate");
40 CHECK( Base::initialize() );
43 return StatusCode::SUCCESS;
58 StatusCode
sc = evtStore()->retrieve(vxContainer,
m_resolver.key());
59 if (
sc.isFailure() || !vxContainer) {
64 if(vxContainer->
size()<1){
65 REPORT_MESSAGE (MSG::WARNING) <<
"No primary vertices reconstructed";
71 return m_trackToVertexTool->perigeeAtVertex(Gaudi::Hive::currentContext(), track, vx->position()).release();
74 REPORT_MESSAGE (MSG::WARNING) <<
"No primary vertices reconstructed";
Helpers for checking error return status codes and reporting errors.
#define REPORT_MESSAGE(LVL)
Report a message.
#define CHECK(...)
Evaluate an expression and check for errors.
Associate from a TrackParticle to its perigee at PV.
virtual void releaseObject(const Trk::TrackParameters *p) override
Release an object retrieved from the association.
std::string m_vxCandidate
SingleAssociationTool< Types< xAOD::TrackParticle >, Trk::TrackParameters > Base
virtual StatusCode initialize() override
TrackParticlePerigeeAtPVAssociationTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
virtual const Trk::TrackParameters * get(const xAOD::TrackParticle &p) override
Return the target object.
size_type size() const noexcept
Returns the number of elements in the collection.
Block filler tool for noisy FEB information.
ParametersBase< TrackParametersDim, Charged > TrackParameters
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.