Skip to content
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

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

jovoy
Copy link
Contributor

@jovoy jovoy commented Aug 22, 2023

jovoy Ok: 32 Powered by Pull Request Badge

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.

@jgalan jgalan self-requested a review August 28, 2023 13:08
@@ -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));
Copy link
Member

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.

Copy link
Contributor Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants