LDMX-Software / G4DarkBreM

Dark Bremmstrahlung in Geant4 with MadGraph event libraries.
https://ldmx-software.github.io/G4DarkBreM/
Apache License 2.0
0 stars 1 forks source link

Reader help in XsecCache #7

Closed jmmans closed 1 year ago

jmmans commented 1 year ago

Suggest to remind the reader in a comment that key_t is an integer so this is a truncation/cast operation. The code here is technically correct, except that it's a little magical unless you know for sure how things are being done.

https://github.com/tomeichlersmith/G4DarkBreM/blob/c8a9ccf2018f84bd0a8f824f352b8ef2383b0c44/src/G4DarkBreM/ElementXsecCache.cxx#L34

Actually, key_t might be better called hash_t. It's behaving like a unique hash, though a reversible one....

tomeichlersmith commented 1 year ago

Resolved with a9ff46b0ed267a971d690ec7c35e9bb23f358df4