Skip to content
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

Noisy ElectronSeedProducer in 2024 and Phase-2 worfklows #45658

Open
mmusich opened this issue Aug 7, 2024 · 18 comments
Open

Noisy ElectronSeedProducer in 2024 and Phase-2 worfklows #45658

mmusich opened this issue Aug 7, 2024 · 18 comments

Comments

@mmusich
Copy link
Contributor

mmusich commented Aug 7, 2024

While investigating something else I stumbled upon the fact that ElectronSeedProducer is noisy in several 2024 (but also Phase2) workflows, see e.g.:

The warnings are of the type:

%MSG-w ElectronSeedGenerator:  ElectronSeedProducer:ecalDrivenElectronSeeds  06-Aug-2024 09:03:39 CEST Run: 1 Event: 303
this similar old seed already has another dRz2Pos
old seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: 3/0.00805616/-0.00121471/inf/inf
new seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: 3/inf/inf/0.00778341/-0.000662431
%MSG
@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 7, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 7, 2024

A new Issue was created by @mmusich.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor

makortel commented Aug 7, 2024

assign RecoEgamma/EgammaElectronProducers

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 7, 2024

New categories assigned: reconstruction

@jfernan2,@mandrenguyen you have been requested to review this Pull request/Issue and eventually sign? Thanks

@makortel
Copy link
Contributor

makortel commented Aug 7, 2024

assign upgrade

@makortel
Copy link
Contributor

makortel commented Aug 7, 2024

FYI @cms-sw/egamma-pog-l2

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 7, 2024

New categories assigned: upgrade

@srimanob,@subirsarkar you have been requested to review this Pull request/Issue and eventually sign? Thanks

@jfernan2
Copy link
Contributor

jfernan2 commented Sep 4, 2024

@sameasy @Prasant1993 as E-gamma reco contacts, could you please have a look? Thanks

@makortel
Copy link
Contributor

Any news?

@RSalvatico
Copy link
Contributor

Shamik and Prasant are not EGM reco conveners anymore. Hopefully @SanghyunKo can have a look?

@jfernan2
Copy link
Contributor

jfernan2 commented Oct 2, 2024

@RSalvatico if those persons are not EGM Reco contacts any longer, I believe we need to update the names in [1], should I add @SanghyunKo ?

[1] https://twiki.cern.ch/twiki/bin/view/CMS/RecoContacts

@RSalvatico
Copy link
Contributor

@jfernan2 I have added to the twiki the names, email addresses, and GitHub usernames of the new EGM Reco conveners

@rovere
Copy link
Contributor

rovere commented Oct 21, 2024

I think this PR caused the triggering of so many messages:
#45488

I tag @VinInn as the expert on this matter (approx_log)

@mmusich
Copy link
Contributor Author

mmusich commented Oct 21, 2024

type egamma

@beaudett
Copy link
Contributor

This PR has an other consequence, which was reported here
(The initial report was issued before the link with the PR has been established)
Namely, the number of electron seeds made with the q<0 or q>0 assumption became different. Here is the plot showing the difference for the q>0 hypothesis. pre6 is in red, pre5 in blue. The plot is normalized, but one can see from the number of entries that we lost many seeds between the two releases.
The equivalent plot with the q<0 hypothesis is here

I assume that the error message issued in the logs corresponds to one seed which is lost.
Fortunately enough, it does not impact the electron efficiency. It might affect the fake rate though but it hasn't been checked.
It has been checked (thanks @archiron and @AdrianoDee ) that if the PR is discarded one gets back the seeds, see here (red is pre6 without the PR, blue is pre5, and we are looking at the q>0 hypothesis)

How the above PR changed the seed reconstruction is so far a mystery to me.

@makortel
Copy link
Contributor

In a way the behavior prior to #45488 was undefined

@beaudett
Copy link
Contributor

beaudett commented Oct 22, 2024

I am not denying that, even though I am not an expert of this code. We will try to have a deeper look at the behavior of this piece of code before and after the change.

@makortel
Copy link
Contributor

So the printout

%MSG-w ElectronSeedGenerator:  ElectronSeedProducer:ecalDrivenElectronSeeds  06-Aug-2024 09:03:39 CEST Run: 1 Event: 303
this similar old seed already has another dRz2Pos
old seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: 3/0.00805616/-0.00121471/inf/inf
new seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: 3/inf/inf/0.00778341/-0.000662431
%MSG

comes from

if (res.dRZPos(1) != std::numeric_limits<float>::max()) {
if (res.dRZPos(1) != seed.dRZPos(1)) {
edm::LogWarning("ElectronSeedGenerator|BadValue")
<< "this similar old seed already has another dRz2Pos"
<< "\nold seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: " << (unsigned int)res.hitsMask() << "/"
<< res.dRZNeg(1) << "/" << res.dPhiNeg(1) << "/" << res.dRZPos(1) << "/" << res.dPhiPos(1)
<< "\nnew seed mask/dRz2/dPhi2/dRz2Pos/dPhi2Pos: " << (unsigned int)seed.hitsMask() << "/"
<< seed.dRZNeg(1) << "/" << seed.dPhiNeg(1) << "/" << seed.dRZPos(1) << "/" << seed.dPhiPos(1);
}
}

According to the printout res.dRZPos(1) and res.dPhiPos(1) are inf. Earlier the comparison on line 73 was against std::numeric_limits<float>::infinity(), and a different branch was taken.

I'd guess some computations result in infinities. Maybe these comparisons that were earlier against infinity() and are now against max() would need to be accompanied with edm::isFinite() check.

(makes me also wonder how safe use of the fast-math is here...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants