McStasMcXtrace / mccode-antlr

McCode grammar implemented with ANTLR4
1 stars 0 forks source link

[Fix] [#37] mcpl_input component absolute position #38

Closed g5t closed 11 months ago

g5t commented 11 months ago

Expanded testing to capture the problem described in #37

The first component instance of the second instrument produced by Instr.mcpl_split is the effective origin of the second instrument -- since the particles read from the MCPL file have their positions described in the coordinate system of the output component. In the case that any other component in the second Instr has an absolute position, it is imperative that the input component maintains the same relative position as the output component; and therefore must have its position described absolutely.

Possible side effects

If the position of the output/input is a function of any instrument parameters, the conversion to an absolute position must also be a function of those parameters. This behavior needs to be verified.

The _position_relative and _position_absolute of the component initialized in the runtime must match the set values. It should be verified that no short cut was made in setting the absolute position of the first component in an instrument.