From a402d7fac7001f9801f6bcaa618c81a76fa8773d Mon Sep 17 00:00:00 2001 From: jovoy <50204158+jovoy@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:44:30 +0100 Subject: [PATCH] Add x_sep equals 0 in cone shaped --- src/TRestAxionWolterOptics.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/TRestAxionWolterOptics.cxx b/src/TRestAxionWolterOptics.cxx index cad5adee..4fb46412 100644 --- a/src/TRestAxionWolterOptics.cxx +++ b/src/TRestAxionWolterOptics.cxx @@ -169,15 +169,22 @@ void TRestAxionWolterOptics::Initialize() { SetLibraryVersion(LIBRARY_VERSION); fR1 = GetR1(); + fR2 = GetR2(); fR3 = GetR3(); + fR4 = GetR4(); fR5 = GetR5(); fAlpha = GetAlpha(); fThickness = GetThickness(); fXSep.clear(); for (unsigned int n = 0; n < fAlpha.size(); n++) - fXSep.push_back(2 * (fR1[n] - fR3[n] - fMirrorLength * TMath::Sin(fAlpha[n])) / + if (fR2[n]==fR3[n]){ + fXSep.push_back(0); + } + else { + fXSep.push_back(2 * (fR1[n] - fR3[n] - fMirrorLength * TMath::Sin(fAlpha[n])) / TMath::Tan(fAlpha[n])); + } if (fAlpha.size() == 0) return;