DEFINE INSTRUMENT TEST_PHONON(E=10, DE=0, HDIV=0, VDIV=0, TT=72.69, OM=-43.3, C=8)
/* 
* %Identification
* Written by: <a href="mailto:kim.lefmann@risoe.dk">Kim Lefmann</a>
* Date: Feb 2004
* Origin: <a href="http://www.risoe.dk/">RISOE</a>
* 
* %INSTRUMENT_SITE:tests
*
* %Description
* Simple test instrument for the new Phonon_simple component.
* Refer to the component documentation for further instructions.
* 
* Example: mcrun Test_Phonon.instr
*
* %Link
* Written by K. Lefmann <kim.lefmann@risoe.dk> RISOE, Feb 2004
* %End
*/
DECLARE
%{
double tx,tz;
%}

INITIALIZE
%{
tx=sin((TT-OM)*DEG2RAD);
tz=cos((TT-OM)*DEG2RAD);
%}

TRACE

COMPONENT a1 = Arm()
  AT (0,0,0) ABSOLUTE

COMPONENT source = Source_div(
	width=0.0005, height=0.0005,
        hdiv=HDIV, vdiv=VDIV, 
	E0 = E,
	dE = DE)		
  AT (0,0,0) RELATIVE a1 ROTATED (0,0,0) RELATIVE a1

COMPONENT sample = Phonon_simple(
     radius_o=0.01, h=0.02, focus_r=0.001, 
     target_x=tx, target_y=0.00, target_z=tz,
     sigma_a=0.17, sigma_i=0.003, b=0.90, M=208, 
     c=C, a=4.95, DW=1.00, T=300)
  AT (0, 0, 1.00) RELATIVE a1 ROTATED (0,OM,0) RELATIVE a1

COMPONENT a2=Arm()
  AT (0, 0, 0) RELATIVE sample ROTATED (0,TT,0) RELATIVE a1

COMPONENT mon1 = E_monitor(
    nchan = 400, filename = "e.dat", xmin = -0.01, xmax = 0.01,
    ymin = -0.02, ymax = 0.02, Emin = 0, Emax = 40)
  AT (0, 0, 1) RELATIVE a2


END


