|
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::FlowElementContainer>>(
SG::VIEW_ELEMENTS);
94 combined->push_back(ife);
108 ATH_MSG_ERROR(
"Could not retrieve primary track particle from FlowElement");
109 return StatusCode::FAILURE;
115 isPVMatched =
m_tvaTool->isCompatible(*itrk, *priVtx);
117 isPVMatched =
m_tvaTool->getUniqueMatchVertex(*itrk, vertices) == priVtx;
127 if (accPVMatched(*ife))
135 combined->push_back(ife);
139 CHECK(outputHandle.put(ctx, std::move(combined)) !=
nullptr);
140 return StatusCode::SUCCESS;
FlowElementPrepAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
std::string contKeyFromKey(const std::string &key)
Extract the container part of key.
deferred_t< SG::AuxElement::Decorator< int > > m_decCategory
virtual StatusCode execute(const EventContext &context) const override
Run the algorithm.
SG::WriteHandleKey< xAOD::FlowElementContainer > m_outputKey
The output combined container.
SG::ReadHandleKey< xAOD::VertexContainer > m_inputVertexKey
The input vertex container.
@ 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.
Helper class to provide constant type-safe access to aux data.
Class providing the definition of the 4-vector interface.
Some common helper functions used by decoration handles.
VxType::VertexType vertexType() const
The type of the vertex.
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteDecorHandleKey< xAOD::FlowElementContainer > m_outputCategoryKey
The output classification.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Handle class for recording to StoreGate.
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.
bool m_manualTVA
Whether to perform track -> vertex matching manually.
virtual StatusCode initialize() override
#define CHECK(...)
Evaluate an expression and check for errors.
Class describing a Vertex.
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelTool
Track selection tool.
SG::ReadHandleKey< xAOD::FlowElementContainer > m_inputChargedKey
The input charged container.
Class describing a TrackParticle.
Handle class for reading from StoreGate.
SG::ReadHandleKey< xAOD::FlowElementContainer > m_inputNeutralKey
The input neutral container.
ToolHandle< CP::ITrackVertexAssociationTool > m_tvaTool
Track -> vertex association.
Gaudi::Property< bool > m_useCompatible
Choose between the unique (many-to-one) track->vertex association and just checking compatibility wit...
A detector object made of other lower level object(s)