15 #include <Acts/EventData/SingleCurvilinearTrackParameters.hpp>
16 #include <Acts/Utilities/Units.hpp>
24 #include <trackbase_historic/SvtxVertexMap.h>
25 #include <trackbase_historic/SvtxVertex.h>
33 #include <TMatrixDSym.h>
38 , m_actsFitResults(nullptr)
48 std::cout <<
"Finished PHActsToSvtxTracks" << std::endl;
74 std::cout <<
"Start process_event in PHActsToSvtxTracks" << std::endl;
83 std::cout <<
"Finished PHActsToSvtxTracks process_event"
110 const auto &[trackTips, mj] = traj.trajectory();
113 const auto& trackTip = trackTips.front();
119 float pathlength = 0.0;
136 svtxTrack->
set_px(params.momentum()(0));
137 svtxTrack->
set_py(params.momentum()(1));
138 svtxTrack->
set_pz(params.momentum()(2));
142 svtxTrack->
set_ndf(trajState.NDF);
146 float dca3DxyCov = NAN;
147 float dca3DzCov = NAN;
149 auto rotater = std::make_unique<ActsTransformations>();
152 if(params.covariance())
155 rotater->rotateActsCovToSvtxTrack(params,
158 for(
int i = 0;
i < 6;
i++)
159 for(
int j = 0;
j < 6;
j++)
162 rotater->calculateDCA(params,
vertex, rotatedCov,
165 dca3DxyCov, dca3DzCov);
176 rotater->fillSvtxTrackStates(traj, trackTip, svtxTrack,
190 std::cerr <<
"DST node is missing, quitting" << std::endl;
191 throw std::runtime_error(
"Failed to find DST node in PHActsTracks::createNodes");
221 m_svtxTrackMap = findNode::getClass<SvtxTrackMap>(topNode,
"SvtxTrackMap");
225 std::cout <<
PHWHERE <<
"SvtxTrackMap not found on node tree. Exiting."
230 m_svtxVertexMap = findNode::getClass<SvtxVertexMap>(topNode,
"SvtxVertexMap");
233 std::cout <<
PHWHERE <<
"SvtxVertexMap not found on node tree. Exiting."
238 m_tGeometry = findNode::getClass<ActsTrackingGeometry>(topNode,
"ActsTrackingGeometry");
242 std::cout <<
PHWHERE <<
"ActsTrackingGeometry not on node tree, exiting."
247 m_actsFitResults = findNode::getClass<std::map<const unsigned int, Trajectory>>(topNode,
"ActsFitResults");
251 std::cout <<
PHWHERE <<
"ActsFitResults not on node tree, exiting."