cms-L1TK / cmssw

Fork of CMSSW where improvements to L1 tracking code are developed.
http://cms-sw.github.io/
Apache License 2.0
4 stars 5 forks source link

Ian L1TStub bug fix #160

Closed tomalin closed 2 years ago

tomalin commented 2 years ago

Several functions in class L1TStub were not working due to bugs, namely: ladder(), module(), isTilted() and operator==().

This PR deletes ladder() and module(), since they're not used anywhere. The code for filling these was accidentally deleted one year ago. It used to be at https://github.com/cms-L1TK/cmssw/blob/543b739bbe112a0e545cb45212c8365f249420ab/L1Trigger/TrackFindingTracklet/plugins/L1FPGATrackProducer.cc#L494 . This code was complex & relied on hard-wired geometry constants, so it's cleaner to remove it.

This PR fixes isTilted(), getting the info from TrackerTopology in the L1FPGATrackProducer.cc . The PR also fixes operator==(), now checking if two stubs are in the same module by using the detId (filled in L1FPGATrackProducer.cc) instead of checking that their module & ladder are identical.

The KF does use isTilted() so is affected by this. But the tracking efficiency only changes by 0.1%, so it's not significant.

N.B. @aryd SLHCEvent::SLHCEvent(istream) hard-wires the detId & tiltedBarrel variables at https://github.com/cms-L1TK/cmssw/blob/ianL1TStub/L1Trigger/TrackFindingTracklet/src/SLHCEvent.cc#L98 . These hard-wired values are incorrect, so the input .txt file used to stand-alone operation should be fixed so they can be read from there.

sarafiorendi commented 2 years ago

after the latest commit I get the expected distribution of tilted modules: 2d_r_z_tilted

sarafiorendi commented 2 years ago

for completeness, here the modules where isTilted == False 2d_r_z_flat