9 template <
typename vfitter_t>
11 const std::vector<const InputTrack_t*>& trackVector,
17 std::vector<std::pair<double, double>> zPositions;
19 for (
const auto& iTrk : trackVector) {
23 std::pair<double, double> z0AndWeight;
26 vertexingOptions.
constraint.covariance()(0, 0) != 0) {
27 auto estRes =
m_cfg.ipEstimator.getImpactParameters(
33 return estRes.error();
39 z0AndWeight.first = ipas.
z0 + vertexingOptions.
constraint.position().z();
42 double chi2IP = std::pow(ipas.
d0 / ipas.
sigmaD0, 2);
44 if (!
m_cfg.disableAllWeights) {
46 1. / (1. + std::exp((chi2IP -
m_cfg.constraintcutoff) /
47 m_cfg.constrainttemp));
49 if (!std::isnormal(z0AndWeight.second)) {
50 z0AndWeight.second = 0.;
53 z0AndWeight.second = 1.;
57 "Unable to compute IP significance. "
58 "Setting IP weight to 1.");
61 z0AndWeight.second = 1.;
70 z0AndWeight.second *= std::pow(Pt,
m_cfg.expPt);
73 Pt >
m_cfg.minPt ? std::log(Pt /
m_cfg.minPt) : 0.;
77 if (z0AndWeight.second >=
m_cfg.minWeight) {
78 zPositions.push_back(z0AndWeight);
82 if (!zPositions.empty()) {
83 auto res =
m_cfg.mode1dFinder.getMode(zPositions);
90 ACTS_DEBUG(
"Resulting mean Z position found: " << ZResult);
95 vertexingOptions.
constraint.position().y(), ZResult,
100 std::vector<Vertex<InputTrack_t>> vertexCollection;
103 vertexCollection.push_back(vtxResult);
105 return vertexCollection;