Closed mariadalfonso closed 3 years ago
hi @mariadalfonso , all, I have implemented the matching to GenDressedLeptons in the matching. The approach recovers a similar level to efficiency to the other approaches I showed during the meeting. In particular, I have checked that the procedure agrees with the matching to status=1 OR isLastCopyBeforeFSR to a level below 0.1%.
However, this is a bit more tricky than what I initially thought and I had to make several decisions to implement this. Let me know if this is fine:
Also, I have validated that this approach does not affect significantly the fake rate. I'm plotting below the number of electrons matched to prompt electrons or taus in a DY->LL sample, showing that the number of matched electrons above 2 does not increase very significantly.
plot_withlog.pdf plot_nolog.pdf
You can find the implementation of this in sscruz:from-CMSSW_10_2_22_electronMatching, it is based (as nanoAOD v7) in CMSSW_10_2_22. I could rebase it to the master branch. Could you let me know on which cmssw release is cms-nanoAOD:master based?
How is the genPartIdx filled in cases where a GenDressedLepton is matched? (It should be possible to determine the constituent electron from the GenDressedLepton somehow)
Right now, I'm keeping the same index as it is right now. Ie, in cases in which the electron is matched to a GenDressedLepton but not to a status==1 GenParticle, genPartIdx is equal to-1... I guess it should be possible to match that to a GenParticle. Do you know of an existing implementation of that? I really wouldn't like to reinvent the wheel there :)
@sscruz @bendavid @peruzzim was there any decision on how to extend the electron matching ?
The genparticle(s) should be easily accessible from the relevant accessors. I'm not aware of any ready-made solution.
It's PROBABLY the first constituent, but can explicitly select e.g. the highest pt constituent with abs(pdgid) 11
hi @mariadalfonso , @bendavid , thanks a lot for the pointer. I have implemented that logic (picking the highest pt constituent with abs(pdgid) == 11) in sscruz:from-CMSSW_10_2_22_electronMatching. The only caveat is that I don't know of a way to link the constituents to the finalGenParticles, so i did a deltaR && deltaPt matching, which is quite dirty but works. If you have suggestions here I'm happy to implement it. If not, I can rebase and make a PR. Cheers
Hi, you mean the highest pt constitution with abs(pdgid) == 11 I guess rather than pt>11 ? :)
hi, yes, of course, sorry, too much coding today :) i've edited it
You can get the index of the genParticle in the collection used to build the dressed leptons with getJetConstituents()[i].key(), but I'm not sure how easy it is to then match this up with the index in the finalGenParticles
yeah, the problem is that I couldn't find a way to do the latter. I'm also not sure a reference from the finalGenParticles to the initial collection that is used to build the constituents is kept. Anyway, the matching with dR,dPt/pt seems to be good enough. @mariadalfonso should i go ahead and make a PR?
@mariadalfonso should i go ahead and make a PR?
yes, go ahead with a PR in master, so that we can review the coding details
closing this since has been handled
See report from Sergio https://indico.cern.ch/event/962278/contributions/4060711/attachments/2136665/3599026/electron_matching_nano_nov4.pdf
to do: extend the GenDressedLeptons at lower pt