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

broken conversion of lcio particle IDs that were not created using the PID handler #62

Closed
Zehvogel opened this issue May 7, 2024 · 1 comment · Fixed by iLCSoft/MarlinReco#132

Comments

@Zehvogel
Copy link
Contributor

Zehvogel commented May 7, 2024

#51 breaks conversion of lcio particle IDs that were not created using the PID handler. I don't know if we consider this a bug but for instance TrueJet output seems to fail in

for (const auto lcioPid : rval->getParticleIDs()) {
auto pid = convertParticleID(lcioPid);
pid.setParticle(lval);
if (auto pidIt = particleIDs.find(pid.getAlgorithmType());
pidIt != particleIDs.end()) {
pidIt->second->push_back(pid);
} else {
std::cerr << "ERROR: Found a PID object with an algorithm ID that is "
"not known to the PIDHandler (id = "
<< pid.getAlgorithmType() << ")" << std::endl;
}
}
}

and I suspect this is because it has no algorithm id as it does not use the PIDHandler but adds the PID directly like here

        ParticleIDImpl* pid = new ParticleIDImpl; 
        pid->setPDG(k[elementon[i_jet]][2]);
        pid->setType(pid_type[i_jet]);
        true_jet->addParticleID(pid);
        true_jet->ext<TJindex>()=i_jet; 

I did not check if any other processors do the same, it might be quicker to just make TrueJet use the PIDHandler... :)

@tmadlener
Copy link
Contributor

I would consider this a bug in TrueJet.

I did not check if any other processors do the same, it might be quicker to just make TrueJet use the PIDHandler... :)

I think so, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants