<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Dear All,<br>
<br>
I have the following issue with a Shape Component in a simulation.
It is used to filter neutrons that have not are not originating from
the moderator window.<br>
<font face="monospace"><br>
COMPONENT Mod_Face = Shape(xwidth=.30,yheight=.24)<br>
AT (0,0,0.16) RELATIVE ABSOLUTE<br>
EXTEND %{<br>
/* Propagate back to a small rectangle in front of moderator */<br>
printf("(before) x=%g y=%g z=%g\n", x, y, z);<br>
<br>
ALLOW_BACKPROP;<br>
PROP_Z0;<br>
SCATTER;<br>
<br>
printf("(after) x=%g y=%g z=%g\n", x, y, z); <br>
printf("(if) %d\n", (fabs(x)> xwidth/2 || fabs(y)>
yheight/2));<br>
/* Remove neutrons that are not from around the moderators */<br>
if (fabs(x)> xwidth/2 || fabs(y)> yheight/2) <br>
{<br>
printf("(absorbed) x=%g y=%g z=%g\n", x, y, z); <br>
ABSORB; <br>
}<br>
%}</font><br>
<br>
<br>
If I run the McStas simulation with the --gravitation flag the back
propagation is not working.<br>
<br>
Log entries will exemplaryly read:<br>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">(if) 0</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">(before) x=0.131648 y=0.00568935 z=1.84</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">(after) x=0.131648 y=0.00568935 z=1.84</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">
</span></p>
<style type="text/css">p, li { white-space: pre-wrap; }</style>And
no neutrons will be filtered out<br>
<br>
With gravity set to 'off' I get:<br>
<br>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">(before) x=0.110096 y=0.118489 z=1.84</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">(after) x=-0.118996 y=-0.00294855 z=0</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">(if) 0</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">(before) x=-0.0518426 y=-0.0952835 z=1.84</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">(after) x=0.519784 y=-0.514964 z=0</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">(if) 1</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">(absorbed) x=0.519784 y=-0.514964 z=0</span></p>
<style type="text/css">p, li { white-space: pre-wrap; }</style><br>
So it works as intended.<br>
<br>
Is this behavior as expected? Or differently is backprop not working
with gravity turned on?<br>
I use McStas 2.7 and need to make the simulation with gravity.<br>
<br>
Any ideas?<br>
<br>
Best,<br>
<br>
Richard<br>
<br>
<div class="moz-signature">-- <br>
<b>Richard Wagner</b><br>
Research Engineer<br>
Nuclear and Particle Physics Group<br>
Institut Laue-Langevin - ILL<br>
71, avenue des Martyrs<br>
CS 20156<br>
38042 Grenoble Cedex 9<br>
France <br>
<br>
<a href="www.ill.eu"><font color="#3984c6">www.ill.eu</font></a>
<p>
</p>
</div>
</body>
</html>