-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Simulation: define PSimHit track Id offset and propagate to MTD hit categories #42506
Conversation
…ion for track Ids exceeding it
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42506/36513
|
A new Pull Request was created by @fabiocos (Fabio Cossutti) for master. It involves the following packages:
@cmsbuild, @civanch, @mdhildreth can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-88909e/34156/summary.html Comparison SummarySummary:
|
+1 offset of track ID is moved to one place without any change of results. |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
hold |
Pull request has been put on hold by @fabiocos |
*/ | ||
unsigned int originalTrackId() const { return (theTrackId > k_tidOffset) ? theTrackId % k_tidOffset : theTrackId; } | ||
|
||
unsigned int offsetTrackId() const { return (theTrackId > k_tidOffset) ? theTrackId / k_tidOffset : theTrackId; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@civanch sorry, but I see that there is a logical mistake here: in case no offset is added, this method should be logically return 0, not the trackid, do you agree? I will fix it, as the method is not used anywhere so far the impact of this is invisible in tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right, I overlook this. If you fix this, then there is a question: may be originalTrackId() is not needed, we may simply move this implementation to the method trackId()
/** 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; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fabiocos since you are fixing anyhow, I think this could become more simply
unsigned int originalTrackId() const { return (theTrackId > k_tidOffset) ? theTrackId % k_tidOffset : theTrackId; } | |
unsigned int originalTrackId() const { return theTrackId % k_tidOffset; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@perrotta yes indeed, I have added this in my branch, and I also extend the dumper to test these methods directly...
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42506/36532
|
Pull request #42506 was updated. @cmsbuild, @civanch, @mdhildreth can you please check and sign again. |
please test |
-1 Failed Tests: RelVals-INPUT RelVals-INPUTThe relvals timed out after 4 hours. Comparison SummarySummary:
|
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-88909e/34207/summary.html Comparison SummarySummary:
|
Changes appear unrelated to this PR, there are a lot of complaints from tensorflow in the log-files. |
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
Looks like #42525 |
+1 |
PR description:
Following the discussion about #42455 at the simulation meeting https://indico.cern.ch/event/1313529/ , this PR implements:
PSimHit
class, and methods to add and retrieve offsets and the original track id;MtdSD
class, keeping the previous logical behaviour unaltered;SimTrackManager
throwing an exception if tracks with a track Id larger than the base offset are proposed for permanent storage.The previous offset of 100000000 is doubled to 200000000 , in order to stay safe also in presence of Heavy Ion samples. A test with 1k events of wf. 24950 shows that track Ids close to 90k are possible in these very populated events. The chosen base offset allows anyway a large number of possible offsets to be stored, before hitting the limit of maximum size of an unsigned integer (UINT_MAX = 4294967295).
@makortel The proposed implementation does not technically modify persistent data members or existing interfaces, and for this reason no change of class version for schema evolution is added. The track Id member meaning is potentially enlarged now, but in a way that should be backward compatible (although no mechanism prevents in principle track ids larger than the base offset for the past, they are not expected for the reasons mentioned above).
PR validation:
Code runs, and provides the expected track ids in BTL hits, as shown by the dump of the test class
SimHitCaloHitDumper
updated in this PR. e.g.