| 59 | |

| 60 | {{{#!fortran |

| 61 | C LIMITING FACTOR FOR STEP SIZE OF ELECTRON IN MAGNETIC FIELD |

| 62 | #if __CERENKOV__ && __IACT__ |

| 63 | C LIMIT IN DEFLECTION ANGLE IS 2.5 MILLIRADIAN = 0.143 DEG |

| 64 | C WE USE A LIMIT OF ABOUT 0.05 DEG (APPROX. 1 MILLIRAD) |

| 65 | BLIMIT = 0.001D0 / BNORM |

| 66 | #else |

| 67 | C WE USE A LIMIT OF ABOUT 11.4 DEG (0.2 RAD) |

| 68 | BLIMIT = 0.2D0 / BNORM |

| 69 | #endif |

| 70 | }}} |

| 71 | |

| 72 | {{{#!fortran |

| 73 | #if __CERENKOV__ && __IACT__ |

| 74 | C SCATTERING ANGLES OF MUONS SHOULD BE SMALLER THAN THE PIXEL SIZE. |

| 75 | * AUX = MIN( 1.D0, 0.015D0*GAMMA ) |

| 76 | C THE SAME SHOULD HOLD FOR DEFLECTION IN THE GEOMAGNETIC FIELD. |

| 77 | C HERE USING A MAXIMUM RMS SCATTERING / DEFLECTION ANGLE OF 0.05 DEG |

| 78 | C AND APPROXIMATE ALL BETA*GAMMA TERMS BY GAMMA. |

| 79 | Cxx Write(*,*) 'mu step old-style step=',MIN( 1.D0,0.015D0*GAMMA ) |

| 80 | C FOR A MEAN SCATTERING ANGLE THETA WE HAVE A STEP LENGTH OF ABOUT |

| 81 | C (THETA / (13.6 MEV/(BETA*C*P))**2 RADIATION LENGTHS (PDG), |

| 82 | C NOT TAKING INTO ACCOUNT THE NON-GAUSSIAN PART OF THE DISTIBUTION. |

| 83 | C FOR THE MOMENT DON''T CARE ABOUT THE DIFFERENCE BETWEEN THE |

| 84 | C 'COULOMB SCATTERING LENGTH' 37.7 G/CM**2 (=C(21)) AND THE |

| 85 | C RADIATION LENGTH OF 36.66 OR 36.62 G/CM**2 IN AIR. |

| 86 | C NOTE: PI/180/(13.6 MEV/(BETA*C*P)) APPROX 0.136*GAMMA FOR MUONS. |

| 87 | AUX = MIN( 1.D0, ((0.05*0.136)*GAMMA)**2 ) |

| 88 | IF ( BNORMC .GT. 0.D0 ) THEN |

| 89 | C NOTE: PI/180*PAMA(5)*BETA*GAMMA APPROX 0.00185*GAMMA |

| 90 | AUX = MIN( AUX, (0.05*0.00185)*GAMMA*RHOF(H)/(BNORMC*C(21)) ) |

| 91 | ENDIF |

| 92 | Cxx Write(*,*) 'mu step new-style step=',AUX |

| 93 | #else |

| 94 | AUX = MIN( 10.D0, 0.015D0*GAMMA ) |

| 95 | #endif |

| 96 | }}} |