/******************************************************************************* * McStas instrument definition URL=http://www.mcstas.org * * Instrument: OSIRIS * * AUTHOR: KONSTANTIN POKHILCHUK * * MODIFIED BY: JESUS P. DE VICENTE * -ALGUNOS PARAMETROS DE LA GEOMETRIA LIGERAMENTE MODIFICADOS * SEGUN INFORMACION OBTENIDA DE LOS PLANOS EN FORMATO DIGITAL. * *******************************************************************************/ DEFINE INSTRUMENT OSIRIS() DECLARE %{ int USE_CHOPPERS = 0; double ModFocusX = 0.05; double ModFocusY = 0.1; double VFocusX = 0.054; double VFocusY = 0.42; const double GC_radius = 2050; //(m) // const double DWidth = 0.0127; // const double DHeight = 0.03912; const double DWidth = 0.02; const double DHeight = 0.02; const double Mosaic = 48; double dspacing = 3.135; // Si double mosaicCryst = 0.1; // Si // double dspacing = 3.355; //PG // double mosaicCryst = 48; // PG double crystalSide = 1e-2; double theta[40]; double aD = 0.9; //analyzer distance double lambdaReflected = 0.0; int i = 0; int j = 0; int background = 1; //background:1-->neutron from sample and not scattered by analyzer. %} INITIALIZE %{ for(i=0;i<40;i++) { theta[i] = i*crystalSide/aD; } %} TRACE //ORIGIN COMPONENT Origin = Progress_bar(minutes = 0.5) AT (0,0,0) ABSOLUTE //MODERATOR COMPONENT moderator_isis = ISIS_moderator( Face = "iris", Lmin = 2.0, Lmax = 7.0, xwidth = 2.2e-2, yheight= 4.4e-2, focus_xw = 2.5e-2, focus_yh = 5e-2, dist = 0.05) AT (0, 0, 0) ABSOLUTE COMPONENT arm_sample = Arm() AT (0, 0, 0.05) RELATIVE moderator_isis COMPONENT sample = Incoherent( radius = 1.1e-2, yheight = 4.4e-2, thickness = 0.012e-2, focus_xw = 5e-2, focus_yh = 5e-2, target_x = -aD, target_y = 0.0, target_z = 0.0) AT (0, 0, 0) RELATIVE arm_sample ROTATED (0,0,0) RELATIVE arm_sample EXTEND %{ background=1; %} //////////////////////////////////////////////////////////////////////////////////////// //ARM OF FINAL DETECTORS COMPONENT arm_final_detectors = Arm() AT (0, 0, 0) RELATIVE arm_sample ROTATED (0, 90, 0) RELATIVE arm_sample COMPONENT monitorPSDbackground = Monitor_nD( xwidth = 100e-2, yheight = 100e-2, filename = "monitorPSDbackground", options = "x bins=50, y bins=50", restore_neutron = 1) WHEN(background==1) AT (0,0,-2e-2) RELATIVE arm_final_detectors ROTATED (0,0,0) RELATIVE arm_final_detectors COMPONENT monitorPSDbackground2 = Monitor_nD( xwidth = 100e-2, yheight = 100e-2, filename = "monitorPSDbackground2", options = "x bins=50, y bins=50", restore_neutron = 1) WHEN(background==1) AT (0,0,-0.80*aD) RELATIVE arm_final_detectors ROTATED (0,0,0) RELATIVE arm_final_detectors COMPONENT analizadorFlat = Single_crystal( xwidth = 1e-2, yheight = 5e-2, zdepth = 5e-2, // PG ************************* // mosaic = 48, // reflections = "C_graphite.lau", barns=0, // ax=0, ay=2.14, az=-1.24, // bx = 0, by = 0, bz = 2.47, // cx = 6.71, cy = 0, cz = 0, // sigma_abs = 0.014, sigma_inc = 0.004, //************************** // Si ************************* reflections = "Si.lau", barns=0, mosaic = 0.1, delta_d_d = 3.10e-4, sigma_abs = 0.171, sigma_inc = 0.004, // recip_cell = 0, ax = 2.715, ay = 2.715, az = 0.0, bx = 0.0, by = 2.715, bz = 2.715, cx = 2.715, cy = 0.0, cz = 2.715, // ax = 0.0, ay = 2.715, az = 2.715, // bx = 2.715, by = 0.0, bz = 2.715, // cx = 2.715, cy = 2.715, cz = 0.0, // geometry = "analyzer.off", /* recip_cell = 0, ax = 0.0, ay = 2.715, az = 2.715, bx = 2.715, by = 0.0, bz = 2.715, cx = 2.715, cy = 2.715, cz = 0.0,*/ /* recip_cell = 1, ax = -1.157, ay = 1.157, az = 1.157, bx = 1.157, by = -1.157, bz = 1.157, cx = 1.157, cy = 1.157, cz = -1.157,*/ RX = 0, RY = 0, RZ = 0) AT (-aD,0.0,0.0) RELATIVE arm_sample ROTATED (0,0,0) RELATIVE arm_sample EXTEND %{ if(SCATTERED){background=0;} else{background=1;} %} /*COMPONENT analizadorFlat = Analyzer( a=1.0, b=1.0, c=1.0, NH=200, NV=100, hcrystal = 0.01, vcrystal = 0.01,*/ // PG ************************* /* mosaic = 0.1, reflections = "C_graphite.lau", barns=0, ax=0, ay=2.14, az=-1.24, bx = 0, by = 0, bz = 2.47, cx = 6.71, cy = 0, cz = 0, sigma_abs = 0.014, sigma_inc = 0.004,*/ //************************** // Si ************************* /* reflections = "Si3.laz", barns=1, mosaic = 0.1, delta_d_d = 3.10e-4, sigma_abs = 0.171, sigma_inc = 0.004, recip_cell = 0, ax = 2.715, ay = 2.715, az = 0.0, bx = 0.0, by = 2.715, bz = 2.715, cx = 2.715, cy = 0.0, cz = 2.715,*/ /* recip_cell = 0, ax = 0.0, ay = 2.715, az = 2.715, bx = 2.715, by = 0.0, bz = 2.715, cx = 2.715, cy = 2.715, cz = 0.0,*/ /* recip_cell = 1, ax = -1.157, ay = 1.157, az = 1.157, bx = 1.157, by = -1.157, bz = 1.157, cx = 1.157, cy = 1.157, cz = -1.157,*/ /* RX = 0, RY = 0, RZ = 0) AT (-aD,0.0,0.0) RELATIVE arm_sample ROTATED (0,180,0) RELATIVE arm_sample EXTEND %{ if(SCATTERED){background=0;} else{background=1;} %}*/ /* COMPONENT analizadorFlat = Monochromator_curved( zwidth = 5e-2, yheight = 5e-2, gap = 0.0, NH = 1, NV = 1, RV = 0.0, RH = 0.0, imosaic = 0.1, DM = 3.135) AT (-aD, 0.0, 0.0) RELATIVE arm_sample ROTATED (0,-0,0) RELATIVE arm_sample EXTEND %{ if(SCATTERED){background=0;} else{background=1;} %} */ COMPONENT monitorL1 = Monitor_nD( xwidth = DWidth, yheight = DHeight, filename = "monitorL1", options = "lambda limits=[3.8,4.3] bins=100 parallel") WHEN(background==0) AT (0,0,-2e-2) RELATIVE arm_final_detectors ROTATED (0,0,0) RELATIVE arm_final_detectors COMPONENT monitorL2 = Monitor_nD( xwidth = DWidth, yheight = DHeight, filename = "monitorL2", options = "lambda limits=[0,10] bins=500 parallel") WHEN(background==0) AT (0,0,-2e-2) RELATIVE arm_final_detectors ROTATED (0,0,0) RELATIVE arm_final_detectors COMPONENT monitorPSDreflected = Monitor_nD( xwidth = 100e-2, yheight = 100e-2, filename = "monitorPSDreflected", options = "x bins=50, y bins=50", restore_neutron = 1) WHEN(background==0) AT (0,0,-2e-2) RELATIVE arm_final_detectors ROTATED (0,0,0) RELATIVE arm_final_detectors COMPONENT monitorPSDreflected2 = Monitor_nD( xwidth = 100e-2, yheight = 100e-2, filename = "monitorPSDreflected2", options = "x bins=50, y bins=50", restore_neutron = 1) WHEN(background==0) AT (0,0,0) RELATIVE arm_final_detectors ROTATED (0,0,0) RELATIVE arm_final_detectors /* COMPONENT monitorPSDusefulEnergy = Monitor_nD( xwidth = 100e-2, yheight = 100e-2, filename = "monitorPSDusefulEnergy", options = "x bins=50, y bins=50", restore_neutron = 1) WHEN(background==0 && MC_GETPAR(analizadorFlat,lambdaReflected)>=3.1 && MC_GETPAR(analizadorFlat,lambdaReflected)<=3.3) AT (0,0,-2e-2) RELATIVE arm_final_detectors ROTATED (0,0,0) RELATIVE arm_final_detectors */ FINALLY %{ %} END