-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and simplify logic for offset/original tid retrival, add test for…
… new methods in SimHitCaloHitDumper
- Loading branch information
Showing
2 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,9 +110,9 @@ class PSimHit { | |
/** In case te SimTrack ID is incremented by the k_tidOffset for hit category definition, this | ||
* methods returns the original theTrackId value directly. | ||
*/ | ||
unsigned int originalTrackId() const { return (theTrackId > k_tidOffset) ? theTrackId % k_tidOffset : theTrackId; } | ||
unsigned int originalTrackId() const { return theTrackId % k_tidOffset; } | ||
|
||
unsigned int offsetTrackId() const { return (theTrackId > k_tidOffset) ? theTrackId / k_tidOffset : theTrackId; } | ||
unsigned int offsetTrackId() const { return theTrackId / k_tidOffset; } | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
fabiocos
Author
Contributor
|
||
|
||
static unsigned int addTrackIdOffset(unsigned int tId, unsigned int offset) { return offset * k_tidOffset + tId; } | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This won't work in case the original trackId is 0: I don't know if it is a case you want to take into account