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
Bugfix for pseudotop bjet constituents #15079
Conversation
A new Pull Request was created by @intrepid42 (Markus Seidel) for CMSSW_7_6_X. It involves the following packages: TopQuarkAnalysis/TopEventProducers @cmsbuild, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are list here #13028 |
for ( size_t i=0, n=genParticleHandle->size(); i<n; ++i ) | ||
{ | ||
const reco::Candidate& p = genParticleHandle->at(i); | ||
const int status = p.status(); | ||
if ( status == 1 ) continue; | ||
|
||
// Collect B-hadrons, to be used in b tagging | ||
if ( isBHadron(&p) ) bHadronIdxs.insert(i); | ||
if ( isBHadron(&p) ) bHadronIdxs.insert(-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.
It can be a matter of convention, but how about store the index as is bHadronIdxs.insert(i);
here and set_user_index(-index-1)
?
- subtracting by another 1 to make the user index to be negative-definite to be 100% safe from overlapping.
Hi John, the user_index and the index stored in bHadronIdxs need to be both negative, otherwise bHadronIdxs.find(index) is successful for non-bHadron indices as well. Cheers, |
@intrepid42, I agree. its clear. and correct for the 2nd item as well. |
Pull request #15079 was updated. @cmsbuild, @davidlange6 can you please check and sign again. |
Plot of deltaR(jet, jet consituent) illustrating the bug. We should expect a steep drop-off around the jet radius (0.4), which clearly does not happen for b jets. The slightly larger tail in non-b vs reco is due to the rapidity-clustering catching a few more low-momentum particles that are not present in reco. |
Addendum: Buggy code seems to generate a mistagged jet in ~40% of the events. |
please test |
The tests are being triggered in jenkins. |
Our analysis group just realised this was never merged. @intrepid42 would you be prepared to create new PRs? |
@cmsbuild please test |
The tests are being triggered in jenkins. |
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @smuzaffar |
@intrepid42 |
@monttj I am not sure... @kreczko @msavitskyi Did one of you create pull requests for 80X and 81X? |
Not me. |
Ok, #16190 actually fixes another bug, not this one... I will create new PRs then. |
Bugfix for PseudoTopProducer adding random particles to b jet constituents, using negative indices for B hadrons now