Skip to content

Intergration of TOoLLiP_v3.#51057

Draft
Brainz22 wants to merge 2 commits into
cms-sw:masterfrom
Brainz22:toolip_v3_pr
Draft

Intergration of TOoLLiP_v3.#51057
Brainz22 wants to merge 2 commits into
cms-sw:masterfrom
Brainz22:toolip_v3_pr

Conversation

@Brainz22
Copy link
Copy Markdown

@Brainz22 Brainz22 commented May 27, 2026

PR description:

  • This PR integrates TOoLLiP_v3 into CMSSW, which involves the newest development of the Level-1 long-lived-particle jet trigger. The official TOoLLiP development repository is found here.

    • The submodule with all relevant files is found under TOoLLiP/TOoLLiP_v3 and linked here, e.g. ROC curves, HLS firmware TOoLLiP_v3 folder, Python to HLS conversion scripts, and layer tracing, and model plots.
  • The PR to pass in the correct TOoLLiP version on cms-sw/cmsdist can be found here

PR validation:

  • This PR has been validated through the emulation of the trigger using the fastPuppi ntuple producer. The validation method is as follows:
cmsrel CMSSW_17_0_0_pre1
cd CMSSW_17_0_0_pre1/src
cmsenv
git cms-init 
git branch 
git cms-checkout-topic -u Brainz22:prtestingbranch

git cms-addpkg L1Trigger/Phase2L1ParticleFlow
git cms-addpkg L1Trigger/Configuration
git cms-addpkg DataFormats
git cms-addpkg L1Trigger/TrackTrigger
git cms-addpkg SimTracker/TrackTriggerAssociation
scram b -j8 

#steps for model binary
git clone https://github.com/cms-hls4ml/hls4mlEmulatorExtras.git 
cd hls4mlEmulatorExtras 
git checkout -b v1.1.3 tags/v1.1.3
make install
cd ..

git clone --quiet https://github.com/Xilinx/HLS_arbitrary_Precision_Types.git hls

git clone git@github.com:cms-hls4ml/TOoLLiP.git
cd TOoLLiP
git checkout -b v3.1.0 tags/v3.1.0
make install
export TOOLLIP_PATH=$PWD/TOoLLiP_v3 #need because binary is not in cmsdist yet
cd ..

#add testing
git clone git@github.com:Brainz22/FastPUPPI.git -b 15_1_X_LLPtagging #clones LLPtagging branch
cd FastPUPPI
git checkout 04aa685101d9454eab134d079599178b3099ee89 # checks out and specific commit
cd ..
scram b -j8

#produce nanoAOD file
cmsRun FastPUPPI/NtupleProducer/python/runPerformanceNTuple.py

perfNano.root will appeat at $PWD. This ntuple contains the branch scPuppiL1TTOOLLIPJet_llpTagScore as defined by the lines here.

  • TOoLLiP_v3 emulation checks have been performed on signal and minbias samples, where inputs are taken from cmssw directly and used to test qkeras and HLS models. Their predictions are compared against the emulation predictions. Plot are shown below (original_score axis has distribution of qkeras model predictions):

MinBias

Signal

The qkeras model outputs differ from hls (and thus, cmssw) outputs due to arithmetic precision and quantization mismatches in the shift from qkeras to hls. This conclusion can be inferred from the spread in the hls and qkeras model final layer outputs:

q_dense_1

No backports needed. The workflow works fine for CMSSW_17_0_0_pre1.

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 27, 2026

cms-bot internal usage

@cmsbuild
Copy link
Copy Markdown
Contributor

@cmsbuild
Copy link
Copy Markdown
Contributor

@cmsbuild
Copy link
Copy Markdown
Contributor

Pull request #51057 was updated.

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.

2 participants