-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
The MTD simulation truth is heavily relying on hit type classification, according to the history of tracks originating it. The type assignment happens within the MtdSD::getTrackID method. While studying the ETL behaviour, a misbehaviour of the classification has been found back-scattering hits (thanks to X. Liu and X. Huang), and it has been traced back to an update of the code introduced in #47186 , where the position of the call to this method within TimingSD::getStepInfo has been modified.
For ETL back-scattering, the information about the hit type is computed in the MtdSD::setHitClassID method, that should be called before the track ID management. This update broke that logic. Moving this method before the call to getTrackID can solve the issue.
Nevertheless there is another possible problem, whose consequences are at present unclear: the TrackInformation content, used in the hit type assignment, is updated in case of a new track at https://github.com/cms-sw/cmssw/blob/master/SimG4CMS/Forward/src/TimingSD.cc#L159 . Moving the call of a method relying on this information before it is likely to cause issues, since some TrackInformation content is not yet defined while being used.