9 template <
typename vfitter_t>
11 const std::vector<const InputTrack_t*>& trackVector,
15 bool useConstraint =
false;
23 std::vector<std::pair<double, double>> zPositions;
25 for (
const auto& iTrk : trackVector) {
29 std::pair<double, double> z0AndWeight;
33 auto estRes = m_cfg.ipEstimator.estimateImpactParameters(
39 return estRes.error();
49 double chi2IP = std::pow(ipas.
IPd0 / ipas.
sigmad0, 2);
51 if (!m_cfg.disableAllWeights) {
53 1. / (1. + std::exp((chi2IP - m_cfg.constraintcutoff) /
54 m_cfg.constrainttemp));
56 if (!std::isnormal(z0AndWeight.second)) {
57 z0AndWeight.second = 0.;
60 z0AndWeight.second = 1.;
64 "Unable to compute IP significance. "
65 "Setting IP weight to 1.");
68 z0AndWeight.second = 1.;
72 if (!m_cfg.disableAllWeights && (m_cfg.usePt || m_cfg.useLogPt)) {
77 z0AndWeight.second *= std::pow(Pt, m_cfg.expPt);
80 Pt > m_cfg.minPt ? std::log(Pt / m_cfg.minPt) : 0.;
84 if (z0AndWeight.second >= m_cfg.minWeight) {
85 zPositions.push_back(z0AndWeight);
89 if (!zPositions.empty()) {
90 auto res = m_cfg.mode1dFinder.getMode(zPositions);
97 ACTS_DEBUG(
"Resulting mean Z position found: " << ZResult);
107 std::vector<Vertex<InputTrack_t>> vertexCollection;
110 vertexCollection.push_back(vtxResult);
112 return vertexCollection;