*$ CREATE CMEMFL.ADD *COPY CMEMFL * *=== Cmemfl ===========================================================* * *----------------------------------------------------------------------* * * * Partial (all additions wrt the original one) * * Copyright (C) 1992-2010 by Alfredo Ferrari * * All Rights Reserved. * * * * * * CoMmon for ElectroMagnetic FieLds: * * * * Created on 16 January 1992 by Alfredo Ferrari in substitution of * * the old Magpar in order to include electric fields and crystal * * channeling * * * * Last change on 17-Oct-10 by Alfredo Ferrari * * * * Description of variables: * * Bifuni = strength of a possibly uniform magnetic field (Tesla)* * Umgfld = x-axis unit vector component of a possibly uniform * * magnetic field * * Vmgfld = y-axis unit vector component of a possibly uniform * * magnetic field * * Wmgfld = z-axis unit vector component of a possibly uniform * * magnetic field * * Elfuni = strength of a possibly uniform electric field * * (kV/cm=MV/m) * * Uelfld = x-axis unit vector component of a possibly uniform * * electric field * * Velfld = y-axis unit vector component of a possibly uniform * * electric field * * Welfld = z-axis unit vector component of a possibly uniform * * electric field * * Bifcur = current strength of the magnetic field (Tesla) * * Umgcur = x-axis unit vector component of the current * * magnetic field * * Vmgcur = y-axis unit vector component of the current * * magnetic field * * Wmgcur = z-axis unit vector component of the current * * magnetic field * * Elfcur = strength of the current electric field (kV/cm=MV/m) * * Uelcur = x-axis unit vector component of the current * * electric field * * Velcur = y-axis unit vector component of the current * * electric field * * Welcur = z-axis unit vector component of the current * * electric field * * Delfld = maximum tolerable error of the boundary iteration * * both for electric/magnetic transport (cm) * * Anglmg = biggest angle that particle is allowed to travel * * in the magnetic field (deg) * * Dstpmg = guarantees that step is not forced to be too small. * * (if suggested angle is too big, magnetic only) * * Rkrfra = max. fraction of a 2 pi angle allowed for a single * * Runge-Kutta step in magnetic field * * Dmgfrk = maximum step length with magnetic field if Runge- * * -Kutta integration is selected, used only in zones of* * zero local field * * Delfrk = maximum step length with electric field for Runge- * * -Kutta integration * * Denelf = energy gained or lost in the electric field * * Lfmgel = flag for first time initialization * * Lrkuti = flag for selecting Runge-Kutta integration for an * * inhomogeneous magnetic field and no electric field * * Runge-Kutta is always selected if an electric field * * is present. * * Direct constant radius tracking is always selected * * only if an homogeneous magnetic field is present * * Lmgmap = flag for inhomogeneous magnetic field * * Lelmap = flag for inhomogeneous electric field * * Lmgfon(j,k) = flag for magnetic field presence for the j_th region * * for prompt (=1) or radioactive decay (=2) particles * * Lelfon(j,k) = flag for electric field presence for the j_th region * * for prompt (=1) or radioactive decay (=2) particles * * Icryon(j,k) = flag for crystal and channeling for the j_th region * * for prompt (=1) or radioactive decay (=2) particles * * If > 0 it is the index of the crystal corresponding * * to that region * * * *----------------------------------------------------------------------* * LOGICAL LMGFON, LELFON, LFMGEL, LRKUTI, LMGFLD, LELFLD, LMGMAP, & LELMAP, LRKUTT COMMON / CMEMFL / BIFUNI, ELFUNI, BIFCUR, ELFCUR, UMGFLD, VMGFLD, & WMGFLD, UMGCUR, VMGCUR, WMGCUR, UELFLD, VELFLD, & WELFLD, UELCUR, VELCUR, WELCUR, DELFLD, ANGLMG, & DSTPMG, RKRFRA, DMGFRK, DELFRK, DEL000, ONMCTH, & ANGLRK, ONMCRK, DMINMN, DENELF, LFMGEL, LRKUTI, & LMGFLD, LELFLD, LMGMAP, LELMAP, LRKUTT, & LMGFON (MXXRGN,2), LELFON (MXXRGN,2), & ICRYON (MXXRGN,2) SAVE / CMEMFL /