-
Notifications
You must be signed in to change notification settings - Fork 112
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
MC matching using ToMC - many matches show large momentum differences #404
Comments
A bit more info on this. I have run a further test using the minimum angle method to truth-match. I match kaons and pions to their generated particles by choosing the generated particle with the smallest angle. I then create D0 candidates from kaons and pions, both for the reco hadrons and their matched generated particles. This lets me calculate both the reco and true D0 candidate masses. I can then use the true mass as a selection requirement, to keep only those combinations with a true mass consistent with the PDG D0 mass. The code is here: https://github.com/donalrinho/fcc_python_tools/blob/master/examples/D0_mass_truth_matching.ipynb and I attach the main figure here. It shows that you can cleanly select the genuine reco D0 candidates by cutting on the true mass of the MC-matched combination. This seems to indicate that the minimum-angle MC-matching is working as expected. |
Hi @donalrinho @clementhelsens , it seems that (surprisingly) indeed the FCCSW delphes output tools will create an association even if the MC/Reco particles cannot be matched. It will then save the delphes particle status to the bits field of RecoParticles. The EDM4hep Delphes output handles this much better - I'll try the matching using that now. |
For completeness, in FCC-EDM you would have to add a filter
Values from https://github.com/HEP-FCC/FCCSW/blob/master/Sim/SimDelphesInterface/SimDelphesInterface/ParticleStatus.h |
Hi @vvolkl Thanks for looking into this. Just to note that I've also been looking at MC association in the EDM4Hep output. Here I try to match |
all_hadrons_delta_p_per.pdf
all_hadrons_angle_match_delta_p_per.pdf
I have looked at two MC-matching methods in order to evaluate the performance of the ToMC association. The first method here:
https://github.com/donalrinho/fcc_python_tools/blob/master/examples/momentum_resolution.ipynb
calculates the angle between reconstructed hadrons and generated particles, and chooses the pair with minimum angle to be the MC-matched pair. The second method is here:
https://github.com/donalrinho/fcc_python_tools/blob/master/examples/mc_matching.ipynb
where I use the
efcharged#1.index
values for each reconstructed hadron inefcharged
to pick the associated truth particle ingenParticles
.Both methods always assign a true particle to each reconstructed hadron. This allows the momentum resolution to be studied by calculating the difference between the true and reco momentum for each pair.
I find that method 2 only produces a sensible resolution peak for about 1% of cases, judging by the size of the peak compared to method 1. The other 99% of matched pairs show larger momentum differences, which appear to be quite uniformly distributed. I don't know the origin of this effect, but it may indicate that a lot of the matched pairs are actually random associations. Perhaps the small peak I do find are the cases where the matching at random actually managed to pick the correct pair?
I have noticed that using
efcharged#1.index
andefcharged#0.index
give exactly the same results, whereas I expected these two indices to point to thegenParticles
andefcharged
, respectively. Is it possible thatefcharged#1.index
is not filled with the correctgenParticle
index values?The text was updated successfully, but these errors were encountered: