-
Notifications
You must be signed in to change notification settings - Fork 2
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
Adding x_sep for integration of NuSTAR like optics #74
base: master
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
src/TRestAxionTrueWolterOptics.cxx
Outdated
@@ -174,6 +174,10 @@ void TRestAxionTrueWolterOptics::Initialize() { | |||
fAlpha = GetAlpha(); | |||
fThickness = GetThickness(); | |||
|
|||
fXSep.clear(); | |||
for (const auto& a : fAlpha) | |||
fXSep.push_back(2 * (fR1 - fR3 - fMirrorLength * TMath::Sin(a)) / TMath::Tan(a)); |
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.
fR3
is a std::vector
that's why the compilation is failing, and validation is not going through.
Your need to access the elements of fR1
and fR3
.
for( size_t n = 0; n < fAlpha.size(); n++ )
fXSep.push_back(2 * (fR1[n] - fR3[n] - fMirrorLength * TMath::Sin(fAlpha[n])) / TMath::Tan(fAlpha[n]));
where I am assuming fAlpha
, fR1
and fR3
have the same number of elements.
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.
Ah, yeah, that's true!
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
X_sep as the distance between the mirror stacks has to be added to both TRestAxionTrueWolterOptics and TRestAxionWolterOptics.
Update: It is now added to everything but the GetConeVectorIntersection(), where the vector intersects with the cone in the framework.