20 ATH_MSG_ERROR(
"m_absEtaRanges.size() != m_absEtaFractions.size(), "
22 return StatusCode::FAILURE;
25 ATH_MSG_ERROR(
"sizes of m_rangeIterZ, m_nBinsZIterZ.size(), and m_nBinsCotThetaIterZ.size() are not equal, "
27 return StatusCode::FAILURE;
46 ATH_MSG_DEBUG(
"Successfully initialized ActsTrk::HoughVtxFinderTool");
47 return StatusCode::SUCCESS;
50std::pair<std::unique_ptr<xAOD::VertexContainer>, std::unique_ptr<xAOD::VertexAuxContainer>>
61 finderCfgBS.defVtxPosition[0] = beamposition.
position().x();
62 finderCfgBS.defVtxPosition[1] = beamposition.
position().y();
70 auto theVertexContainer = std::make_unique<xAOD::VertexContainer>();
71 auto theVertexAuxContainer = std::make_unique<xAOD::VertexAuxContainer>();
72 theVertexContainer->setStore(theVertexAuxContainer.get());
77 return std::make_pair(std::move(theVertexContainer), std::move(theVertexAuxContainer));
80 auto vertexFinder = std::make_unique<VertexFinder>(finderCfgBS,
logger().cloneWithSuffix(
"Finder"));
82 ATH_MSG_DEBUG(
"default vertex position: " << vertexFinder->config().defVtxPosition[0] <<
", "
83 << vertexFinder->config().defVtxPosition[1] <<
", "
84 << vertexFinder->config().defVtxPosition[2]);
86 std::vector<SpacePoint> spacePointVector;
87 spacePointVector.reserve(spacePointContainer.
size());
88 for (
const auto sp : spacePointContainer) {
89 spacePointVector.emplace_back(
sp);
92 ATH_MSG_DEBUG(
"Number of input space points: " << spacePointVector.size());
93 auto vtx = vertexFinder->find(spacePointVector);
96 ATH_MSG_DEBUG(
"Vertex position: " << (*vtx)[0] <<
", " << (*vtx)[1] <<
", " << (*vtx)[2]);
97 auto xAODVertex = theVertexContainer->push_back(std::make_unique<xAOD::Vertex>());
98 xAODVertex->setPosition(*vtx);
104 return std::make_pair(std::move(theVertexContainer), std::move(theVertexAuxContainer));
#define ATH_CHECK
Evaluate an expression and check for errors.
std::unique_ptr< const Acts::Logger > makeActsAthenaLogger(IMessageSvc *svc, const std::string &name, int level, std::optional< std::string > parent_name)
size_type size() const noexcept
Returns the number of elements in the collection.
Trk::RecVertex inherits from Trk::Vertex.
const Amg::Vector3D & position() const
return position of vertex
static Root::TMsgLogger logger("iLumiCalc")
SpacePointContainer_v1 SpacePointContainer
Define the version of the space point container.