|
ATLAS Offline Software
|
Go to the documentation of this file.
37 ATH_MSG_ERROR(
"Category key does not match output container key!");
38 return StatusCode::FAILURE;
50 return StatusCode::SUCCESS;
59 return StatusCode::FAILURE;
65 return StatusCode::FAILURE;
68 std::vector<const xAOD::Vertex *> vertices;
72 if (!vertexHandle.isValid())
75 return StatusCode::FAILURE;
78 vertices.reserve(vertexHandle->size());
83 vertices.push_back(ivtx);
89 auto combined = std::make_unique<ConstDataVector<xAOD::PFOContainer>>(
SG::VIEW_ELEMENTS);
94 combined->push_back(ipfo);
109 isPVMatched =
m_tvaTool->isCompatible(*itrk, *priVtx);
111 isPVMatched =
m_tvaTool->getUniqueMatchVertex(*itrk, vertices) == priVtx;
121 if (accPVMatched(*ipfo))
129 combined->push_back(ipfo);
133 CHECK(outputHandle.put(ctx, std::move(combined)) !=
nullptr);
134 return StatusCode::SUCCESS;
std::string contKeyFromKey(const std::string &key)
Extract the container part of key.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
DataVector adapter that acts like it holds const pointers.
std::string decorKeyFromKey(const std::string &key)
Extract the decoration part of key.
virtual StatusCode execute(const EventContext &context) const override
Run the algorithm.
Helper class to provide constant type-safe access to aux data.
ToolHandle< CP::ITrackVertexAssociationTool > m_tvaTool
Track -> vertex association.
SG::WriteHandleKey< xAOD::PFOContainer > m_outputKey
The output combined container.
Gaudi::Property< bool > m_useCompatible
Choose between the unique (many-to-one) track->vertex association and just checking compatibility wit...
Some common helper functions used by decoration handles.
VxType::VertexType vertexType() const
The type of the vertex.
SG::ReadHandleKey< xAOD::PFOContainer > m_inputChargedKey
The input charged container.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Handle class for recording to StoreGate.
virtual StatusCode initialize() override
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
::StatusCode StatusCode
StatusCode definition for legacy code.
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelTool
Track selection tool.
bool m_manualTVA
Whether to perform track -> vertex matching manually.
#define CHECK(...)
Evaluate an expression and check for errors.
SG::ReadHandleKey< xAOD::PFOContainer > m_inputNeutralKey
The input neutral container.
SG::ReadHandleKey< xAOD::VertexContainer > m_inputVertexKey
The input vertex container.
Class describing a particle flow object.
PFOPrepAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
SG::WriteDecorHandleKey< xAOD::PFOContainer > m_outputCategoryKey
The output classification.
Class describing a Vertex.
Class describing a TrackParticle.
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
Handle class for reading from StoreGate.
deferred_t< SG::AuxElement::Decorator< int > > m_decCategory