Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Run2-hcx192 Changes to DDHCalAngular by removing explicit reference to CLHEP #26271
Run2-hcx192 Changes to DDHCalAngular by removing explicit reference to CLHEP #26271
Changes from 1 commit
b0eb2bf
3c37ae7
28783fe
ca03edf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
otherwise, this is only equivalent to the old implementation for integer values of convertRadToDeg(startAngle)
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 have made some tests with new vs old implementation and then test new==old. You see this test fail in many cases. Theta is 90 degree. pi and twopi match. All iphi's are the same but phideg or phi (phix) do not in many cases.
Theta 1.5708:1.5708:1
Pi 3.14159:3.14159:1 TwoPi 6.28319:6.28319:1
phideg 270:270:1 iphi 270:270 phi 4.71239:4.71239:1
phideg 300:300:1 iphi 300:300 phi 5.23599:5.23599:1
phideg 330:330:0 iphi 330:330 phi 5.75959:5.75959:0
phideg 0:0:1 iphi 0:0 phi 0:0:1
phideg 30:30:0 iphi 30:30 phi 0.523599:0.523599:1
phideg 60:60:0 iphi 60:60 phi 1.0472:1.0472:1
phideg 90:90:1 iphi 90:90 phi 1.5708:1.5708:1
phideg 120:120:0 iphi 120:120 phi 2.0944:2.0944:1
phideg 150:150:0 iphi 150:150 phi 2.61799:2.61799:0
phideg 180:180:0 iphi 180:180 phi 3.14159:3.14159:0
phideg 210:210:0 iphi 210:210 phi 3.66519:3.66519:0
phideg 240:240:0 iphi 240:240 phi 4.18879:4.18879:1
So my conclusion is that these are all rounding effects and once there is random # sequence goes crazy.
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.
@bsunanda: Could you please explain the print-out above with phideg, iphi, etc.? I don't see any differences.
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.
The first # is the new value, the second is the old value and the third is (old == new). I did not put (old==new) for int32 like iphi. But in many cases old==new fails and shows 0 which is due to some rounding issues. This is the culprit for change is random # sequence. This always causes difference for small samples but statistically they balance out
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.
Frankly I am now not worried about this difference
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.
It would be helpful to see (old - new) when they differ to understand the scale of the differences.
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.
The difference is at the level of e-14. Here they are. For each, there are the new value, old value, difference and test of new==old results
Theta 1.5708:1.5708:0:1
Pi 3.14159:3.14159:0:1 TwoPi 6.28319:6.28319:0:1
phideg 270:270:0:1 iphi 270:270:0:1 phi 4.71239:4.71239:0:1
phideg 300:300:0:1 iphi 300:300:0:1 phi 5.23599:5.23599:0:1
phideg 330:330:5.68434e-14:0 iphi 330:330:0:1 phi 5.75959:5.75959:8.88178e-16:0
phideg 0:0:0:1 iphi 0:0:0:1 phi 0:0:0:1
phideg 30:30:-3.55271e-15:0 iphi 30:30:0:1 phi 0.523599:0.523599:0:1
phideg 60:60:-7.10543e-15:0 iphi 60:60:0:1 phi 1.0472:1.0472:0:1
phideg 90:90:0:1 iphi 90:90:0:1 phi 1.5708:1.5708:0:1
phideg 120:120:-1.42109e-14:0 iphi 120:120:0:1 phi 2.0944:2.0944:0:1
phideg 150:150:-2.84217e-14:0 iphi 150:150:0:1 phi 2.61799:2.61799:-4.44089e-16:0
phideg 180:180:-2.84217e-14:0 iphi 180:180:0:1 phi 3.14159:3.14159:-4.44089e-16:0
phideg 210:210:-2.84217e-14:0 iphi 210:210:0:1 phi 3.66519:3.66519:-8.88178e-16:0
phideg 240:240:-2.84217e-14:0 iphi 240:240:0:1 phi 4.18879:4.18879:0:1