-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Modification of existing rawprime version of SiStripApproxCluster #49015
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
Conversation
|
cms-bot internal usage |
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49015/46203
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
|
This PR is created to include a flag so that default rawprime can be used in parallel to the changes which are introducedì in the DP note CMS-DP-2025-031 ;. This PR follows the exact algorithm of the DP note. Since another PR is created with modification and it already failed, it would be better to proceed with this PR to proceed quickly. |
|
@saswatinandan this PR is not testable. |
|
A new Pull Request was created by @saswatinandan for master. It involves the following packages:
@cmsbuild, @jfernan2, @mandrenguyen can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
|
@saswatinandan this PR lacks of a suitable title as well as a suitable description, please provide one. |
|
test parameters:
|
|
@cmsbuild, please test |
Let me clarify a bit. I worked on #49013 to add the possibility to run using the two versions of raw prime in the same CMSSW release (which was not possible in the original version provided by @saswatinandan ). Meanwhile @saswatinandan implemented this alternative version, which allows you to run on the two versions of rawPrime. The main difference between the two PRs are:
I also implemented some other changes, mainly trying to simplify the code and improve the readability. I made also some other changes with a very small impact on the performance. You can easily see all the differences by looking at this commit. Clearly, there are Pros and Cons for both the implementations. |
|
@cmsbuild, please test |
|
+1 Size: This PR adds an extra 16KB to repository Comparison SummarySummary:
|
|
unhold |
|
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. @sextonkennedy, @ftenchini, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2) |
|
+1 |
|
Just to follow up: It seemed that we were being asked to choose between this PR and #49013. Since the physics was said to be identical I simply went with the PR that was fully signed. If there should be more discussion between the implementation in this PR and #49013 let's still have it, and follow up in a subsequent PR, if needed. I was simply trying to make sure we had something in for 15_1_0 which will be built very shortly. |
|
I believe the code in other PR 49013 is cleaner than this one and provides a slight improvement in the calculation of the barycenter position. One important point to note is that if both versions are used in the same code like the other PR 49013, the boolean variables |
maybe I am missing something, but now since the two data-formats are completely decoupled we could just have different versions of the backward compatibility tests (tagging also @cms-sw/core-l2 ) or the conversion code. |
Apologies for jumping the gun then. Feel free to make a new PR or re-open the closed one (and deal with the conflicts I guess). |
Yes, I agree. Let's keep #49015 merged and let's try to have the backport in
Note that the conversion code (SiStripApproximateCluster_v1 --> SiStripCluster) is already in place here, SiStripApprox2Clusters.cc The only scope of SiStripApproximateCluster(_v1) is to be converted back to SiStripCluster. Once that is working, all the downstream code will work. |
yes, I meant two instances of the same class configured with different flags that we can use e.g. in DQM to run the conversion from the two different streams (this is not yet available, but it's straightforward to implement) |
makortel
left a comment
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.
Sorry to jump in post merge.
| #include "assert.h" | ||
|
|
||
| class SiStripCluster; | ||
| class SiStripApproximateCluster_v1 { |
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'm a little bit confused by the use of namespace in v1::SiStripApproximateClusterCollection and postfix in SiStripApproximateCluster_v1. I think a namespace for both would have been clearer.
| float _barycenter; | ||
| cms_uint16_t compBarycenter = (compBarycenter_ & 0x7FFF); | ||
| if (previous_barycenter == -999) | ||
| _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.
Leading underscore in variable names should be avoided (2.14 in https://cms-sw.github.io/cms_coding_rules.html#2--naming-rules-1)
| <class name="SiStripApproximateCluster_v1" ClassVersion="7"> | ||
| <version ClassVersion="7" checksum="1154754493"/> | ||
| <version ClassVersion="6" checksum="132211472"/> | ||
| <version ClassVersion="5" checksum="3495825183"/> | ||
| <version ClassVersion="4" checksum="2854791577"/> | ||
| <version ClassVersion="3" checksum="2041370183"/> |
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.
For new data format types there should be only one class version. The indentation would also be nice to be consistent
<class name="SiStripApproximateCluster_v1" ClassVersion="3">
<version ClassVersion="3" checksum="1154754493"/>| <class name="v1::SiStripApproximateClusterCollection" ClassVersion="4"> | ||
| <version ClassVersion="4" checksum="2896589077"/> | ||
| <version ClassVersion="3" checksum="3101417750"/> |
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.
Ditto
<class name="v1::SiStripApproximateClusterCollection" ClassVersion="3">
<version ClassVersion="3" checksum="2896589077"/>| clusterToken_ = consumes(conf.getParameter<edm::InputTag>("inputApproxClusters")); | ||
| clusterToken_v1_ = consumes(conf.getParameter<edm::InputTag>("inputApproxClusters")); | ||
| tkGeomToken_ = esConsumes(); | ||
| v1 = conf.getParameter<bool>("v1"); |
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.
Since v1 dictates which of the two data products is accessed in the produce(), it would be better to do the same for consumes()
if (v1) {
clusterToken_v1_ = consumes(conf.getParameter<edm::InputTag>("inputApproxClusters"));
} else {
clusterToken_ = consumes(conf.getParameter<edm::InputTag>("inputApproxClusters"));
}Then e.g. the clusterToken_v1_.isUninitialized() could be used in produce() and v1 member would not be needed.
|
type ngt |
|
Let me add some more general comments, as I just stumbled upon this PR by chance. IMHO this is the kind of (technical) changes that should be discussed in a Reconstruction meeting, if we actually had them, before @cms-sw/reconstruction-l2 would sign for them. Does this PR set a new precedent and policy for data formats ? I do not see any other file with In the current version of the code,
Those should be reserved to data members, please fix them by removing the trailing The static analyser does not seem to like the code. That's how I stumbled upon this file, I saw this warning while looking at some unrelated changes: Finally, I'm just confused, if this is the new version of the code, why is this |
This PR is created to implement the changes described in the DP note CMS-DP-2025-031. The changes are as described in the DP note exactly, except following things
filter_,isSaturated_, andpeakFilter_have been dropped for the collection SiStripApproxCluster_v1 and encoded to thecompBarycenter_andcompavgCharge_. It reduces the size of strip collection by 5%.v1is added to the code so that default and the new version can be run. To run v1 online, this line should be added to the hlt configuration fileprocess.hltSiStripClusters2ApproxClusters = cms.EDProducer("SiStripClusters2ApproxClusters_v1"....instead ofprocess.hltSiStripClusters2ApproxClusters = cms.EDProducer("SiStripClusters2ApproxClusters".....process.HLTSiStripClusterChargeCutTight = cms.PSet( value = cms.double( 1945.0 ) ) process.HLTSiStripClusterChargeCutNone = cms.PSet( value = cms.double( -1.0 ) ) process.hltSiStripClusterizerForRawPrime.Clusterizer.clusterChargeCut.refToPSet_='HLTSiStripClusterChargeCutTight' process.ClusterShapeHitFilterESProducer.clusterChargeCut.refToPSet_='HLTSiStripClusterChargeCutTight'. This reduces the cluster size by 3.3%.With all these changes, the strip cluster collection size is reduced by ~21%.