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

PF ground truth definition #5

Closed
jpata opened this issue Oct 9, 2019 · 4 comments
Closed

PF ground truth definition #5

jpata opened this issue Oct 9, 2019 · 4 comments

Comments

@jpata
Copy link
Owner

jpata commented Oct 9, 2019

Currently, we define the ground truth based on the existing PFAlgo, i.e. the whole PF does a translation of the set of PF elements to the set of PF candidates on an event by event basis.

Ultimately, the ground truth should be defined through generator particles suitably matched to PF elements. Need to understand where HGCAL is with this.

@jpata
Copy link
Owner Author

jpata commented Jan 29, 2020

Some slides from HGCAL here: https://indico.cern.ch/event/882488/

@jpata
Copy link
Owner Author

jpata commented Feb 25, 2020

We've made some progress on a gen-level ground truth defintion, based on the advice received in the HN thread here. We can now find the gen-level correspondent to >90% of the pions and >50% of the neutrals (pid=130). Here is a short summary.

The preliminary efficiency of matching genparticles to PFCandidates is shown on the following image:
candidate_matching_efficiency.pdf

We use the TrackingTruthAccumulator digitization module, which produces TrackingParticles that can be matched to reco tracks, which in turn have associations to PFCandidates.

A similar logic can be applied using the CaloTruthAccumulator, producing CaloParticles, which can be matched to PFClusters using detector ids (DetId). For some reason, clusters in HF cannot be matched according to DetId to any CaloParticle, will need to talk to calo-software experts, but likely this can be mitigated (PF is in any case currently trivial in HF).

A few changes to the CaloTruthAccumulator to account for non-HGCAL / non-phase2 setups were necessary, they are collected here https://github.com/jpata/cmssw/tree/jpata_pfntuplizer.

Generator-level stable particles with PU included are represented as TrackingParticles or CaloParticles. Each TrackingParticle can be associated to at most one reco track, which can be associated to a PFCandidate. Each CaloParticle is matched to up to one calorimeter PFCluster, while many CaloParticles can be matched to one PFCluster. Each PFCluster can be associated to one PFCandidate, with several clusters per candidate being possible.

The performance of reconstruction can be assessed by looking at the gen-to-reco spread of the matched triplets of (TrackingParticle - recoTrack - PFCandidate) and (CaloParticle - PFCluster - PFCandidate), noting that in the CaloParticle case, a disambiguation heuristic is needed to choose the "best" CaloParticle in a Cluster and the "best" cluster in the PFCandidate in case there are several.

gen to reco: genparticle_to_reco_scatter.pdf
gen to PFCandidate: genparticle_to_candidate_scatter.pdf

@jpata
Copy link
Owner Author

jpata commented Mar 5, 2020

Latest update in https://indico.cern.ch/event/895228/contributions/3776739/attachments/1998928/3335497/2020_03_04.pdf. Generally, seems to work! Now need to make sure we can use those ntuples for GNN training.

@jpata
Copy link
Owner Author

jpata commented Apr 16, 2020

This is working now.

@jpata jpata closed this as completed Apr 16, 2020
jpata added a commit that referenced this issue Aug 31, 2022
dcsouthwick pushed a commit to dcsouthwick/particleflow that referenced this issue Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant