key4hep / key4hep/CLDConfig

Jet Clustering & Tagging

Open
#87 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
0
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Jet clustering and tagging should be a default feature in the CLD reconstruction chain.

Jet clustering is available via [adding an argument](https://github.com/key4hep/CLDConfig/blob/main/CLDConfig/HighLevelReco/JetAndVertex.py#L77) and uses the Valencia algorithm via LCFIPlus. We could rethink, if we might not want to update this step to use the Durham algorithm with is widely used, e.g. in FCCAnalyses. The two methods show extreme differences in their jet definition (e.g. the sum of pfos in all jets does not equal the number of all pfos in the event in LCFIPLus while it does in FCCAnalyses).

The following plots shows that using the exact same events (ZH->vvbb, `/eos/experiment/fcc/prod/fcc/ee/test_spring2024/240gev/Hbb/CLD_o2_v05/rec/00016783/000/Hbb_rec_16783_1.root` ) does not lead to the same amount of particles per jet using FCCAnalysis and CLDConfig (labeled as key4hep here).

Image

Image

Using the two different jet definitions also leads to differences in the kinematics:

Image

As jet clustering defines the base on which jet tagging is performed, tagging is sensitive to clustering. The jet tagging in full sim is trained and validated on the LCFIPlus jet clustering definition and does NOT show reasonable results on jet clustering in FCCAnalyses.

The following plot shows the tagging performace on ZH events at 240GeV using the Durham jet clustering algorithm in FCCAnalyses. The performance is significantly worse than if running the inference via CLDConfig and the LCFIPlus jet clustering defintion which performance is explained in [this note](https://repository.cern/records/e537w-n6886).

Image

I suggested that

1) We must understand the jet clustering definition in LCFIPlus and reimplement a similar algorithm in FCCAnalyses for making jet tagging in full sim available via running the inference in FCCAnalyses. This is how most analyzers might want to set up their workflow.

AND/OR

2) Implement the Durham jet clustering algorithm in CLDConfig as an option (I've tried this and chatted with @Zehvogel and @tmadlener. It did not work straight out of the box, I've stopped trying after a day of debugging). Then, once we confirmed that the clustering definition matched the one used in FCCAnalyses (or an other standard we agree on) one would need to retrain the tagger on new samples using the Durham jet clustering algorithm.

**Regarding the jet tagging implementation in CLDConfig**:

The basic functionality is already implemented [in this pull request](https://github.com/key4hep/CLDConfig/pull/75). For this to be properly implemented we need to switch to IOSvc, therefore @Zehvogel is working on a clean pull request [here](https://github.com/key4hep/CLDConfig/pull/78).

I want to highlight that it might be useful to have jet clustering and tagging implemented for N=2,3,4... jets as a default. To achieve this one would need to think about labeling the collections and how to best set up the collections without unnecessary copies of PFOs.

Contributor guide

Open the contributing guide

Research direction

Start with CLDConfig/HighLevelReco/JetAndVertex.py at the linked clustering argument, then review pull requests 75 and 78 for the existing jet-tagging implementation and IOSvc work. Compare the LCFIPlus and FCCAnalyses definitions using the referenced ZH→vvbb event, and clarify the agreed clustering choice, tagging validation, and default collection setup for N=2,3,4... jets.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.