- Timestamp:
- 01/26/12 21:07:20 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/mcxtrace-1.0/xlib/monitors/Monitor_nD.comp
r3291 r3292 195 195 * username2: [str] Name assigned to User2 196 196 * username3: [str] Name assigned to User3 197 * restore_ neutron: [0|1] If set, the monitor does not influence the neutron state.197 * restore_xray: [0|1] If set, the monitor does not influence the neutron state. 198 198 * Equivalent to setting the 'parallel' option. 199 199 * geometry: [str] Name of an OFF file to specify a complex geometry detector … … 212 212 DEFINITION PARAMETERS (string options=0, string filename=0,string geometry=0, 213 213 user1=FLT_MAX, user2=FLT_MAX, user3=FLT_MAX, username1=0, username2=0,username3=0) 214 SETTING PARAMETERS (xwidth=0, yheight=0, zdepth=0, xmin=0, xmax=0, ymin=0, ymax=0, zmin=0, zmax=0, bins=0, min=-1e40, max=1e40, restore_ neutron=0, radius=0)214 SETTING PARAMETERS (xwidth=0, yheight=0, zdepth=0, xmin=0, xmax=0, ymin=0, ymax=0, zmin=0, zmax=0, bins=0, min=-1e40, max=1e40, restore_xray=0, radius=0) 215 215 /* these are protected C variables */ 216 216 OUTPUT PARAMETERS (DEFS, Vars, detector) … … 346 346 || (geometry && strlen(geometry)) ) 347 347 { 348 if ( t0 < 0 && t1 > 0)349 t0 = t; /* neutron was already inside ! */350 if ( t1 < 0 && t0 > 0) /* neutron exit before entering !! */351 t1 = l;348 if (l0 < 0 && l1 > 0) 349 l0 = 0; /* photon was already inside ! */ 350 if (l1 < 0 && l0 > 0) /* photon exit before entering !! */ 351 l1 = 0; 352 352 /* t0 is now time of incoming intersection with the sphere. */ 353 if ((Vars.Flag_Shape < 0) && ( t1 > 0))354 PROP_DL(l1); /* t1 outgoing beam */353 if ((Vars.Flag_Shape < 0) && (l1 > 0)) 354 PROP_DL(l1); /* l1 outgoing beam */ 355 355 else 356 PROP_DL(l0); /* t0 incoming beam */356 PROP_DL(l0); /* l0 incoming beam */ 357 357 } 358 358 … … 375 375 376 376 /*this is probably irrelevant for xrays*/ 377 if ((Vars.He3_pressure > 0) && (t1 != t0) && ((abs(Vars.Flag_Shape) == DEFS.SHAPE_SPHERE) || (abs(Vars.Flag_Shape) == DEFS.SHAPE_CYLIND) || (abs(Vars.Flag_Shape) == DEFS.SHAPE_BOX)))378 {379 XY = exp(-7.417*Vars.He3_pressure*fabs(t1-t0)*2*PI*K2V);377 // if ((Vars.He3_pressure > 0) && (l1 != l0) && ((abs(Vars.Flag_Shape) == DEFS.SHAPE_SPHERE) || (abs(Vars.Flag_Shape) == DEFS.SHAPE_CYLIND) || (abs(Vars.Flag_Shape) == DEFS.SHAPE_BOX))) 378 // { 379 // XY = exp(-7.417*Vars.He3_pressure*fabs(l1-l0)*2*PI*K2V); 380 380 /* will monitor the absorbed part */ 381 Vars.cp *= 1-XY;381 // Vars.cp *= 1-XY; 382 382 /* and modify the neutron weight after monitor, only remains 1-p_detect */ 383 p *= XY;384 }383 // p *= XY; 384 // } 385 385 386 386 /*this is probably irrelevant for xrays*/ 387 if (Vars.Flag_capture)388 {389 XY = sqrt(Vars.cvx*Vars.cvx+Vars.cvy*Vars.cvy+Vars.cvz*Vars.cvz);390 XY *= V2K;391 if (XY != 0) XY = 2*PI/XY; /* lambda. lambda(2200 m/2) = 1.7985 Angs */392 Vars.cp *= XY/1.7985;393 }387 // if (Vars.Flag_capture) 388 // { 389 // XY = sqrt(Vars.cvx*Vars.cvx+Vars.cvy*Vars.cvy+Vars.cvz*Vars.cvz); 390 // XY *= V2K; 391 // if (XY != 0) XY = 2*PI/XY; /* lambda. lambda(2200 m/2) = 1.7985 Angs */ 392 // Vars.cp *= XY/1.7985; 393 // } 394 394 395 395 pp = Monitor_nD_Trace(&DEFS, &Vars);
