-
Notifications
You must be signed in to change notification settings - Fork 41
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
Make the TrueJet processor use the PIDHandler to set the ParticleIDs #132
Conversation
Yes I will test it. It would probably also be good if someone who uses the MarlinUtil TrueJet parser can test if that still works with this change. Maybe someone at DESY? :) |
Thanks. In principle nothing should have changed other than that we are now writing some additional metadata as well. I will check if that is actually true. |
This fixes running TrueJet for me. I still need to adapt my RDataframe code to work on the new direction though. As far as I can tell I attached the above-mentioned |
Analysis/TrueJet/src/TrueJet.cc
Outdated
auto fafpf_mainPidId = fafpfPidHandler.addAlgorithm("TrueJet_fafpf", {}); | ||
std::array<int, 25> fafpf_pidIds{}; | ||
for (size_t i = 0; i < fafpf_pidIds.size(); ++i) { | ||
fafpf_pidIds[i] = fafpfPidHandler.addAlgorithm("TrueJet_fafpf_jet_" + std::to_string(i), {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fafpf_pidIds[i] = fafpfPidHandler.addAlgorithm("TrueJet_fafpf_jet_" + std::to_string(i), {}); | |
fafpf_pidIds[i] = fafpfPidHandler.addAlgorithm("TrueJet_fafpf_jet_" + std::to_string(i + 1), {}); |
Also the 0'th one is never filled? The files become really crowded at the moment with all of them in there...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't this do the opposite? I.e. it just renames 0 to 1 but it will still never be filled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't fix that, but I just remembered I wanted to do this, because previously the one that goes currently into the "main" PID went into 0
.
Analysis/TrueJet/src/TrueJet.cc
Outdated
auto fafpi_mainPidId = fafpiPidHandler.addAlgorithm("TrueJet_fafpi", {}); | ||
std::array<int, 25> fafpi_pidIds{}; | ||
for (size_t i = 0; i < fafpi_pidIds.size(); ++i) { | ||
fafpi_pidIds[i] = fafpiPidHandler.addAlgorithm("TrueJet_fafpi_jet_" + std::to_string(i), {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fafpi_pidIds[i] = fafpiPidHandler.addAlgorithm("TrueJet_fafpi_jet_" + std::to_string(i), {}); | |
fafpi_pidIds[i] = fafpiPidHandler.addAlgorithm("TrueJet_fafpi_jet_" + std::to_string(i + 1), {}); |
I am not sure if this can even be checked easily, but were these filled before? |
I think that the 0'th one was not filled was expected if you start the counting of the jets per ICN by 1. There is no ICN/FCN with no truejet belonging to it. So that one seems to be simply left over. For the values > 2 I am not so sure. I think 3 and 4 are used relatively often (as soon as you have gluon-splitting etc.). Leaving my area of expertise even more I would guess that a final colour neutral would by definition always result in two (true)jets while an initial colour neutral can have So maybe we can at least reduce the amount of |
feaee55
to
dc83d18
Compare
After merging #134, we have almost halfed the number of ParticleID objects that will be visible once this has been converted to EDM4hep. For the initial state side there is no generally applicable way to do this. The number 25 has been chosen to work at ILD up to 1 TeV. At lower energies this might be smaller. I think the easiest way of dealing with this might be to simply drop the "superfluous" collections via the # ...
"drop *_PID_TrueJet_fafpi_jet1?",
"drop *_PID_TrueJet_fafpi_jet2?",
# and then maybe some single digits as well if you still want to get rid of more
# or alternatively drop all of them and keep only the ones you want, might be the same number of lines |
@@ -837,6 +848,12 @@ void TrueJet::processEvent( LCEvent * event ) { | |||
// pre-PS part | |||
|
|||
LCCollectionVec* fafpi_vec = new LCCollectionVec(LCIO::RECONSTRUCTEDPARTICLE ) ; | |||
auto fafpiPidHandler = UTIL::PIDHandler(fafpi_vec); | |||
auto fafpi_mainPidId = fafpiPidHandler.addAlgorithm("TrueJet_fafpi", {}); | |||
std::array<int, 25> fafpi_pidIds{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know the 25 is just the result of correctly making the 0'th pid the mainPid, but I wonder if the 26 before was correct? I would have thought that we would expect an even number here (after removal of the mainPid).
Analysis/TrueJet/src/TrueJet.cc
Outdated
auto fafpi_mainPidId = fafpiPidHandler.addAlgorithm("TrueJet_fafpi", {}); | ||
std::array<int, 25> fafpi_pidIds{}; | ||
for (size_t i = 0; i < fafpi_pidIds.size(); ++i) { | ||
fafpi_pidIds[i] = fafpiPidHandler.addAlgorithm("TrueJet_fafpi_jet_" + std::to_string(i), {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we format this to left-pad with 0 to have nicer sorting in podio-dump
etc.?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So basically, TrueJet_fafpi_jet_01
for example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done. Should work until someone wants more than 99 of these ;)
While you are in there anyway, do you mind setting MarlinReco/Analysis/TrueJet/src/TrueJet.cc Line 157 in 8c3f3b6
to something like MESSAGE ?
|
BEGINRELEASENOTES
TrueJet
processor use thePIDHandler
to set theParticleIDs
for the different objects it creates. This sets the necessary metadata that is required, e.g. for the conversion to EDM4hep.ENDRELEASENOTES
Fixes key4hep/k4EDM4hep2LcioConv#62
@Zehvogel can you check whether this fixes things on your end? At least from a technical level, the algorithm names might still need some tuning, but I would also be interested to see which ones are actually hit / converted.