eic / EICrecon

EIC Reconstruction - JANA based
https://eic.github.io/EICrecon
GNU Lesser General Public License v3.0
6 stars 29 forks source link

nSharedHits in trajectory not working #1103

Open ShujieL opened 1 year ago

ShujieL commented 1 year ago

Environment: (where does this bug occur, have you tried other environments)

Steps to reproduce: (give a step by step account of how to trigger the bug)

Minjung Kim noticed that in any EICrecon output, the trajectory.nSharedHits is always 0, though the trajectories are obviously duplicated. see below:

 CentralCKFSeededTrajectories.type = 0, 0, 0
 CentralCKFSeededTrajectories.nStates = 15, 15, 15
 CentralCKFSeededTrajectories.nMeasurements = 6, 6, 6
 CentralCKFSeededTrajectories.nOutliers = 0, 0, 0
 CentralCKFSeededTrajectories.nHoles = 1, 1, 1
 CentralCKFSeededTrajectories.chi2 = 5.717027, 5.521172, 5.345023
 CentralCKFSeededTrajectories.ndf = 12, 12, 12
 CentralCKFSeededTrajectories.nSharedHits = 0, 0, 0

Expected Result: (what do you expect when you execute the steps above)

The nshared hits should have the value set in CKFtracking.cc: https://github.com/eic/EICrecon/blob/f8e335686455506ee10e537cb5c5b8b1d15bf677/src/algorithms/tracking/CKFTracking.cc#L238

ShujieL commented 1 year ago

The MultiTrajectoryHelper identify a shared hit by "SharedHitFlag". But CKF algorithm (CombinatorialKalmanFilter.hpp) never set this flag, that's why EICrecon always pick up 0. We can either add a piece of code in MultitrajectoryHelper (ACTS) or CKFtracking (EICrecon) that loops over hits to find shared hits . @wdconinc any thoughts?