DEFINE INSTRUMENT in5b_disk_R(Lambda_0, Chop_Vp, Ch_dPha, Det_dist, Det_angle, dEo_type, char *sqw_file, int mode, int nb_scatt, r, h_cur, ceil_cur, sig_abs, sig_scatt, vol_rho, temp) /******************************************************************** * * The full IN5B guide & chopper system * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * * - after the IN5BE instrument (12-March-01) * * - Now with the entire reactor & spectrometer guide...(30/05/01) * * - The disks 1 & 2 and 5 & 6 (31/05/01) * * - The Maxwell source changed for the more accurate Source_gen component * with the ILL's VCS (10/12/01) * * * Compile: * >> mcstas -I . -t -o in5b_disk_R.c in5b_disk_R.instr * >> gcc / cc -g -O2 -o in5b_disk_R.out in5b_disk_R.c -lm * On LYS: * >> cc -fast -o in5b_disk_R.out in5b_disk_R.c -lm * * Run example: * >> in5b_disk_R.out --ncount=1e+06 Lambda_0=5 Chop_Vp=10000 Ch_dPha=0 Det_dist=4 Det_angle=45 dEo_type=2 * * MCRun example: * >> mcrun -N 6 in5b_disk_R.instr --dir=in5b_disk_lambda --ncount=1e+08 * >> Lambda_0=2,12 Chop_Vp=10000 Ch_dPha=0 * * MCDisplay example: * * * Input parameters: * * - Lambda_0 [AA] : mean incident wavelength * - Chop_Vp [rpm] : chopper speed * - Ch_dPha [%] : misphasing (0 if chopper well phased) * - Det_dist [m] : detectors distance * - Det_angle[deg] : detector angle from the guide axis. * - dEo_type [1] : 1 if dLambda scaled for the Ch 1 & 2, other means * dLambda scaled for the spectro (based on the Lambda * width at the output of the spectro). * * Output parameters: * * * ************************************************************************/ DECLARE %{ struct MonitornD_Variables *InstrVars1; struct MonitornD_Variables *InstrVars2; struct MonitornD_Variables *InstrVars3; #define MIN(a,b) a<=b ? a : b; #define MAX(a,b) a>=b ? a : b; //---For the sample char *file_distrib_DOS, *file_energy_exchange, *file_Q_exchange, *file_val_sqw_out, *file_Q, *file_w, *file_SQW, *file_DOS; double lambda_i; char prefix[25]; //---Sample double samp_radius=0.01; double Gamma=0.01; double temp=0.4; //---Quelle-------------------------------------------------------- double Q_xmin,Q_xmax,Q_ymin,Q_ymax,Q_W,Q_H; // Quelle dimensions double Lcible; // Source-1st guide distance double Lambda_source,dLambda_source; double lambda_Min, lambda_Max; // Min and Max wavelenght //---Leiter-------------------------------------------------------- double L_leiter1, L_leiter21; double L_leiter22, L_leiter23; // gerade dimensions double L_leiter3, L_leiter41; double L_leiter42, L_leiter43; double L_leiter44, L_leiter45; double L_Kolimator, L_KolSample; double L_gap, disk_gap,mono_gap; double leiter23_w1, leiter23_h1; // leiter23 dimensions double leiter23_w2, leiter23_h2; double leiter23_w1_xmin, leiter23_w1_xmax; double leiter23_h1_ymin, leiter23_h1_ymax; double Sample_W,Sample_H; // sample dimensions double Sample_W_xmin,Sample_W_xmax; double Sample_H_ymin,Sample_H_ymax; double Gu_width[7],Gu_alpha[7]; //----------------------------------Reactor & Krumm Leiter coating double alt_leiter_Qc,alt_leiter_Ro,alt_leiter_alpha,alt_leiter_W; double L_reactor_guide; // total length of the reactor guide // from the source to the VTE valve double L_source_sample; //----------------------------------Neue Leiter coating double leiter_Qc,leiter_Ro,leiter_alpha,leiter_W; //---Choppers------------------------------------------------------ double Ch_mean_R[7]; // = rotation axis - guide axis double Ch_width[7],Ch_height[7]; // slots widht and height double Ch_alpha[7]; // angular aperture of choppers double Ch_phase[7]; // matching (phase) time for choppers double Ch_Ltot[7]; // distance - ref_time chopper double Ch_Vp[7]; double disk_N; // slot number on the disks double Ch12_dTcalc,Tg; // calculated burst time,repetition time double Ch56_dTcalc; double v0,Eo,dEo,dEo1,dEo2; // neutron mean Energy, and velocity double dummy; double Lab; //---Monitors------------------------------------------------------- double Tmin1,Tmax1,Tmoy1; // time range for mono_zeit - I - double Tmin2,Tmax2,Tmoy2; // time range for mono_zeit - II - double Tmin3,Tmax3,Tmoy3; // time range for mono_zeit - III - double Emin1,Emax1; // energy range for mono_zeit - I - double Emin2,Emax2; // energy range for mono_zeit - II - double Emin3,Emax3; // energy range for mono_zeit - III - double hdiv,vdiv; // div limits for mono_div double M_xmin1,M_xmax1,M_ymin1,M_ymax1; // mono dimensions after chopper II double M_xmin2,M_xmax2,M_ymin2,M_ymax2; // mono dimensions at sample double Ltot1,Ltot2,Ltot3; // total distance: time_reset - mono //---Sample-by-itself------------------------------------------------ double Vana_Ri,Vana_Ro,Vana_h,Vana_Pack,Vana_focus; // Hollow cylinder dimensions double Detector_X, Detector_Y, Detector_Z; // position of the target detector //----pour-la-def-en-dur---------------------------------------------- double Ch0_Vp,Ch1_Vp,Ch2_Vp,Ch0_width,Ch1_width,Ch2_width; double Ch0_height,Ch1_height,Ch2_height; double Ch0_mean_R,Ch1_mean_R,Ch2_mean_R,Ch0_phase,Ch1_phase,Ch2_phase; double Ch5_Vp,Ch6_Vp,Ch5_width,Ch6_width,Ch5_height,Ch6_height; double Ch5_mean_R,Ch6_mean_R, Ch5_phase, Ch6_phase; %} INITIALIZE %{ int i; lambda_i=Lambda_0; //========================================================================== // Quelle //========================================================================== Q_W = 0.160; Q_H = 0.220; Q_xmin = -Q_W/2; Q_xmax = Q_W/2; Q_ymin = -Q_H/2; Q_ymax = Q_H/2; Lcible = 2.330; // distance source - debut du guide Lambda_source = Lambda_0; // The limits of wavelength for the source is calculated in "--monos--" //========================================================================== // Leiter //========================================================================== L_reactor_guide = 33.30127; // Total length: Source-VTE [m] L_gap = 0.2130; // gap VTE+OT-H16 L_leiter1 = 4.3900; // for gerade leiter1 L_leiter21 = 0.6950; // for gerade leiter21 L_leiter22 = 0.1300; // for gerade leiter22 L_leiter23 = 0.69500; // for gerade leiter23 disk_gap = 0.01; // gap between leiter und chopper L_leiter3 = 5.5125; // for gerade leiter3 L_leiter41 = 0.7425; // for gerade leiter41 L_leiter42 = 0.0350; // for gerade leiter42 L_leiter43 = 0.7500; // for gerade leiter43 L_leiter44 = 0.0350; // for gerade leiter44 L_leiter45 = 0.7900; // for gerade leiter45 mono_gap = 0.0300; // gap for the 1st monitor L_Kolimator= 0.1300; // for gerade Kolimator L_KolSample= 0.2400-0.025; // the sample chamber size & keep // place for the vana sample L_source_sample = L_reactor_guide+L_gap+L_leiter1+L_leiter21+2*disk_gap; L_source_sample+= L_leiter22+2*disk_gap+L_leiter23+L_leiter3+L_leiter41; L_source_sample+= 2*disk_gap+L_leiter42+2*disk_gap+L_leiter43; L_source_sample+= 2*disk_gap+L_leiter44+2*disk_gap+L_leiter45; L_source_sample+= mono_gap+L_Kolimator+L_KolSample+0.025; printf("\n\nTotal lenght Source - Sample = %f m\n\n",L_source_sample); leiter23_w2= 0.02856; // leiter23 dimensions for size monos leiter23_h2= 0.15931; leiter23_w1= 0.03000; // leiter23 dimensions for size monos leiter23_h1= 0.16813; leiter23_w1_xmin = -leiter23_w1/2; leiter23_w1_xmax = leiter23_w1/2; // as needed by monitors 1 leiter23_h1_ymin = -leiter23_h1/2; leiter23_h1_ymax = leiter23_h1/2; Sample_W = 0.0140; Sample_H = 0.0500; // as needed for monitors 2 Sample_W_xmin = -Sample_W/2; Sample_W_xmax = Sample_W/2; Sample_H_ymin = -Sample_H/2; // as needed for monitors 2 Sample_H_ymax = Sample_H/2; // Alt Leiter coating alt_leiter_Qc = 0.021745; // for m=1 alpha and W aren't used. alt_leiter_Ro = 0.995; alt_leiter_alpha = 6.07; alt_leiter_W = 0.0023; // New leiter and super-mirors leiter_Qc = 0.02275; leiter_Ro = 0.996; leiter_alpha = 5.75; leiter_W = 0.00125; //========================================================================== // Choppers //========================================================================== Ch_mean_R[0] = 0.285; // Ch_mean_R[1] = 0.285; // Ch_mean_R[2] = 0.285; // Ch_mean_R[3] = 0.299; // = rotation axis - guide axis Ch_mean_R[4] = 0.299; // Ch_mean_R[5] = 0.304; // Ch_mean_R[6] = 0.304; // Ch_height[0] = 0.170; // Ch_height[1] = 0.170; // Ch_height[2] = 0.16813; // Ch_height[3] = 0.081; // Height of the disk which "see" the guide Ch_height[4] = 0.08031; // Ch_height[5] = 0.07069; // Ch_height[6] = 0.0700; // Ch_alpha[0] = 9.0*PI/180; // Ch_alpha[1] = 9.0*PI/180; // Ch_alpha[2] = 9.0*PI/180; // Ch_alpha[3] = 9.5*PI/180; // angular apperture of choppers [rad] Ch_alpha[4] = 9.5*PI/180; // Ch_alpha[5] = 3.25*PI/180; // Ch_alpha[6] = 3.25*PI/180; // Gu_width[1] = 0.030; // Gu_width[2] = 0.030; // Gu_width[3] = 0.01579; // Width of the GUIDE at Chop. position Gu_width[4] = 0.01568; // Gu_width[5] = 0.01400; // Gu_width[6] = 0.01400; // disk_N = 2; for (i=1;i<=6;i++){ Ch_width[i] = 2*Ch_mean_R[i]*tan(Ch_alpha[i]/2); // width at Rmin Ch_Vp[i] = 0.0; Ch_Ltot[i] = 0.0; Gu_alpha[i] = 2*atan(Gu_width[i]/2/Ch_mean_R[i]); printf("Ch%d: Rmin = %f, W = %f\n",i,Ch_mean_R[i],Ch_width[i]); printf("Alpha_guide at Ch. %d = %f deg\n",i,Gu_alpha[i]*180/PI); } if (Chop_Vp==0){ printf("FATAL ERROR: Chopper speed <= 0 !"); exit(-1); } // set the choppers speed Ch_Vp[0] = Chop_Vp; Ch_Vp[1] = Chop_Vp; Ch_Vp[2] = -Chop_Vp; Ch_Vp[5] = Chop_Vp; Ch_Vp[6] = -Chop_Vp; // These are the lowest limit cases of accuracy on the calculus: //============================================================== // calculated burst time - 1st pair - unit: [s] Ch12_dTcalc = 60.0*Ch_alpha[1]/(2*PI*fabs(Ch_Vp[1])); // calculated burst time - last pair - unit: [s] Ch56_dTcalc = 60.0*Ch_alpha[6]/(2*PI*fabs(Ch_Vp[6])); v0 = 3956.035/Lambda_0; Tg = 60/Ch_Vp[1]/disk_N; // unit [s] //---------------------------------------------------------------- // Compute the phases of each choppers //------------------------------------- // The length Ref_time - chopper for the Ch_phase calculus // The VTE valve is taken as the reference of the distances // in order to compute easily the phases for each choppers. // Because of this new "ideal" chopper (dT=0!), the FirstChopper // component is set to spread the time t = t +/- 2*alpha/Omega // (Note that the FirstChopper is modified to avoid time resetting // already done) //---------------------------------------------------------------- Ch_Ltot[0] = L_gap+L_leiter1+L_leiter21+0.5*disk_gap; Ch_Ltot[1] = Ch_Ltot[0]+0.5*disk_gap; Ch_Ltot[2] = Ch_Ltot[1]+disk_gap+L_leiter22+disk_gap; Ch_Ltot[3] = Ch_Ltot[2]+disk_gap+L_leiter23+L_leiter3+L_leiter41+disk_gap; Ch_Ltot[4] = Ch_Ltot[3]+disk_gap+L_leiter42+disk_gap; Ch_Ltot[5] = Ch_Ltot[4]+disk_gap+L_leiter43+disk_gap; Ch_Ltot[6] = Ch_Ltot[5]+disk_gap+L_leiter44+disk_gap; if (Ch_dPha == 0) for (i=0;i<=6;i++){ Ch_phase[i] = Ch_Ltot[i]/v0; printf("Lengthpath reftime-Disk %d = %f m\t Phase(%d)= %f mu-sec\n",i,Ch_Ltot[i],i,Ch_phase[i]*1.0e+6); } else for (i=1;i<=6;i++){ Ch_phase[i] = (1+Ch_dPha/100)*Ch_Ltot[i]/v0; printf("Total length path Source-Disk %d = %f\n",i,Ch_Ltot[i]); printf("t_phase Ch%d = %f mu-s\n",i,Ch_phase[i]*1E6); printf("relative phase = %f deg\n",fmod(Ch_phase[i]-Ch_Ltot[i]/v0,Tg)*360/Tg); } //========================================================================== // Monitors //========================================================================== //------------------------------- // Zeit Monitors ranges //------------------------------- //-----After 1st chopper pair---- Ltot1 = Ch_Ltot[2]+disk_gap/2; Tmoy1 = Ltot1/v0; Tmin1 = Tmoy1-3*Ch12_dTcalc; Tmax1 = Tmoy1+3*Ch12_dTcalc; printf("1st pair:\nTotal length path Source-Mono-I- = %f m\n",Ltot1); printf("Computed burst time 1st pair = %f mu-s\n",Ch12_dTcalc*1E6); printf("Tmoy = %f mu-s\nTmin = %f mu-s\nTmax = %f mu-s\n",Tmoy1*1E6,Tmin1*1E6,Tmax1*1E6); //-----neutron energy-----after-1st-chopper-pair--- Eo = 81.805/Lambda_0/Lambda_0; dEo1 = 0.64723*Ch12_dTcalc*1E6/(Ch_Ltot[2]-Ch_Ltot[1])/Lambda_0/Lambda_0/Lambda_0; // [meV] Emin1 = Eo-dEo1; // Warning: E in meV Emax1 = Eo+dEo1; printf("\n Incident energy = %f meV\n Energy width at pair 1,2: dEo1 = %f meV\n",Eo,dEo1); printf("Energy range at pair 1,2:\nEmin = %f meV\nEmax = %f meV\n",Emin1,Emax1); //-----At sample----------------------------------- Ltot2 = Ch_Ltot[6]+disk_gap+L_leiter45+mono_gap+L_Kolimator+L_KolSample; Tmoy2 = Ltot2/v0; Tmin2 = Tmoy2-3*Ch56_dTcalc; Tmax2 = Tmoy2+3*Ch56_dTcalc; printf("\nlast pair:\nTotal length path Source-Mono-II- = %f m\n",Ltot2); printf("Tmoy = %f mu-s\nTmin = %f mu-s\nTmax = %f mu-s\n",Tmoy2*1E6,Tmin2*1E6,Tmax2*1E6); //-----At detector--------------------------------- Ltot3 = Ltot2+0.025+Det_dist; Tmoy3 = Ltot3/v0; Tmin3 = Tmoy3-3*Ch56_dTcalc; Tmax3 = Tmoy3+3*Ch56_dTcalc; printf("\nDetector:\nTotal length path Source-detector = %f m\n",Ltot2); printf("Computed burst time last pair = %f mu-s\n",Ch56_dTcalc*1E6); printf("Tmoy = %f mu-s\nTmin = %f mu-s\nTmax = %f mu-s\n",Tmoy3*1E6,Tmin3*1E6,Tmax3*1E6); //-----neutron energy-----after-last-chopper-pair--- Eo = 81.805/Lambda_0/Lambda_0; dEo2 = 0.64723*Ch56_dTcalc*1E6/(Ch_Ltot[6]-Ch_Ltot[1])/Lambda_0/Lambda_0/Lambda_0; // [meV] Emin2 = Eo-2.0*dEo2; // Warning: E in meV Emax2 = Eo+2.0*dEo2; Emin3=Emin2; Emax3=Emax2; printf("\n Incident energy = %f meV\n Energy width at Ch6: dEo2 = %f meV\n",Eo,dEo2); printf("\n Energy range at sample:\nEmin = %f meV\nEmax = %f meV\n",Emin2,Emax2); //-----size-monitors---------- M_xmin1 = -leiter23_w1/1.6667; M_xmax1 = leiter23_w1/1.6667; M_ymin1 = -leiter23_h1/1.6667; M_ymax1 = leiter23_h1/1.6667; M_xmin2 = -Sample_W/1.25; M_xmax2 = Sample_W/1.25; M_ymin2 = -Sample_H/1.25; M_ymax2 = Sample_H/1.25; //-----max-divergence---------- vdiv = 0.9+0.2*Lambda_0; hdiv = 0.9+0.2*Lambda_0; //======================================== // Grezen-fuer-die-Maxwell-Quelle // // WARNING: Placed here hears deltaE // the whole spectro instead of the // 1st pair of choppers!!!! //======================================== if ( dEo_type == 1 ) { printf("\n\n INFO : dlambda SOURCE = dlambda Ch1 & 2."); dEo = dEo1;} else { printf("\n\n WARNING: dlambda SOURCE = dlambda spectro instead of Ch1 & 2 !!!"); printf("\n\n\n\n"); dEo = dEo2;} lambda_Min= sqrt(81.805/(Eo+2*dEo)); if ( dEo <= Eo/2 ) lambda_Max= sqrt(81.805/(Eo-2*dEo)); else lambda_Max= 3.0*Lambda_0; printf("\n\n\n\nMaxwell Source limits:\nLamda_min = %f AA\nLamda_max = %f AA\n",lambda_Min,lambda_Max); dLambda_source = fabs(lambda_Max - lambda_Min); //======================================== // Actual sample and detector //======================================== Vana_Ri = 0.019; Vana_Ro = 0.020; Vana_h = 0.06; Vana_Pack = 0.94807; // For real Vana Pack= 0.94807 Vana_focus = 0.02; Detector_X = 0.0; Detector_Y = 0.0; Detector_Z = Det_dist; //======================================== // Traduit en label dur quelle nullite!!! //======================================== Ch0_Vp = Ch_Vp[0]; // set the choppers speed Ch1_Vp = Ch_Vp[1]; // set the choppers speed Ch2_Vp = Ch_Vp[2]; Ch5_Vp = Ch_Vp[5]; // set the choppers speed Ch6_Vp = Ch_Vp[6]; Ch0_width = Ch_width[0]; Ch1_width = Ch_width[1]; Ch2_width = Ch_width[2]; Ch5_width = Ch_width[5]; Ch6_width = Ch_width[6]; Ch0_height = Ch_height[0]; Ch1_height = Ch_height[1]; Ch2_height = Ch_height[2]; Ch5_height = Ch_height[5]; Ch6_height = Ch_height[6]; Ch0_mean_R = Ch_mean_R[0]; Ch1_mean_R = Ch_mean_R[1]; Ch2_mean_R = Ch_mean_R[2]; Ch5_mean_R = Ch_mean_R[5]; Ch6_mean_R = Ch_mean_R[6]; Ch0_phase = Ch_phase[0]; Ch1_phase = Ch_phase[1]; Ch2_phase = Ch_phase[2]; Ch5_phase = Ch_phase[5]; Ch6_phase = Ch_phase[6]; InstrVars1 = &(MC_GETPAR(Sample_num_scatt, Vars)); strcpy(InstrVars1->UserName1,"num_scatt"); InstrVars2 = &(MC_GETPAR(Sample_num_scatt_omega, Vars)); strcpy(InstrVars2->UserName1,"num_scatt"); strcpy(InstrVars2->UserName2,"omega"); InstrVars3 = &(MC_GETPAR(Sample_q_omega, Vars)); strcpy(InstrVars3->UserName1,"q"); strcpy(InstrVars3->UserName2,"omega"); %} TRACE COMPONENT arm = Arm() AT (0,0,0) ABSOLUTE /*----------------------------*/ /* QUELLE */ /* */ /* Changed for the */ /* acurate "source_gen" */ /* componemt */ /* (JO, Dec-2001) */ /*----------------------------*/ COMPONENT Quelle = Source_gen(h = Q_H, w = Q_W, dist = Lcible, xw = 0.038, yh = 0.200, Lambda0 = Lambda_source, dLambda = dLambda_source, T1 = 150.42, I1 = 3.67e11, T2 = 38.74, I2 = 3.64e11, T3 = 14.84, I3 = 0.95e11) AT (0,0,0) RELATIVE arm /*------------------*/ /* MONO QUELLE */ /*------------------*/ /*COMPONENT MONO_quelle= TOF_monitor(xmin=Q_xmin, xmax=Q_xmax, ymin=Q_ymin, ymax=Q_ymax, nchan=1024, dt=4.0, filename="mono_quelle.dat") AT (0,0,0.001) RELATIVE Quelle */ /* COMPONENT MONO_quelle_lambda = Monitor_nD(xmin=Q_xmin, xmax=Q_xmax, ymin=Q_ymin, ymax=Q_ymax, options="lambda limit=[1.0 24] bins=1024" //Lmin=1.0, //Lmax=24, //nchan=1024, //filename="mono_quelle.dat" ) AT (0,0,0.01) RELATIVE Quelle */ /* COMPONENT MONO_quelle_ene = Monitor_nD(xmin = -0.02, xmax = 0.02, ymin = -0.125, ymax = 0.125, options="energy auto bins=256" //Emin = 0.0, //Emax = 20.0, //nchan = 256, //filename = "mono_quelle_ene.dat" ) AT (0,0,0.015) RELATIVE Quelle */ /*--------------------*/ /* DIE LEITER */ /*--------------------*/ // zuerste, die gerade Teil // ^^^^^^^^^^^^^^^^^^^^^^^^ //(6x499.7mm+0.3mm gap, 301.27mm+20mm gap, 230mm+170mm gap) //----------------------------------------------------------------- COMPONENT gerade_in_pile1 = Guide(w1 = 0.038, h1 = 0.2, w2 = 0.037, h2 = 0.2, l = 0.4997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W=alt_leiter_W) AT (0,0,Lcible) RELATIVE Quelle COMPONENT gerade_in_pile2 = Guide(w1 = 0.037, h1 = 0.2, w2 = 0.03603, h2 = 0.2, l = 0.4997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,0.500) RELATIVE gerade_in_pile1 COMPONENT gerade_in_pile3 = Guide(w1 = 0.03603, h1 = 0.2, w2 = 0.03504, h2 = 0.2, l = 0.4997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.0000) RELATIVE gerade_in_pile1 COMPONENT gerade_in_pile4 = Guide(w1 = 0.03504, h1 = 0.2, w2 = 0.03406, h2 = 0.2, l = 0.4997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.5000) RELATIVE gerade_in_pile1 COMPONENT gerade_in_pile5 = Guide(w1 = 0.03406, h1 = 0.2, w2 = 0.03307, h2 = 0.2, l = 0.4997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,2.0000) RELATIVE gerade_in_pile1 COMPONENT gerade_in_pile6 = Guide(w1 = 0.03307, h1 = 0.2, w2 = 0.03209, h2 = 0.2, l = 0.4997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,2.5000) RELATIVE gerade_in_pile1 COMPONENT gerade_in_pile7 = Guide(w1 = 0.03209, h1 = 0.2, w2 = 0.03149, h2 = 0.2, l = 0.30127, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,3.0000) RELATIVE gerade_in_pile1 COMPONENT gerade_in_pile8 = Guide(w1 = 0.03145, h1 = 0.2, w2 = 0.03100, h2 = 0.2, l = 0.230, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,3.32127) RELATIVE gerade_in_pile1 // Dann, die "MAN" Leiter // ^^^^^^^^^^^^^^^^^^^^^^^ //(29 Teilen nach ein 170mm gap) //------------------------------------------------------ COMPONENT krumm1 =Guide(w1 = 0.030, h1 = 0.2, w2 = 0.030, h2 = 0.2, l = 0.7497, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,0.400) RELATIVE gerade_in_pile8 ROTATED (0,0.018630,0) RELATIVE gerade_in_pile8 COMPONENT krumm2 =Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,0.750) RELATIVE krumm1 ROTATED (0,.0079,0) RELATIVE krumm1 COMPONENT krumm3 =Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm2 ROTATED (0,0.02115,0) RELATIVE krumm2 COMPONENT krumm4 =Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm3 ROTATED (0,0.021240,0) RELATIVE krumm3 COMPONENT krumm5 =Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.7497, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm4 ROTATED (0,0.018630,0) RELATIVE krumm4 COMPONENT krumm6 =Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,0.750) RELATIVE krumm5 ROTATED (0,0.018540,0) RELATIVE krumm5 COMPONENT krumm7 =Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.4997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm6 ROTATED (0,0.015930,0) RELATIVE krumm6 COMPONENT krumm8 =Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,0.500) RELATIVE krumm7 ROTATED (0,0.018990,0) RELATIVE krumm7 COMPONENT krumm9 =Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm8 ROTATED (0,0.021240,0) RELATIVE krumm8 COMPONENT krumm10=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm9 ROTATED (0,0.021240,0) RELATIVE krumm9 COMPONENT krumm11=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm10 ROTATED (0,0.021240,0) RELATIVE krumm10 COMPONENT krumm12=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm11 ROTATED (0,0.021240,0) RELATIVE krumm11 COMPONENT krumm13=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm12 ROTATED (0,0.021150,0) RELATIVE krumm12 COMPONENT krumm14=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm13 ROTATED (0,0.021240,0) RELATIVE krumm13 COMPONENT krumm15=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm14 ROTATED (0,0.021240,0) RELATIVE krumm14 COMPONENT krumm16=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm15 ROTATED (0,0.021240,0) RELATIVE krumm15 COMPONENT krumm17=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.4997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm16 ROTATED (0,0.015930,0) RELATIVE krumm16 COMPONENT krumm18=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,0.500) RELATIVE krumm17 ROTATED (0,0.015930,0) RELATIVE krumm17 COMPONENT krumm19=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm18 ROTATED (0,0.021240,0) RELATIVE krumm18 COMPONENT krumm20=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm19 ROTATED (0,0.021240,0) RELATIVE krumm19 COMPONENT krumm21=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm20 ROTATED (0,0.021150,0) RELATIVE krumm20 COMPONENT krumm22=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm21 ROTATED (0,0.021240,0) RELATIVE krumm21 COMPONENT krumm23=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm22 ROTATED (0,0.021240,0) RELATIVE krumm22 COMPONENT krumm24=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm23 ROTATED (0,0.021240,0) RELATIVE krumm23 COMPONENT krumm25=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm24 ROTATED (0,0.021240,0) RELATIVE krumm24 COMPONENT krumm26=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.7497, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm25 ROTATED (0,0.018630,0) RELATIVE krumm25 COMPONENT krumm27=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,0.750) RELATIVE krumm26 ROTATED (0,0.018540,0) RELATIVE krumm26 COMPONENT krumm28=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm27 ROTATED (0,0.021240,0) RELATIVE krumm27 COMPONENT krumm29=Guide(w1 = 0.03, h1 = 0.2, w2 = 0.03, h2 = 0.2, l = 0.9997, R0 = alt_leiter_Ro, Qc = alt_leiter_Qc, alpha = alt_leiter_alpha, m = 1, W = alt_leiter_W) AT (0,0,1.000) RELATIVE krumm28 ROTATED (0,0.021240,0) RELATIVE krumm28 /*---------------------------------------------------------*/ /* Und jetzt die gerade Leiter, choppers, usw. */ /*---------------------------------------------------------*/ COMPONENT GeradeLeiterAnfang = Arm() AT (0,0,1.000) RELATIVE krumm29 /*-----------------------------------------*/ /* Now reset time for the choppers */ /* Gives the new "origine des temps" */ /* for the choppers phase calculus */ /* */ /* Note that the resetting of the time */ /* act as a "perfect" chopper (dT=0!) */ /* so that a time spreading corresponding */ /* the real width at the 1st chopper is */ /* thus necessary (see the First chopper) */ /* below. */ /*-----------------------------------------*/ COMPONENT ResetTime = Reset_time(NewTime = 0.0) AT (0,0,0) RELATIVE GeradeLeiterAnfang /*-------------------------*/ /* GERADE LEITER */ /*-------------------------*/ COMPONENT leiter1 = Guide2(w1 = 0.03000, h1 = 0.20000, w2 = 0.03000, h2 = 0.17415, l = L_leiter1, R0 = leiter_Ro, Qc = leiter_Qc, alpha = leiter_alpha, mh = 1, mv = 2, W = leiter_W) AT (0,0,L_gap) RELATIVE GeradeLeiterAnfang COMPONENT leiter21 = Guide2(w1 = 0.03000, h1 = 0.17415, w2 = 0.03000, h2 = 0.17000, l = L_leiter21, R0 = leiter_Ro, Qc = leiter_Qc, alpha = leiter_alpha, mh = 1, mv = 2, W = leiter_W) AT (0,0,L_leiter1) RELATIVE leiter1 /*-------------------------------*/ /* CHOPPER - I - */ /*-------------------------------*/ COMPONENT ErsteChopper = First_Chopper(W = Ch0_width, R = Ch0_mean_R, Vp = Ch0_Vp, n = disk_N, pha = Ch0_phase, a = 2) AT (0,0,(L_leiter21+0.5*disk_gap)) RELATIVE leiter21 COMPONENT Chopper1 = ChopperSimple(W = Ch1_width, R = Ch1_mean_R, Vp = Ch1_Vp, n = disk_N, pha = Ch1_phase) AT (0,0,(L_leiter21+disk_gap)) RELATIVE leiter21 COMPONENT leiter22 = Guide2(w1 = 0.03000, h1 = 0.17000, w2 = 0.03000, h2 = 0.16813, l = L_leiter22, R0 = leiter_Ro, Qc = leiter_Qc, alpha = leiter_alpha, mh = 2, mv = 3, W = leiter_W) AT (0,0,disk_gap) RELATIVE Chopper1 /*-------------------------------*/ /* CHOPPER - II - */ /*-------------------------------*/ COMPONENT Chopper2 = ChopperSimple(W = Ch2_width, R = Ch2_mean_R, Vp = Ch2_Vp, n = disk_N, pha = Ch2_phase) AT (0,0,(L_leiter22+disk_gap)) RELATIVE leiter22 /*------------------*/ /* MONOS - EINS- */ /* */ /* mid-way between */ /* Ch2 & L23 */ /*------------------*/ // TOF_Monitor_range /* COMPONENT MONO_zeit1 = Monitor_nD( xmin = M_xmin1, xmax = M_xmax1, ymin = M_ymin1, ymax = M_ymax1, options="t bins=256 auto" //nchan = 256, //tmin = Tmin1, //tmax = Tmax1, //filename = "mono_zeit1.dat" ) AT (0,0,(disk_gap/2)) RELATIVE Chopper2 //E_monitor COMPONENT MONO_ene1 = Monitor_nD(xmin = M_xmin1, xmax = M_xmax1, ymin = M_ymin1, ymax = M_ymax1, options="energy auto bins=256" //Emin = Emin1, //Emax = Emax1, //nchan = 256, //filename = "mono_ene1.dat" ) AT (0,0,(disk_gap/2+0.0005)) RELATIVE Chopper2 COMPONENT MONO_zeit1 = TOF_monitor(xmin=M_xmin1, xmax=M_xmax1, ymin=M_ymin1, ymax=M_ymax1, nchan=1024, dt=10.0, filename="mono_zeit1.dat") AT (0,0,(disk_gap/2)) RELATIVE Chopper2 COMPONENT MONO_div1 = Divergence_monitor(xmin=M_xmin1, xmax=M_xmax1, ymin=M_ymin1, ymax=M_ymax1, nv=100,nh=100, v_maxdiv=vdiv, h_maxdiv=hdiv, filename="mono_div1.dat") AT (0,0,(disk_gap/2+0.001)) RELATIVE Chopper2 COMPONENT MONO_psd1 = PSD_monitor(xmin=M_xmin1, xmax=M_xmax1, ymin=M_ymin1, ymax=M_ymax1, nx=100,ny=100, filename="mono_psd1.dat") AT (0,0,(disk_gap/2+0.002)) RELATIVE Chopper2 COMPONENT MONO_e2d1 = E2D_monitor(xmin= leiter23_w1_xmin, xmax= leiter23_w1_xmax, ymin= leiter23_h1_ymin, ymax= leiter23_h1_ymax, nh=100,nv=100, filename="mono_E2D1.dat") AT (0,0,(disk_gap/2+0.003)) RELATIVE Chopper2 */ /*-------------------------------*/ /* Second guide part */ /* */ /*-------------------------------*/ COMPONENT leiter23 = Guide2(w1 = 0.03000, h1 = 0.16813, w2 = 0.02856, h2 = 0.15931, l = L_leiter23, R0 = leiter_Ro, Qc = leiter_Qc, alpha = leiter_alpha, mh = 2, mv = 3, W = leiter_W) AT (0,0,disk_gap) RELATIVE Chopper2 COMPONENT leiter3 = Guide2(w1 = 0.02856, h1 = 0.15931, w2 = 0.01733, h2 = 0.09041, l = L_leiter3, R0 = leiter_Ro, Qc = leiter_Qc, alpha = leiter_alpha, mh = 2, mv = 3, W = leiter_W) AT (0,0,L_leiter23) RELATIVE leiter23 COMPONENT leiter41 = Guide2(w1 = 0.01733, h1 = 0.09041, w2 = 0.01579, h2 = 0.08100, l = L_leiter41, R0 = leiter_Ro, Qc = leiter_Qc, alpha = leiter_alpha, mh = 2, mv = 3, W = leiter_W) AT (0,0,L_leiter3) RELATIVE leiter3 /*-------------------------------*/ /* CHOPPER - III - */ /*-------------------------------*/ //---------Here chopper FO--------------------- COMPONENT leiter42 = Guide2(w1 = 0.01577, h1 = 0.08088, w2 = 0.01568, h2 = 0.08031, l = L_leiter42, R0 = leiter_Ro, Qc = leiter_Qc, alpha = leiter_alpha, mh = 2, mv = 3, W=leiter_W) AT (0,0,(L_leiter41+2*disk_gap)) RELATIVE leiter41 /*-------------------------------*/ /* CHOPPER - IV - */ /*-------------------------------*/ //---------Here chopper CO--------------------- COMPONENT leiter43 = Guide2(w1 = 0.01566, h1 = 0.08019, w2 = 0.01411, h2 = 0.07069, l = L_leiter43, R0 = leiter_Ro, Qc = leiter_Qc, alpha = leiter_alpha, mh = 2, mv = 3, W = leiter_W) AT (0,0,(L_leiter42+2*disk_gap)) RELATIVE leiter42 /*-------------------------------*/ /* CHOPPER - V - */ /*-------------------------------*/ COMPONENT Chopper5 = ChopperSimple(W = Ch5_width, R = Ch5_mean_R, Vp = Ch5_Vp, n = disk_N, pha = Ch5_phase) AT (0,0,(L_leiter43+disk_gap)) RELATIVE leiter43 COMPONENT leiter44 = Guide2(w1 = 0.01413, h1 = 0.07081, w2 = 0.01400, h2 = 0.0700, l = L_leiter44, R0 = leiter_Ro, Qc = leiter_Qc, alpha = leiter_alpha, mh = 2, mv = 3, W = leiter_W) AT (0,0,(L_leiter43+2*disk_gap)) RELATIVE leiter43 /*-------------------------------*/ /* CHOPPER - VI - */ /*-------------------------------*/ COMPONENT Chopper6 = ChopperSimple(W = Ch6_width, R = Ch6_mean_R, Vp = Ch6_Vp, n = disk_N, pha = Ch6_phase) AT (0,0,(L_leiter44+disk_gap)) RELATIVE leiter44 COMPONENT leiter45 = Guide2(w1 = 0.01400, h1 = 0.06983, w2 = 0.01400, h2 = 0.05663, l = L_leiter45, R0 = leiter_Ro, Qc = leiter_Qc, alpha = leiter_alpha, mh = 2, mv = 3, W = leiter_W) AT (0,0,(L_leiter44+2*disk_gap)) RELATIVE leiter44 //-----Here the actual 1st monitor /*-----------------------*/ /* KOLLIMATOR LEITER */ /*-----------------------*/ COMPONENT Kolimator = Guide2(w1 = 0.01400, h1 = 0.05617, w2 = 0.01400, h2 = 0.05400, l = L_Kolimator, R0 = leiter_Ro, Qc = leiter_Qc, alpha = leiter_alpha, mh = 2, mv = 3, W = leiter_W) AT (0,0,(L_leiter45+mono_gap)) RELATIVE leiter45 /*----------------------------------------*/ /* MONO SOURCE GENERATOR */ /* */ /* at the exit of the kollimator */ /* */ /* Records outgoing neutrons in files */ /* */ /* To be used for the downstream */ /* simulations with the "Source_file" */ /* component. */ /* */ /*----------------------------------------*/ /* COMPONENT SourceCreator = Monitor_nD(filename = "in5b_disk_source.list", options = "list all, source") AT (0,0,(L_Kolimator+0.001)) RELATIVE Kolimator */ /*----------------------------------------*/ /* MONOS - ZWEI- */ /* */ /* at sample position */ /* */ /*----------------------------------------*/ /* COMPONENT MONO_zeit2 = TOF_monitor_range(xmin = M_xmin2, xmax = M_xmax2, ymin = M_ymin2, ymax = M_ymax2, nchan = 256, tmin = Tmin2, tmax = Tmax2, filename = "mono_zeit2.dat") AT (0,0,(L_Kolimator+L_KolSample)) RELATIVE Kolimator COMPONENT MONO_ene2 = E_monitor(xmin = M_xmin2, xmax = M_xmax2, ymin = M_ymin2, ymax = M_ymax2, Emin = Emin2, Emax = Emax2, nchan = 256, filename = "mono_ene2.dat") AT (0,0,(L_Kolimator+L_KolSample+0.0005)) RELATIVE Kolimator COMPONENT MONO_div2 = Divergence_monitor(xmin = M_xmin2, xmax = M_xmax2, ymin = M_ymin2, ymax = M_ymax2, nv = 100, nh = 100, v_maxdiv = vdiv, h_maxdiv = hdiv, filename = "mono_div2.dat") AT (0,0,(L_Kolimator+L_KolSample+0.001)) RELATIVE Kolimator COMPONENT MONO_psd2 = PSD_monitor(xmin = M_xmin2, xmax = M_xmax2, ymin = M_ymin2, ymax = M_ymax2, nx = 100, ny = 100, filename = "mono_psd2.dat") AT (0,0,(L_Kolimator+L_KolSample+0.002)) RELATIVE Kolimator */ /* E2D_monitor records the (x,y,energy) psd map */ /* COMPONENT MONO_e2d2 = E2D_monitor(xmin = Sample_W_xmin, xmax = Sample_W_xmax, ymin = Sample_H_ymin, ymax = Sample_H_ymax, nh = 100, nv = 100, filename = "mono_E2D2.dat") AT (0,0,(L_Kolimator+L_KolSample+0.003)) RELATIVE Kolimator */ COMPONENT ene_sample = Monitor_nD(xmin = Sample_W_xmin, xmax = Sample_W_xmax, ymin = Sample_H_ymin, ymax = Sample_H_ymax, options="energy auto all bins=100") AT (0,0,(L_Kolimator+L_KolSample+0.003)) RELATIVE Kolimator /*-----------------------*/ /* RESOLUTION SAMPLE */ /*-----------------------*/ COMPONENT arm2 = Arm() AT (0,0,(L_Kolimator+L_KolSample+0.025)) RELATIVE Kolimator ROTATED (0,Det_angle,0) RELATIVE Kolimator COMPONENT Sample = mult_scatt_attenue_dqdw ( SQwfile = sqw_file, target_x=0, target_y=0, target_z=Det_dist, focus_r=0.05, scatt_mode=mode, nb_events=nb_scatt, r_out=r, h=h_cur, ceil=ceil_cur, sigma_abs=sig_abs, sigma_scatt = sig_scatt, V_rho= vol_rho, T=temp) AT ( 0 , 0 , 0 ) RELATIVE arm2 /*EXTEND %{ InstrVars1 = &(MC_GETPAR(Sample_num_scatt, Vars)); InstrVars1->UserVariable1 = MC_GETPAR(Sample, num_scatt); InstrVars2 = &(MC_GETPAR(Sample_num_scatt_omega, Vars)); InstrVars2->UserVariable1 = MC_GETPAR(Sample, num_scatt); InstrVars2->UserVariable2 = MC_GETPAR(Sample, dw); InstrVars3 = &(MC_GETPAR(Sample_q_omega, Vars)); InstrVars3->UserVariable1 = MC_GETPAR(Sample, dq); InstrVars3->UserVariable2 = MC_GETPAR(Sample, dw); %}*/ /* COMPONENT Sample = V_sample( radius_i=0.001,radius_o=0.01,h=0.02,focus_r=0.4, pack=1, target_x = 0, target_y = 0, target_z = Det_dist) AT ( 0 , 0 , 0 ) RELATIVE arm2 */ /* COMPONENT SAMPLE_res = R_sample(radius_i = Vana_Ri, radius_o = Vana_Ro, h = Vana_h, pack = Vana_Pack, focus_r = Vana_focus, target_x = Detector_X, target_y = Detector_Y, target_z = Detector_Z) AT (0,0,0) RELATIVE arm2 ROTATED (0,0,0) RELATIVE arm2 */ /*--------------------------------------------------*/ /* DETECTOR AFTER SAMPLE: RESOLUTION MONITOR */ /*--------------------------------------------------*/ /* COMPONENT MONO_res3 = R_monitor(filename = "Output.res", R_sample_comp = SAMPLE_res, xmin = -0.01, xmax = 0.01, ymin = -0.1, ymax = 0.1) AT (0,0,Det_dist) RELATIVE arm2 ROTATED (0,0,0) RELATIVE arm2 */ /* COMPONENT TOF_Mono0 = Monitor_nD( xwidth = 0.4, yheight = 0.4, options = "t auto, all bins=100 parallel") AT (0,0,Det_dist/4) RELATIVE arm2 COMPONENT TOF_Mono1 = Monitor_nD( xwidth = 0.4, yheight = 0.4, options = "t auto, all bins=100 parallel") AT (0,0,Det_dist/2) RELATIVE arm2 COMPONENT TOF_Mono2 = Monitor_nD( xwidth = 0.4, yheight = 0.4, options = "t auto, all bins=100 parallel") AT (0,0,Det_dist) RELATIVE arm2 */ /* COMPONENT MONO_samp_zeit0 = TOF_monitor_range(xmin = -0.1, xmax = 0.1, ymin = -0.1, ymax = 0.1, nchan = 256, tmin = 0.015, tmax = 0.025, filename = "mono_zeit0.dat") AT (0,0,0.05) RELATIVE arm2 COMPONENT MONO_samp_zeit1 = TOF_monitor_range(xmin = -1, xmax = 1, ymin = -1, ymax = 1, nchan = 256, tmin = 0.015, tmax = 0.03, filename = "mono_zeit1.dat") AT (0,0,Det_dist/2) RELATIVE arm2 */ /* COMPONENT MONO_samp_zeit = TOF_monitor_range(xmin = -0.2, xmax = 0.2, ymin = -0.2, ymax = 0.2, nchan = 256, tmin = 0.01, tmax = 0.04, filename = "mono_zeit2.dat") AT (0,0,Det_dist) RELATIVE arm2 */ COMPONENT MONO_samp_t_plan = Monitor_nD( xmin = -0.05, xmax = 0.05, ymin = -0.05, ymax = 0.05, options="t auto all bins=100 parallel") AT (0,0,Det_dist) RELATIVE arm2 COMPONENT MONO_samp_ene_plan = Monitor_nD( xmin = -0.05, xmax = 0.05, ymin = -0.05, ymax = 0.05, options="energy auto all bins=100 parallel") AT (0,0,Det_dist) RELATIVE arm2 COMPONENT MONO_samp_ene_hdiv_plan = Monitor_nD( xmin = -0.05, xmax = 0.05, ymin = -0.05, ymax = 0.05, options="hdiv auto energy auto all bins=100 parallel") AT (0,0,Det_dist) RELATIVE arm2 COMPONENT MONO_samp_t_cyl = Monitor_nD( xwidth = Det_dist - 0.1, yheight = 0.5, options="t cylinder auto all bins=100 outgoing parallel") AT (0,0,0.1) RELATIVE arm2 COMPONENT MONO_samp_ene_ban = Monitor_nD( xwidth = Det_dist - 0.1, yheight = 0.5, options="theta limits=[11,126] phi limits=[-20,20] banana all bins=100 parallel") AT (0,0,0.1) RELATIVE arm2 COMPONENT MONO_samp_ene_cyl = Monitor_nD( xwidth = Det_dist - 0.1, yheight = 0.5, options="energy cylinder auto all bins=100 parallel") AT (0,0,0.1) RELATIVE arm2 COMPONENT MONO_samp_ene_hdiv = Monitor_nD( xwidth = Det_dist - 0.1, yheight = 0.5, options="hdiv limits=[11,126] omega auto cylinder all bins=100 parallel") AT (0,0,0.1) RELATIVE arm2 COMPONENT Sample_num_scatt = Monitor_nD( xwidth = Det_dist - 0.1, yheight = 0.5, options="user1 cylinder auto all bins=100 parallel unactivate") AT (0,0,0.1) RELATIVE arm2 COMPONENT Sample_num_scatt_omega = Monitor_nD( xwidth = Det_dist - 0.1, yheight = 0.5, options="user1 user2 cylinder auto all bins=100 parallel unactivate") AT (0,0,0.1) RELATIVE arm2 COMPONENT Sample_q_omega = Monitor_nD( xwidth = Det_dist - 0.1, yheight = 0.5, options="user1 user2 cylinder auto all bins=100 parallel unactivate") AT (0,0,0.1) RELATIVE arm2 END