Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TracksToParticles: avoid initializing mass from truth #1534

Merged
merged 2 commits into from
Jul 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/algorithms/tracking/TracksToParticles.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ namespace eicrecon {
auto rec_part = parts->create();
rec_part.addToTracks(track);
auto referencePoint = rec_part.getReferencePoint();
// float time = 0;
float mass = 0;
if (best_match >= 0) {
trace("Best match is found and is: {}", best_match);
mc_prt_is_consumed[best_match] = true;
Expand All @@ -138,16 +136,14 @@ namespace eicrecon {
static_cast<float>(best_mc_part.getVertex().x),
static_cast<float>(best_mc_part.getVertex().y),
static_cast<float>(best_mc_part.getVertex().z)}; // @TODO: not sure if vertex/reference point makes sense here
// time = mcpart.getTime();
mass = best_mc_part.getMass();
}

rec_part.setType(static_cast<int16_t>(best_match >= 0 ? 0 : -1)); // @TODO: determine type codes
rec_part.setEnergy((float) std::hypot(edm4hep::utils::magnitude(mom), mass));
rec_part.setMomentum(mom);
rec_part.setReferencePoint(referencePoint);
rec_part.setCharge(charge_rec);
rec_part.setMass(mass);
rec_part.setMass(0.);
rec_part.setGoodnessOfPID(0); // assume no PID until proven otherwise
// rec_part.covMatrix() // @TODO: covariance matrix on 4-momentum

Expand Down
Loading