Getting truth particles from AntiKt4TruthJets
We would like to have the possibility of storing the truth particles used to build AntiKt4TruthJets
.
In particular it would be nice to have those in a collection similar to what is already in place for "truths"
collections.
Trying to simply add this:
"truths": [
...
{
"merge": [
"constituentLinks"
],
"association_name": "AntiKt4TruthJets",
"output": {
"n_to_save": 5,
"sort_order": "pt"
}
}
]
in the EMPFlowTruth.json
throws the error:
terminate called after throwing an instance of 'std::runtime_error'
what(): Truth writer could not cast xAOD::IParticle to xAOD::TruthParticle
A possible way to retrieve the truth particles from the AntiKt4TruthJets
is using the jet's method getConstituents()
which returns a xAOD::JetConstituentVector
object, that in this case contains to the truth particles.
In this issue I would like to bring up the discussion of what should be the best place in the TDD to loop over the truth jets constituents in order to store them in a collection.