Commit 7c19e51b authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Track param vertex/cluster init

parent b380117b
...@@ -78,34 +78,38 @@ namespace Jug::Reco { ...@@ -78,34 +78,38 @@ namespace Jug::Reco {
using Acts::UnitConstants::mm; using Acts::UnitConstants::mm;
using Acts::UnitConstants::ns; using Acts::UnitConstants::ns;
double p = c.energy()*GeV; double p_cluster = c.energy()*GeV;
if( p < 1.0) { if( p_cluster < 1.0) {
debug() << " skipping cluster with energy " << p/GeV << " GeV" << endmsg; debug() << " skipping cluster with energy " << p_cluster/GeV << " GeV" << endmsg;
continue; continue;
} }
double len = std::hypot( c.x() , c.y() , c.z() );
for(const auto& t : *vtx_hits) {
// build some track cov matrix
Acts::BoundSymMatrix cov = Acts::BoundSymMatrix::Zero(); double len = std::hypot( t.x() , t.y() , t.z() );
cov(Acts::eBoundLoc0, Acts::eBoundLoc0) = 1.0 * mm*1.0 * mm;
cov(Acts::eBoundLoc1, Acts::eBoundLoc1) = 1.0 * mm*1.0 * mm; // build some track cov matrix
cov(Acts::eBoundPhi, Acts::eBoundPhi) = M_PI / 180.0; Acts::BoundSymMatrix cov = Acts::BoundSymMatrix::Zero();
cov(Acts::eBoundTheta, Acts::eBoundTheta) = M_PI / 180.0; cov(Acts::eBoundLoc0, Acts::eBoundLoc0) = 1.0 * mm*1.0 * mm;
cov(Acts::eBoundQOverP, Acts::eBoundQOverP) = 1.0 / (p*p); cov(Acts::eBoundLoc1, Acts::eBoundLoc1) = 1.0 * mm*1.0 * mm;
cov(Acts::eBoundTime, Acts::eBoundTime) = Acts::UnitConstants::ns; cov(Acts::eBoundPhi, Acts::eBoundPhi) = M_PI / 180.0;
cov(Acts::eBoundTheta, Acts::eBoundTheta) = M_PI / 180.0;
// add all charges to the track candidate... cov(Acts::eBoundQOverP, Acts::eBoundQOverP) = 1.0 / (0.01*0.01*p_cluster*p_cluster);
init_trk_params->emplace_back(Acts::Vector4D(0 * mm, 0 * mm, 0 * mm, 0), cov(Acts::eBoundTime, Acts::eBoundTime) = Acts::UnitConstants::ns;
Acts::Vector3D(c.x() * p / len, c.y() * p / len, c.z() * p / len), p, -1,
std::make_optional(cov)); // add all charges to the track candidate...
init_trk_params->emplace_back(Acts::Vector4D(0 * mm, 0 * mm, 0 * mm, 0), init_trk_params->emplace_back(Acts::Vector4D(0 * mm, 0 * mm, 0 * mm, 0),
Acts::Vector3D(c.x() * p / len, c.y() * p / len, c.z() * p / len), p, 1, Acts::Vector3D(t.x() * p_cluster / len, t.y() * p_cluster / len, t.z() * p_cluster / len), p_cluster, -1,
std::make_optional(cov)); std::make_optional(cov));
}
//init_trk_params->emplace_back(Acts::Vector4D(0 * mm, 0 * mm, 0 * mm, 0),
// Acts::Vector3D(c.x() * p / len, c.y() * p / len, c.z() * p / len), p, 1,
// std::make_optional(cov));
//init_trk_params->emplace_back(Acts::Vector4D(0 * mm, 0 * mm, 0 * mm, 0), //init_trk_params->emplace_back(Acts::Vector4D(0 * mm, 0 * mm, 0 * mm, 0),
// Acts::Vector3D(c.x() * p / len, c.y() * p / len, c.z() * p / len), p, 0, // Acts::Vector3D(c.x() * p / len, c.y() * p / len, c.z() * p / len), p, 0,
// std::make_optional(cov)); // std::make_optional(cov));
debug() << "Invoke track finding seeded by truth particle with p = " << p/GeV << " GeV" << endmsg; debug() << "Invoke track finding seeded by truth particle with p = " << p_cluster/GeV << " GeV" << endmsg;
} }
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment