Skip to content
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

CaloTower hash off by one? #209

Open
nsmith- opened this issue Mar 23, 2016 · 3 comments
Open

CaloTower hash off by one? #209

nsmith- opened this issue Mar 23, 2016 · 3 comments
Assignees

Comments

@nsmith-
Copy link

nsmith- commented Mar 23, 2016

In checking data/emulator comparisons for Layer1, I noticed that the requested indexing hash CaloTools::caloTowerHash() seems to skip an entry at 4032.
It also seems to include ieta +/- 29 between 4896 and 5041.
Is this expected?

Calo hash ieta -41 iphi 1 = 4033
... (sequential)
Calo hash ieta -30 iphi 72 = 4896
Calo hash ieta -28 iphi 1 = 0
... (sequential)
Calo hash ieta 28 iphi 72 = 4031
Calo hash ieta 30 iphi 1 = 5041
... (sequential)
Calo hash ieta 41 iphi 72 = 5904

This means that caloTowerHash(41, 72) == caloTowerHashMax()

@nsmith-
Copy link
Author

nsmith- commented Mar 23, 2016

Also, is this the preferred sort condition for l1t::CaloTowerBxCollection ?

@nsmith-
Copy link
Author

nsmith- commented Mar 23, 2016

Also, BXVector::resize(bx, n) actually resizes to n+1 elements.

For now I will use the underlying std::vector::reserve function to preallocate

@jimbrooke
Copy link
Member

Just to confirm - the intention is to set the calo tower at (ieta, iphi) to be at vector index caloTowerHash(ieta, iphi). Example in the dummy producer here
https://github.com/cms-l1t-offline/cmssw/blob/l1t-integration-CMSSW_8_0_2/L1Trigger/L1TCalorimeter/plugins/L1TStage2Layer1Producer.cc#L208

I see the unpacker in l1t-integration-802 does not behave like this. Looks like this is due to a fix being forgotten in the old days before we submitted PRs to l1t-integration. I'll make a new PR correcting this.

quinnanm pushed a commit to quinnanm/cmssw that referenced this issue Jan 26, 2024
* Initial commit of TQ emulation + kfout updates

* Code checks

* Claire's Comments

* Update BuildFile.xml

Include hls types in build file

* Create clf_GBDT_emulation_newKF_digitized.json

* Ian's comments 1 from PR cms-l1t-offline#209

Update to comments in KFout producer and update to variable names as per CMS naming conventions

* Fix Partial Track functions

* fix code formatting

---------

Co-authored-by: Christopher <[email protected]>
Co-authored-by: Christopher Brown <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants