-
Notifications
You must be signed in to change notification settings - Fork 4
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
Readout plane upgrade, readout validation and new library version #92
Conversation
for more information, see https://pre-commit.ci
I am confused, should we not use #85 for these changes? should I just close it? |
…ics/detectorlib into jgalan-readoutplane-update
No, just merge it, I wanted to create a reduced one with the final metadata members (without final implementation) we will need for the readout. Because readouts need to be regenerated with the new metadata members for the pipelines, and we need to fix a new release. |
Then I have one more comment before this is frozen: I think it would make more sense to store a |
I agree, the cathode can just disappear. We can just call it |
I think perhaps |
…ics/detectorlib into jgalan-readoutplane-update
From this point I expect we are not going to modify any more the data members, so I use the version at this point to regenerate validation readouts. TREX-DM, etc. |
…rface to access module size
…on needs to be worked out in degrees
@@ -504,7 +504,8 @@ void TRestDetectorReadoutPlane::UpdateAxes() { // idempotent | |||
} | |||
|
|||
void TRestDetectorReadoutPlane::SetRotation(Double_t radians) { | |||
fRotation = radians; | |||
// sets fRotation modulo 2pi | |||
fRotation = TVector2::Phi_0_2pi(radians); |
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.
In principle, why radians would be above 2PI? It could be a way to identify a problem. For example if I do something like plane->SetRotation(180)
I will see soon that when transforming to degrees somewhere else in the code, the value is out of range.
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.
We could add a warning then whenever it goes over 2pi. I think it makes more sense to store rotation between 0 and 2pi in general (not just in this class).
@@ -523,3 +523,17 @@ TVector3 TRestDetectorReadoutPlane::GetPositionInWorld(const TVector2& point, Do | |||
Double_t TRestDetectorReadoutPlane::GetDistanceToPlane(const TVector3& point) const { | |||
return (point - fPosition).Dot(fNormal); | |||
} | |||
|
|||
void TRestDetectorReadoutPlane::SetAxisX(const TVector3& axis) { |
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.
When or why we want to do this?
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 could be useful for testing for example.
…ics/detectorlib into jgalan-readoutplane-update
for more information, see https://pre-commit.ci
Ok pipeline is now green. It means that now I have to get back to master on the framework validation? I understand the pipeline will fail, but once the PR is merged we are back to normal. Also rest-for-physics/framework#438 is green |
…ics/detectorlib into jgalan-readoutplane-update
The aim of this PR is to add the new metadata members required for future implementation of readout plane rotation and orientation so that the new readouts can be already pre-generated for pipeline validation.
We have introduced new members inside
TRestDetectorReadoutPlane
.fAxisX
andfAxisY
. They are initialised internally using thefNormal
value.fTotalDriftDistance
disappears, and it is replaced byfHeight
which is defined by user.fCathode
position will now disappear. We just define the height of the active volume above the readout plane. There is still a methodGetCathodePosition
that returns the readout position at a givenfHeight
.Related to: rest-for-physics/framework#438