Skip to content

Conversation

@mhemmer-cern
Copy link
Collaborator

@mhemmer-cern mhemmer-cern commented Apr 17, 2025

  • Add emcal-cell-track-matcher task emcalCellTrackMatcher.cxx
    In this task we loop over all BCs since cells are mapped to BCs. Then we check that there is only a single collision associated to that BC since we need tracks which are only mapped to collisions not to BCs.
    From the BC we get the all the EMCal cells and from the collision all the tracks. We store the IDs and eta and phi values to vectors and perform the matching with a KDTree.

  • First simple options include trackMinPt, trackDCAzSigma and trackDCAxySigma. The first is to reduce the computing time since low pT tracks will never reach EMCal. The last two cuts are sigma based DCA cuts to select primary tracks.

  • Add new table SortedTracks with four column: BCID, TrackID, trackEtaOnEMCal, trackPhiOnEMCal

  • Add emcal-track-sorting-task which sorts selected tracks on the BCID instead of the collisionID, removing the need for the collision table in later EMCal tasks.

  • Add processSorted to emcal-cell-track-matcher-task which utilizes the new sorted track table. This allows to just loop over the new sorted track table and the cell table simultaneously without the need to loop over BCs or Collisions.

  • Open:

    • Do we want sigma or cm based DCA cuts?
    • Configurable to check if we want to select primary cuts
    • Further QA histograms
    • Investigate different results between processSorted and processFull from emcal-cell-track-matcher-task

Copy link
Collaborator

@fjonasALICE fjonasALICE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Marvin, you find here my first sets of comments. One other general question I had, can you explain why you opt to not construct a kdtree for faster lookup like we do for normal track matching?

if (trackMinPt > 0 && track.pt() < trackMinPt) {
continue;
}
if ((track.dcaZ() / std::sqrt(track.cZZ()) > trackDCAzSigma) || (track.dcaXY() / std::sqrt(track.cYY()) > trackDCAxySigma)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this used? I think we do not apply this for normal track matching

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In AliPhysics for the Cell Track Matcher we had the option to only match "primary" tracks.
This was done by cutting on DCA_xy of 5 cm.
I was unsure how we want to do this, so I just implemented a version where one can cut on the DCA_z and DCA_xy but with the sigma instead of the values to account for the tracking precision.
This is just the way I have done it now and it is open for discussion how we want to have this done.

@mhemmer-cern
Copy link
Collaborator Author

Hey Marvin, you find here my first sets of comments. One other general question I had, can you explain why you opt to not construct a kdtree for faster lookup like we do for normal track matching?

Hey @fjonasALICE
The reason I am not using the kdtree is because for the cell track matching we want for a track a single matched cell. So I thought the best way to do this, is to simply check which cell there is at the eta, phi of the EMCal for each track. This is also how we have done it in Run 2 which I used as a reference.
If you think this would be also possible with a kdtree and could result in a speed up, we can also try this.

@github-actions
Copy link

github-actions bot commented Apr 28, 2025

O2 linter results: ❌ 21 errors, ⚠️ 0 warnings, 🔕 0 disabled

@mhemmer-cern
Copy link
Collaborator Author

Updated the task.
Main new feature:
Using KDTree now and the usage of alignment objects if available.

return std::make_tuple(matchIndexTrack, matchIndexCluster);
}

/**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably go in JetMatchingUtilities.h

Copy link
Collaborator Author

@mhemmer-cern mhemmer-cern May 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @nzardosh ,

Should the old matching code also migrate to JetMatchingUtilities.h as well?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe its even better to make an EMCALMatchingUtilities.h or something like that? Since these are not jets. Unless you plan to use some of the features in the JetMatchingUtilities

- Add `emcal-cell-track-matcher` task `emcalCellTrackMatcher.cxx`
In this task we loop over all BCs since cells are mapped to BCs. Then we check that there is only a single collision associated to that BC since we need tracks which are only mapped to collisions not to BCs. Then we fill a map to get from geometrical cell ID to the table cell ID. After that one loops over all tracks in the current collision and tries to get the geometrical cell ID from the eta, phi values of the track on the EMCal surface. Followed up by a check if that cell has a hit in the current collision/BC. If there is a hit, we save the trackID mapped to the cellID. In the end a single cell can have multiple trackID mapped to it.

- First simple options include `trackMinPt`, `trackDCAzSigma` and `trackDCAxySigma`. The first is to reduce the computing time since low pT tracks will never reach EMCal. The last two cuts are sigma based DCA cuts to select primary tracks.

- Add new table `SortedTracks` with four column: BCID, TrackID, trackEtaOnEMCal, trackPhiOnEMCal

- Add `emcal-track-sorting-task` which sorts selected tracks on the BCID instead of the collisionID, removing the need for the collision table in later EMCal tasks.

- Add `processSorted` to `emcal-cell-track-matcher-task` which utilizes the new sorted track table

- Open:
  - Do we want sigma or cm based DCA cuts?
  - Configurable to check if we want to select primary cuts
  - Further QA histograms
@github-actions
Copy link

This PR has not been updated in the last 30 days. Is it still needed? Unless further action is taken, it will be closed in 5 days.

@github-actions github-actions bot added the stale label Aug 29, 2025
@github-actions github-actions bot closed this Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants