[mcstas-users] Monitor_nD question (V3.5.23)
Wildgruber, Christoph U.
wildgrubercu at ornl.gov
Mon Mar 24 21:24:31 CET 2025
Hi,
I am trying to follow the recipe in the Monitor_nD component description.
The purpose is to track the value of ‘xtalindex’ together with the particle index ‘n’ on an event basis
to evaluate our multi-crystal analyzer setup:
How to monitor any instrument/component variable into a Monitor_nD
Suppose you want to monitor a variable 'age' which you assign somwhere in
the instrument:
COMPONENT MyMonitor = Monitor_nD(
xwidth = 0.1, yheight = 0.1,
user1="age", username1="Age of the Captain [years]",
options="user1, auto")
AT ...
to keep track of a variable I am setting with “EXTEND”.
…
COMPONENT Analyzer_14 = Monochromator_flat_CUW(zwidth = Alength, yheight = Awidth_14,
mosaich = mos, mosaicv = mos,
r0 = 0.99, DM = 3.355)
AT (0, 0, 0) RELATIVE Mono_Arm_14
ROTATED (0, analyzer_rot_14, 0) RELATIVE Mono_Arm_14
EXTEND
%{
xtalindex = 14.0;
%}
…
…and use ‘xtalindex’ the following way:
COMPONENT Collimator_out = Monitor_nD(user1 = ”xtalindex”, username1 = “Crystal index”,
options = "user1,n,x,y,z,vx,vy,vz,t,list all neutrons verbose",
xmin = 0.0, xmax = 1.0, ymin = -0.2, ymax = 0.2,
filename="collimator_out.evt", restore_neutron=1)
AT (0, 0, 0.2) RELATIVE Monitor_Arm
I do get an extra column in the output file but the value is always 0, regardless how I
define and initialize xtalindex. I must be doing something fundamentally wrong.
Any suggestions are greatly appreciated!
Thanks,
Uli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20250324/a71907fc/attachment.htm>
More information about the mcstas-users
mailing list