27 , m_trajectories(nullptr)
43 std::vector<unsigned int> deletedKeys;
51 deletedKeys.push_back(trackKey);
57 svtxTrack->identify();
62 if (trackTips.size() > 1 and
Verbosity() > 0)
65 <<
"More than 1 track tip per track. Should never happen..."
69 for (
const auto& trackTip : trackTips)
71 const auto& boundParams =
trajectory.trackParameters(trackTip);
73 auto result =
propagateTrack(boundParams, svtxTrack->get_vertex_id());
82 svtxTrack->identify();
91 std::cout <<
"Propagated tracks to PerigeeSurface at (0,0,0) as no track vertices were found" << std::endl;
94 for (
auto& key : deletedKeys)
96 m_trajectories->erase(key);
106 float xvtx = vtx->get_x();
107 float yvtx = vtx->get_y();
108 float zvtx = vtx->get_z();
113 for (
auto trackiter = vtx->begin_tracks(); trackiter != vtx->end_tracks();
122 float trkx = track->
get_x();
123 float trky = track->
get_y();
124 float trkz = track->
get_z();
129 xchisqsum += pow(trkx - xvtx, 2) / trkcovx;
130 ychisqsum += pow(trky - yvtx, 2) / trkcovy;
131 zchisqsum += pow(trkz - zvtx, 2) / trkcovz;
135 vtx->set_chisq(xchisqsum + ychisqsum + zchisqsum);
138 vtx->set_ndof(vtx->size_tracks() * 3 - 3);
149 std::cout <<
"Updating position track parameters from " << track->
get_x()
150 <<
", " << track->
get_y() <<
", " << track->
get_z() <<
" to "
170 for (
int i = 0;
i < 3;
i++)
172 for (
int j = 0;
j < 3;
j++)
183 const unsigned int vtxid)
187 auto perigee = Acts::Surface::makeShared<Acts::PerigeeSurface>(actsVertex);
192 if (
m_fieldMap.find(
".root") == std::string::npos)
194 propagator.constField();
195 propagator.setConstFieldValue(std::stod(
m_fieldMap));
198 return propagator.propagateTrack(params, perigee);
212 return Acts::Vector3::Zero();
222 m_tGeometry = findNode::getClass<ActsGeometry>(topNode,
"ActsGeometry");
225 std::cout <<
PHWHERE <<
"Acts tracking geometry not on node tree, exiting."
230 m_trajectories = findNode::getClass<std::map<const unsigned int, Trajectory>>(topNode,
"ActsTrajectories");
234 std::cout <<
PHWHERE <<
"No acts trajectories on node tree, exiting. "
239 m_vertexMap = findNode::getClass<SvtxVertexMap>(topNode,
"SvtxVertexMap");
242 std::cout <<
PHWHERE <<
"No svtx vertex map, exiting." << std::endl;
246 m_trackMap = findNode::getClass<SvtxTrackMap>(topNode,
"SvtxTrackMap");
249 std::cout <<
PHWHERE <<
"No svtx track map, exiting. " << std::endl;