cmssw icon indicating copy to clipboard operation
cmssw copied to clipboard

Weird-looking distribution of `Muon::isolationR03().emEt` vs muon ϕ in Phase 2 samples

Open mmusich opened this issue 1 year ago • 23 comments

While studying the Phase2 TkAl ALCARECO events produced in the Phase2Fall22DRMiniAOD campaign, a peculiar feature was noticed in the ϕ distribution of the tracks from Z → µµ decays selected from alignment (see here for more details). Upon dedicated check at the level of ALCARECO sample, it was observed that the feature was already present in the tracks persisted in the input sample, but also in the muon tracks from W → μν decays. Checking on the input muons, the reason of the ϕ-dependent inefficiency was spotted in an abnormal distribution of the muon electromagnetic relative isolation distribution Muon::isolationR03().emEt as a function of the muon azimuth. This quantity is used together with the tracker and hadronic relative isolation to select the muons entering the alignment samples.

https://github.com/cms-sw/cmssw/blob/f2ffd7b3c9b926a2db457de7749d4fca2183ba53/Alignment/CommonAlignmentProducer/python/TkAlMuonSelectors_cfi.py#L16

For reference it is how the isolationR03().emEt looks like in a NO PU SingleMuon gun [*] (hence I would naively expect it to be close to zero):

Screenshot from 2024-02-03 18-56-30

And here the full relative combined isolation vs muon 𝜂-ϕ.

Screenshot from 2024-02-03 18-56-54

[*]

 /RelValSingleMuFlatPt2To100/CMSSW_14_0_0_pre2-133X_mcRun4_realistic_v1_STD_2026D98_noPU_RV229-v1/GEN-SIM-RECO 

mmusich avatar Feb 03 '24 17:02 mmusich

cms-bot internal usage

cmsbuild avatar Feb 03 '24 17:02 cmsbuild

A new Issue was created by @mmusich Marco Musich.

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

cms-bot commands are listed here

cmsbuild avatar Feb 03 '24 17:02 cmsbuild

type muon

mmusich avatar Feb 03 '24 17:02 mmusich

wouldn't it be more practical to use PF isolation? CaloTower-based isolation in phase-2 isn't supposed to work in the endcaps; and from this issue it seems like the barrel is not healthy either.

slava77 avatar Feb 05 '24 08:02 slava77

wouldn't it be more practical to use PF isolation?

I was told to use tracker isolation instead.

mmusich avatar Feb 05 '24 08:02 mmusich

wouldn't it be more practical to use PF isolation?

I was told to use tracker isolation instead.

track iso should work OK

slava77 avatar Feb 05 '24 08:02 slava77

track iso should work OK

yes, but the point of this issue is that this minefield is left in release for anyone to step into. Something should be changed to avoid returning nonsense.

mmusich avatar Feb 05 '24 08:02 mmusich

assign alca, reconstruction, upgrade

makortel avatar Feb 05 '24 14:02 makortel

@cms-sw/muon-pog-l2

makortel avatar Feb 05 '24 14:02 makortel

New categories assigned: alca,reconstruction,upgrade

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

cmsbuild avatar Feb 05 '24 14:02 cmsbuild

FYI @24LopezR @rbhattacharya04

jfernan2 avatar Feb 09 '24 13:02 jfernan2

Since the issue is with the electromagnetic component of the isolation, it would be nice if Egamma can check whether they see a similar trend in their isolation variable.

rbhattacharya04 avatar Mar 04 '24 11:03 rbhattacharya04

@cms-sw/egamma-pog-l2 FYI

mmusich avatar Mar 04 '24 11:03 mmusich

It looks like electrons and photons don't have this issue. For example, I attach one plot for electrons in barrel. Sample used: /RelValZEE_14/CMSSW_14_0_0_pre3-140X_mcRun4_realistic_v1_STD_2026D98_noPU-v1/MINIAODSIM CMSSW version used: 14_1_X Electron collection used : pat::Electron, slimmedElectrons

ele_barrel

swagata87 avatar Mar 11 '24 11:03 swagata87

I can confirm, from my setup, the weird behaviour of muons that Marco reported; using 14_1_0 and similar relVal sample (Z to mu mu miniaod).

It seems that muon is using calotowers to compute caloIso, as I see here: RecoMuon/MuonIsolation/plugins/CaloExtractor.cc. If that's the case then note that calotower code is not well maintained anymore by anyone. I'm not saying that the issue has to come from calotowers, but its a suspect that you might want to look at. This is also a major difference with egamma, who does not use calotower to compute the EM-iso, they directly use the ECAL recHits.

swagata87 avatar Mar 11 '24 11:03 swagata87

@cms-sw/muon-pog-l2 @cms-sw/egamma-pog-l2 Do you have any update on this issues? Thanks.

srimanob avatar Apr 10 '24 19:04 srimanob

just to clarify, the issue is in muon only, not in egamma. so there is no action item for egamma.

swagata87 avatar Apr 11 '24 11:04 swagata87

Since the issue is with the electromagnetic component of the isolation, it would be nice if Egamma can check whether they see a similar trend in their isolation variable.

@rbhattacharya04 have you seen https://github.com/cms-sw/cmssw/issues/43858#issuecomment-1988267651 ? Do you have any reactions about the suggestion from @swagata87 ?

mmusich avatar Apr 11 '24 12:04 mmusich

Hi everyone,

on the muon side, we are working on a re-implementation of our ECAL-based isolation, ditching the no longer supported calo towers and switching to rec hits, following EGMs approach. It's a taking a bit longer than expected, but @24LopezR is working on it and will update here once a solution is implemented.

JanFSchulte avatar Apr 11 '24 12:04 JanFSchulte

Hi all, So I computed the Ecal and Hcal isolation using RecHits instead of calotowers, and the weird structures seem to disappear. [1] CaloTower Ecal iso, [2] RecHit Ecal iso [3] CaloTower Hcal iso, [4] RecHit Hcal iso

[1] [2] [3] [4]

Ceirtanly, the plots look more natural now. I am currently preparing the PR with this fix.

24LopezR avatar Apr 18 '24 08:04 24LopezR

+1 This issue seems fixed by #44797

mandrenguyen avatar May 16 '24 20:05 mandrenguyen

+Upgrade

srimanob avatar May 16 '24 20:05 srimanob

This issue seems fixed by https://github.com/cms-sw/cmssw/pull/44797

There is still the point at https://github.com/cms-sw/cmssw/pull/44797#issuecomment-2104224952, so I would prefer to keep this open until that's clarified.

mmusich avatar May 16 '24 20:05 mmusich