McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; Niels Bohr Institute DTU Physics

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding
 Screenshots

Download
 Components
 Share

Mailing list

Search web/mailinglist

Documentation
 McStas manual
 FAQ
 Known problems
 Publications
 C Compilers
 Other
 Tutorial

Workshops/conferences

Developments
 Platforms

Links

Report bugs

SVN

McStas Ubuntu live-dvd


Hdiv_monitor

[ Identification | Description | Input parameters | Output parameters | Links ]

The Hdiv_monitor component

Identification

  • Author:(Unknown)
  • Origin:(Unknown)
  • Date:(Unknown)
  • Version:(Unknown)

Description

      Div_N[i] = 0;
      Div_p[i] = 0;
      Div_p2[i] = 0;
     }
  %}
TRACE
  %{
    int i;
    double h_div;

    PROP_Z0;
    if (x>xmin && xymin && y -(double)h_maxdiv)
      {
        i = floor((h_div + (double)h_maxdiv)*nh/(2.0*(double)h_maxdiv));
        Div_N[i]++;
        Div_p[i] += p;
        Div_p2[i] += p*p;
      }
    }
  %}
FINALLY
  %{
    DETECTOR_OUT_1D(
        "horizontal divergence monitor",
        "horizontal divergence [deg]",
        "Intensity",
        "divergence", -h_maxdiv, h_maxdiv, nh,
        &Div_N[0],&Div_p[0],&Div_p2[0],
        filename);
  %}

MCDISPLAY
  %{
    magnify("xy");
    multiline(5, (double)xmin, (double)ymin, 0.0,
                 (double)xmax, (double)ymin, 0.0,
                 (double)xmax, (double)ymax, 0.0,
                 (double)xmin, (double)ymax, 0.0,
                 (double)xmin, (double)ymin, 0.0);
%}


END

Input parameters

Parameters in boldface are required; the others are optional.
Name Unit Description Default
xmin  
xmax  
ymin  
ymax  
nh  
h_maxdiv  
filename  

Output parameters

Name Unit Description Default
Div_N  
Div_p  
Div_p2  

Links


[ Identification | Description | Input parameters | Output parameters | Links ]

Generated automatically by McDoc, Kristian Nielsen <kristian.nielsen@risoe.dk> / Jan 22 2001


Last Modified: Tuesday, 22-Jun-2004 14:04:09 CEST
Search website freshmeat.net McStas site RSS feed mailinglist archive SVN repos McCode Trac