-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
update on strip approximate cluster #47367
base: master
Are you sure you want to change the base?
Conversation
cms-bot internal usage |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47367/43720 ERROR: Unable to merge PR. See log https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47367/43720/cms-checkout-topic.log |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47367/43722
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47367/43723
|
Pull request #47367 was updated. |
from Configuration.ProcessModifiers.approxSiStripClusters_cff import approxSiStripClusters | ||
from Configuration.ProcessModifiers.trackingNoLoopers_cff import trackingNoLoopers | ||
|
||
Run3_pp_on_PbPb_approxSiStripClusters_2024 = cms.ModifierChain(Run3_2024.copyAndExclude([trackingNoLoopers]), approxSiStripClusters) |
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.
Run3_pp_on_PbPb_approxSiStripClusters_2024 = cms.ModifierChain(Run3_2024.copyAndExclude([trackingNoLoopers]), approxSiStripClusters) | |
Run3_2024_approxSiStripClusters = cms.ModifierChain(Run3_2024.copyAndExclude([trackingNoLoopers]), approxSiStripClusters) |
what does this have to do specifically with pp_on_PbPb
?
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.
nothing have to do with pp_on_PbPb
, I add the suggestion to the PR.
test parameters:
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47367/43754 |
Pull request #47367 was updated. |
@cmsbuild, please test |
@vmuralee this PR is failing with:
see log. See instructions at https://github.com/cms-sw/cmssw/blob/master/DataFormats/SiStripCluster/README.md to see what needs to be done. |
-1 Failed Tests: UnitTests Unit TestsI found 1 errors in the following unit tests: ---> test TestSiStripApproximateClusterCollection had ERRORS Comparison SummarySummary:
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47367/43763
|
Pull request #47367 was updated. |
@@ -77,7 +77,7 @@ namespace edmtest { | |||
unsigned int j = 0; | |||
for (const auto& cluster : detClusters) { | |||
unsigned int iOffset = j + iEvent.id().event(); | |||
if (cluster.barycenter() != expectedIntegralValues_[1] + iOffset) { | |||
if (std::round(cluster.barycenter() * 65535.0 / 770.0) != expectedIntegralValues_[1] + iOffset) { |
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.
I don't think this is the way this is intended to be fixed, but rather it should be the input file to be changed according to the the instructions @cms-sw/core-l2 FYI
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.
Right, this test should ensure that both old data and new data are read out correctly. The code here should really compare the return value of cluster.barycenter()
to the expected value (that perhaps now should be changed to float
?).
The change of meaning of the barycenter_
to compBarycenter_
should be dealt with an IO read rule in the classes_def.xml
.
cms_uint8_t width_ = 0; | ||
cms_uint8_t avgCharge_ = 0; | ||
bool filter_ = false; | ||
bool isSaturated_ = false; | ||
bool peakFilter_ = false; | ||
static constexpr double maxRange_ = 65535.; //16 bit | ||
static constexpr double maxBarycenter_ = 770.; |
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.
why 770 and not 768?
@@ -26,20 +27,26 @@ class SiStripApproximateCluster { | |||
float hitPredPos, | |||
bool peakFilter); | |||
|
|||
cms_uint16_t barycenter() const { return barycenter_; } | |||
float barycenter() const { | |||
float _barycenter = compBarycenter_ * maxBarycenter_ / maxRange_; |
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.
Please avoid underscore as the first character (2.14 in https://cms-sw.github.io/cms_coding_rules.html#2--naming-rules-1)
barycenter_ = std::round(cluster.barycenter() * 10); | ||
compBarycenter_ = std::round(cluster.barycenter() * maxRange_ / maxBarycenter_); | ||
assert(cluster.barycenter() <= maxBarycenter_ && "Got a barycenter > maxBarycenter"); | ||
assert(compBarycenter_ <= maxRange_ && "Filling compBarycenter > maxRange"); |
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.
Isn't this condition always true? (maximum possible value of compBaryCenter_
being 2**16-1 = 65535
and maxRange_
being set to 65535.
)
PR description:
Correction for Average charge in Approximated cluster
The average charge defined as Int avgCharge = cluster.charge()/cluster.size() which doesn't return to nearest integer value in c++. The affect is shown in average charge difference between RAW and RAW' dataset.
The bug fixes as Int avgCharge - (cluster.charge()+cluster.size()/2)/cluster.size()
Details can found here slide 4
Compression of barycenter
Instead of storing barycenter to 16 bit Int , choose the float variable and compress the variable using std::round(cluster.barycenter() * bit_range / maxBarycenter)
bit_range is the range of each bit value, e.g. bit range for 16 bit is 2^16 - 1 = 65535.
maxBarycenter is the maximum value of barycenter which found that is 770.0.
Details can found here slide 9
Changing the configuration
Configuration.Eras.Era_Run2024_approxSiStripCluster
is the configuration use for run approximate cluster collection in the RECO step.