Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The ABSOLUTE coordinate system of the instrument is the TARGET coordinate system
  • The sector and beamline input parameters selects the orientation of your beamline wrt. the TARGET coordinate system and defines the expected MCPL input filename, e.g. sector=W, beamline=8 → W8.mcpl.gz
  • An MCPL_input component is placed at (0,0,0) ABSOLUTE
  • An inactive ESS_butterfly component is also placed, but is inactive - only included for visualisation purposes!
  • The various beamline elements are placed with respect to the moderator "FOCAL POINT" relevant for your instrument
  • Events are read in from the file "where they are", i.e. at the DxTran sphere / beamport crossing point
  • Events are then propagated back to a plane perpendicular to the instrument axis, to make the source look "normal" to a McStas user - i.e. events are shown close to the moderator surface.
  • The below EXTEND block performs several tasks:
    • Removes events with "high" weight, defaults to 0.003 - recommended value
    • Renormalises the neutron intensity to neutrons/s. (Intensity in the file is neutrons/1e5 protons - renormalisation factors are 1e5 protons / file and 1.56e16 protons / s) 
    • BEWARE! if using a different "NPS" on the MCNP side WILL give you a wrong normalisation. ADJUST accordingly here if you are using any kind of "special" file from Esben! 
    • The TARGET z-value (vertical) is shifted to around the plane of the moderator - defaults to being the plane of the target
  • EXTEND %{
      if(p>mcipthres) {ABSORB;}
      else {SCATTER;}
      p*=1.56e16;
      p/=1e5;
      z=z-0.137;
    %}
  • Several "filters" are applied in the instrument file, to let it only contain events that are "normal" to a McStas user, i.e.

    • Non-neutrons are quietly removed (McStas can do nothing with them!)
    • Neutrons hitting outside a 12x12 cm (WxH) rectangle at the beamport are ABSORBED
    • Neurons originating from outside a 24 x 6 cm (WxH) rectangle at the moderator "surface" are ABSORBED
    • Neutrons outside the chosen  (Lmin,Lmax) wavelength range are ABSORBED
    • Neutrons with starting timing outside the (0,3*ESS_PULSE_DURATION) are ABSORBED
  • The instrument file further contains Brilliance_monitors to and other monitors for looking at
    • Source brilliance
    • Transport through a "standard" m=2 curved Guide of dimension 10x10cm with ROC of 3km

Varying statistics

To ensure conservation of the original simulated intensity, the full content of the MCPL file must used. Therefore the normal user-controlled McStas -n (ncount) is effectively disabled. To allow varying statistics anyway, the instrument parameter 'repeat' (corresponding to the component parameter repeat_count of the MCPL_input component) may be used to repeat the content of the file an integer number of times. See next paragraph wrt. the possibility of slightly varying energy, position and direction when repeating.

MCPL and parallel simulations using MPI

As the MCPL parallelisation in McStas is handled by very simple means, running on multiple processors / cores means repeating the contents of the MCPL file. To do this without wasting time, every repetition of an event will result result in a small Monte-Carlo choice being done inside a "sphere of confusion" around the initial event, dimensioned by the parameters E_smear (Gaussian MC choice within E_smear*E around initial particle energy E), pos_smear (m) (flat MC choice of position within radius pos_smear around initial particle position), dir_smear (degrees) (Gaussian MC choice of direction within dir_smear around initial particle direction).

Output data

Instrument geometry

...