Skip to content

L1 tracking update #47067

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

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

L1 tracking update #47067

wants to merge 14 commits into from

Conversation

tschuh
Copy link
Contributor

@tschuh tschuh commented Jan 9, 2025

This PR updates mainly the modules

  • L1Trigger/TrackFindingTracklet
  • L1Trigger/TrackFindingTMTT
  • L1Trigger/TrackTrigger
  • L1Trigger/TrackerDTC
  • L1Trigger/TrackerTFP
  • DataFormats/L1TrackTrigger
  • SimTracker/TrackTriggerAssociation

in order to sync s/w emulation of L1 tracking with current f/w, which means to make the s/w more realistic. Some name changes have also been propagated to additional modules.

some specific added features:

  • KF simulator callable in KF emulator chain
  • KF starts state updating process from 2-layer states instead of 0-layer states
  • 5 parameter fit simulation added to KF emulator as an option
  • DR uses 11 layer scheme
  • DR receives now full 10b stub identifier for all stubs
  • KFout module splitted into track qulaity and final output formatter
  • DRin renamed in TrackMultiplexer, merges now all seed type channel into one
  • L1FPGATrackProducer produces now emulator output in one step rendering module TBout obsolete

This PR is based of CMSSW_14_2_0_pre4 rebased to master on Jan 9.

The code in this PR passed the git CI tests of the L1 track group, seen in the CI results. The git CI tests run the baseline L1 tracking algorithm (both for prompt and displaced tracking) on ttbar events with zero pileup (to save CPU). The CI checks require that compared with reference, the tracking efficiency does not fall significantly, the number of reconstructed tracks does not increase significantly, and that the z0 resolution does not get significantly worse. (The exact cuts can be found here).

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2025

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/43234

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2025

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/43235

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 9, 2025

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/43238

@tschuh
Copy link
Contributor Author

tschuh commented Apr 16, 2025

done for the code I feel responsible for.

@tschuh
Copy link
Contributor Author

tschuh commented Apr 16, 2025

I copy pasted the comment explaining those 2-3 character names from KalmanFilter.h to this place.

@tschuh
Copy link
Contributor Author

tschuh commented Apr 16, 2025

I moved the explaining comment from the top to the middle, hope that helps

@tschuh
Copy link
Contributor Author

tschuh commented Apr 16, 2025

done

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/44540

@cmsbuild
Copy link
Contributor

Pull request #47067 was updated. @BenjaminRS, @Moanwar, @antoniovilela, @civanch, @cmsbuild, @davidlange6, @fabiocos, @kpedro88, @mandrenguyen, @mdhildreth, @quinnanm, @rappoccio, @srimanob, @subirsarkar can you please check and sign again.

@tschuh
Copy link
Contributor Author

tschuh commented Apr 16, 2025

I did go through my code, hope I got them all.

@tschuh
Copy link
Contributor Author

tschuh commented Apr 16, 2025

Also: all dataformats should be in the DataFormats directory, not in the L1Trigger directory: L1Trigger/TrackFindingTracklet/interface/DataFormats.h See here: https://cmsl1tofflinesw.docs.cern.ch/Resources/codingtips/

Those classes do not specify data types of ED products. I doubt that they should go to the DataFormats module.

@tschuh
Copy link
Contributor Author

tschuh commented Apr 16, 2025

@tschuh: have you made changes based on #47067 (comment)?

yes now I have done them, before I had to rebase.

const std::vector<int>& layerEncoding(int binEta, int binZT, int binCot) const {
return layerEncoding_.layerEncoding(binEta, binZT, binCot);
const std::vector<int> layerEncoding(int binEta, int binZT, int binCot) const {
//return layerEncoding_.layerEncoding(binEta, binZT, binCot);
Copy link
Contributor

Choose a reason for hiding this comment

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

cam you get rid of these comments if unneeded

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

const std::map<int, const tt::SensorModule*>& layerEncodingMap(int binEta, int binZT, int binCot) const {
return layerEncoding_.layerEncodingMap(binEta, binZT, binCot);
const std::map<int, const tt::SensorModule*> layerEncodingMap(int binEta, int binZT, int binCot) const {
//return layerEncoding_.layerEncodingMap(binEta, binZT, binCot);
Copy link
Contributor

Choose a reason for hiding this comment

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

cam you get rid of these comments if unneeded

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines 35 to 39
static constexpr int partial_width = 32;
//
static constexpr int partial_in = 3;
//
static constexpr int partial_out = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

please add comments describing where these numbers come from

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -30,4 +28,44 @@ def reducedConfig(process):

# configures pure tracklet algorithm (as opposed to Hybrid algorithm)
def trackletConfig(process):
process.l1tTTTracksFromTrackletEmulation.fitPatternFile = cms.FileInPath('L1Trigger/TrackFindingTracklet/data/fitpattern.txt')
process.l1tTTTracksFromTrackletEmulation.fitPatternFile = cms.FileInPath('L1Trigger/TrackFindingTracklet/data/fitpattern.txt')
Copy link
Contributor

Choose a reason for hiding this comment

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

is this the best place for such txt files or is there a better place to put them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know, @tomalin may comment.

Comment on lines 35 to 71
process.ProducerKF.Hybrid = True
process.ProducerKF.DeadModuleOpts.KillScenario = 0
process.ProducerKF.DeadModuleOpts.KillRecover = False
process.ProducerKF.HTArraySpecRphi.HoughMinPt = 2.
process.ProducerKF.TrackDigi.KF_skipTrackDigi = True
process.ProducerKF.StubDigitize.EnableDigitize = False
process.ProducerKF.GeometricProc.UseApproxB = True
process.ProducerKF.GeometricProc.BApprox_gradient = 0.886454
process.ProducerKF.GeometricProc.BApprox_intercept = 0.504148
process.ProducerKF.PhiSectors.NumPhiSectors = 9
process.ProducerKF.PhiSectors.NumPhiNonants = 9
process.ProducerKF.PhiSectors.ChosenRofPhi = 55.
process.ProducerKF.EtaSectors.EtaRegions = [-2.4, -2.08, -1.68, -1.26, -0.90, -0.62, -0.41, -0.20, 0.0, 0.20, 0.41, 0.62, 0.90, 1.26, 1.68, 2.08, 2.4]
process.ProducerKF.EtaSectors.ChosenRofZ = 50.0
process.ProducerKF.TrackFitSettings.KalmanMinNumStubs = 4
process.ProducerKF.TrackFitSettings.KalmanMaxNumStubs = 6
process.ProducerKF.TrackFitSettings.KalmanMaxSkipLayersHard = 1
process.ProducerKF.TrackFitSettings.KalmanMaxSkipLayersEasy = 2
process.ProducerKF.TrackFitSettings.KalmanMaxStubsEasy = 10
process.ProducerKF.TrackFitSettings.KalmanMaxStubsPerLayer = 4
process.ProducerKF.TrackFitSettings.KalmanMultiScattTerm = 0.00075
process.ProducerKF.TrackFitSettings.KalmanChi2RphiScale = 8
process.ProducerKF.TrackFitSettings.KFUseMaybeLayers = True
process.ProducerKF.TrackFitSettings.KalmanRemove2PScut = True
process.ProducerKF.TrackFitSettings.KFLayerVsPtToler = [999., 999., 0.1, 0.1, 0.05, 0.05, 0.05]
process.ProducerKF.TrackFitSettings.KFLayerVsD0Cut5 = [999., 999., 999., 10., 10., 10., 10.]
process.ProducerKF.TrackFitSettings.KFLayerVsZ0Cut5 = [999., 999., 25.5, 25.5, 25.5, 25.5, 25.5]
process.ProducerKF.TrackFitSettings.KFLayerVsZ0Cut4 = [999., 999., 15., 15., 15., 15., 15.]
process.ProducerKF.TrackFitSettings.KFLayerVsChiSq5 = [999., 999., 10., 30., 80., 120., 160.]
process.ProducerKF.TrackFitSettings.KFLayerVsChiSq4 = [999., 999., 10., 30., 80., 120., 160.]
process.ProducerKF.TrackFitSettings.KalmanAddBeamConstr = False
process.ProducerKF.TrackFitSettings.KalmanHOfw = False
process.ProducerKF.TrackFitSettings.KalmanHOtilted = True
process.ProducerKF.TrackFitSettings.KalmanHOprojZcorr = 1
process.ProducerKF.TrackFitSettings.KalmanHOalpha = 0
process.ProducerKF.TrackFitSettings.KalmanHOhelixExp = True
process.ProducerKF.TrackFitSettings.KalmanDebugLevel = 0
Copy link
Contributor

Choose a reason for hiding this comment

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

please add some comments explaining where these numbers come from

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -42,5 +42,4 @@
# We prefer the global geometry algorithm for now in order not to break
# anything. Override with process.TTStubAlgorithm_PSimHit_ = ...,
# etc. in your configuration.
TTStubAlgorithm_Phase2TrackerDigi_ = cms.ESPrefer("TTStubAlgorithm_official_Phase2TrackerDigi_")

TTStubAlgorithm_Phase2TrackerDigi_ = cms.ESPrefer("TTStubAlgorithm_official_Phase2TrackerDigi_")
Copy link
Contributor

Choose a reason for hiding this comment

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

add empty line at end of file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

return trackerGeometry_->getDetectorType(detId) == TrackerGeometry::ModuleType::Ph2PSP;
SensorModule* sm = sensorModule(detId + 1);
return sm->psModule();
//return trackerGeometry_->getDetectorType(detId) == TrackerGeometry::ModuleType::Ph2PSP;
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a reason to keep this comment? otherwise delete

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines 7 to 21
process.TrackTriggerSetup.UseHybrid = False
process.TrackTriggerSetup.TrackFinding.MinPt = 3.0
process.TrackTriggerSetup.TrackFinding.MaxEta = 2.4
process.TrackTriggerSetup.TrackFinding.ChosenRofPhi = 67.24
process.ProducerDTC = cms.EDProducer('trackerDTC::ProducerDTC', TrackerDTC_params)
return process

def analyzerUseTMTT(process):
from L1Trigger.TrackerDTC.Analyzer_cfi import TrackerDTCAnalyzer_params
from L1Trigger.TrackerDTC.ProducerED_cfi import TrackerDTCProducer_params
TrackerDTCProducer_params.UseHybrid = cms.bool( False )
process.TrackerDTCAnalyzer = cms.EDAnalyzer('trackerDTC::Analyzer', TrackerDTCAnalyzer_params, TrackerDTCProducer_params)
from L1Trigger.TrackerDTC.DTC_cfi import TrackerDTC_params
process.TrackTriggerSetup.UseHybrid = False
process.TrackTriggerSetup.TrackFinding.MinPt = 3.0
process.TrackTriggerSetup.TrackFinding.MaxEta = 2.4
process.TrackTriggerSetup.TrackFinding.ChosenRofPhi = 67.24
process.AnalyzerDTC = cms.EDAnalyzer('trackerDTC::Analyzer', TrackerDTCAnalyzer_params, TrackerDTC_params)
Copy link
Contributor

Choose a reason for hiding this comment

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

could you add some context to these numbers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines 32 to 36
static constexpr int partial_width = 32;
//
static constexpr int partial_in = 3;
//
static constexpr int partial_out = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

could you add context to these numbers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines 6 to 25
process.TrackTriggerSetup.TMTT.WidthR = 11
process.TrackTriggerSetup.TMTT.WidthPhi = 14
process.TrackTriggerSetup.TMTT.WidthZ = 13
process.TrackTriggerSetup.TrackFinding.MinPt = 3.0
process.TrackTriggerSetup.TrackFinding.MaxEta = 2.4
process.TrackTriggerSetup.TrackFinding.ChosenRofPhi = 67.24
process.TrackTriggerSetup.TrackFinding.NumLayers = 8
process.TrackTriggerSetup.GeometricProcessor.ChosenRofZ = 57.76
process.TrackTriggerSetup.HoughTransform.MinLayers = 5
process.TrackTriggerSetup.CleanTrackBuilder.MaxStubs = 4
process.TrackTriggerSetup.KalmanFilter.NumWorker = 4
process.TrackTriggerSetup.KalmanFilter.MaxLayers = 8
process.TrackTriggerSetup.KalmanFilter.MaxSeedingLayer = 3
process.TrackTriggerSetup.KalmanFilter.MaxGaps = 2
process.TrackTriggerSetup.KalmanFilter.ShiftChi20 = 0
process.TrackTriggerSetup.KalmanFilter.ShiftChi21 = 0
process.TrackTriggerSetup.KalmanFilter.CutChi2 = 2.0

def simUseTMTT(process):
process.StubAssociator.MinPt = 3.0
Copy link
Contributor

Choose a reason for hiding this comment

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

please add context to these numbers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47067/44582

@cmsbuild
Copy link
Contributor

Pull request #47067 was updated. @BenjaminRS, @Moanwar, @antoniovilela, @civanch, @cmsbuild, @davidlange6, @fabiocos, @kpedro88, @mandrenguyen, @mdhildreth, @quinnanm, @rappoccio, @srimanob, @subirsarkar can you please check and sign again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.