{
 "metadata": {
  "name": "",
  "signature": "sha256:668c298765bba9905fefea9659759a81124dfb9392cdf43960f9b6f3b63d97ec"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 7: Radiation Detectors"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.2.1, Page 308"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "E_p = 30.; # Energy required for one pair, eV\n",
      "n = 150000; # Number of pairs \n",
      "\n",
      "#Calculations\n",
      "E_a = n*E_p/10**6; # Energy of alpha particle, Mev\n",
      "\n",
      "#Result\n",
      "print \"The energy of alpha particle  : %3.1f Mev\"%E_a\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The energy of alpha particle  : 4.5 Mev\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.3.1, Page 308"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "E = 5.48e+06; # Energy of alpha particle, eV\n",
      "C = 50e-012; # Capacitance of the chamber, F\n",
      "R = 10**6; # Resistance, ohm\n",
      "E_p = 35; # Energy required to produced an ion pair, eV\n",
      "\n",
      "#Calculations\n",
      "n = E/E_p; # Number of ion pair produced\n",
      "e = 1.6e-019; # Charge of an electron, C\n",
      "V =( n*e)/C; # Pulse height, V\n",
      "I = V/R; # current produced, A\n",
      "\n",
      "#Results \n",
      "print \"The pulse height  =  %4.3e V \\n Current produced  = %5.3e A\"%(V,I) \n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The pulse height  =  5.010e-04 V \n",
        " Current produced  = 5.010e-10 A\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.3.2, Page 309"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "E_p = 35.; # Energy required to produced an ion pair, eV\n",
      "n = 10**5; # Number of ion pair produced\n",
      "e = 1.6e-019; # Charge of an electron, C\n",
      "\n",
      "#Calculations\n",
      "E_k = E_p*n/10**6; # Kinetic energy of the proton, MeV\n",
      "A = n*e; # The amount of charge collected on each plate, C \n",
      "\n",
      "#Results \n",
      "print \"The kinetic energy of the proton = %3.1f MeV \\n The amount of charge collected on each plate =  %3.1e C \"%(E_k,A)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The kinetic energy of the proton = 3.5 MeV \n",
        " The amount of charge collected on each plate =  1.6e-14 C \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.4.1, Page 310"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "E_p = 30; # Energy required to produced an ion pair, eV\n",
      "M = 1000; # Multiplication factor \n",
      "e = 1.6e-019; # Charge of an electron, C\n",
      "t = 10**-3; # Time, s\n",
      "R = 10**5; # Resistance, ohm\n",
      "E_k = 20*10**6; # Kinetic energy of the proton, eV\n",
      "\n",
      "#Calculations \n",
      "n = E_k/E_p; # Number of ion pairs produced\n",
      "n_a = n*M; # Number of ion-pair after multiplication\n",
      "Q = n_a*e; # Charge carried by these ion, C \n",
      "I = Q/t; #  The current through 100-ohm resistance, A\n",
      "A = I*R; # ,The amplitude of voltage pulse, V \n",
      "\n",
      "#Results\n",
      "print \"The current through 100-ohm resistance = %6.4e A \\n The amplitude of voltage pulse = %6.4e V \"%(I, A)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The current through 100-ohm resistance = 1.0667e-07 A \n",
        " The amplitude of voltage pulse = 1.0667e-02 V \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.4.2, Page 310"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "V = 1500; # Potential difference, V\n",
      "a = 0.0001; # Radius of the wire, m\n",
      "b = 0.02; # Radius of the cylinderical tube, m\n",
      "r = 0.0001; # Distance of electric field from the surface, m\n",
      "\n",
      "#Calculations \n",
      "E_r = V/(r*math.log(b/a)); # the electric field at the surface, V/m \n",
      "\n",
      "#Result\n",
      "print \"The electric field at the surface : %4.2e V/m\"%E_r"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electric field at the surface : 2.83e+06 V/m\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.5.1, Page 311"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "V = 2000; # Potential difference, V\n",
      "a = 0.01; # Radius of the wire, cm\n",
      "b = 2; # Radius of the cylinderical tube, cm\n",
      "r = 0.01; # Radius of the wire, m\n",
      "\n",
      "#Calculations \n",
      "E_r = V/(r*math.log(b/a)); # the electric field at the surface, V/m \n",
      "\n",
      "#Result\n",
      "print \"The electric field at the surface : %d V/cm\"%E_r"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electric field at the surface : 37747 V/cm\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.5.2, Page 312"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "n_t = 10.0**9; # Total number of counts \n",
      "n_d = 2000*3*60; # Count recorded per day\n",
      "\n",
      "#Calculations\n",
      "n_y = n_d*365; # Counts recorded in 365-days\n",
      "t = n_t/n_y; # The life of G.M. counter, year\n",
      "\n",
      "#Result\n",
      "print \"The life of G.M. counter : %4.2f year\"%t"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The life of G.M. counter : 7.61 year\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.5.3, Page 312"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "E_p = 30; # Energy required for one electron pair, eV\n",
      "E = 10e+06 ; # Energy lost by alpha particle, eV\n",
      "n = E/E_p; # Number of ion-pairs produced\n",
      "M = 5000; # Multiplication factor\n",
      "C = 50e-012; # Capacitance, F\n",
      "\n",
      "#Calculations \n",
      "n_M = n*M; # Number of ion-pairs after multiplication\n",
      "e = 1.6e-019; # Charge of an electron, C\n",
      "Q = n_M*e; # Charge present in each ion\n",
      "A = Q/C; # Amplitude of voltage pulse, V\n",
      "\n",
      "#Result\n",
      "print \"Amplitude of voltage pulse : %3.1f V\"%A"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Amplitude of voltage pulse : 5.3 V\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.5.4, Page 312"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "n = 30000; # Count per minute \n",
      "n_o = n/60; # Observed count rate, count/s\n",
      "t = 2e-04; # Dead time, s \n",
      "\n",
      "#Calculations \n",
      "n_t = round(n_o/(1-n_o*t)); # The true count rate, count/s\n",
      "\n",
      "#Result\n",
      "print \"The true count rate : %d counts/s\"%n_t"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The true count rate : 556 counts/s\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.6.1, Page 313"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration&Calculations\n",
      "# For 511 KeV gamma rays (for channel first)\n",
      "F_W_H_M_1 = 97.; #  Frequency width at half maximum for channel first\n",
      "P_pos_1 = 1202.; # Peak position for channel first\n",
      "Res_KeV_1 = F_W_H_M_1/P_pos_1*511; # Resolution in KeV for channel first\n",
      "# For 1275 KeV gamma rays (for channel second) \n",
      "F_W_H_M_2 = 82.; # Frequency width at half maximum for channel second\n",
      "P_pos_2 =  1202.; # Peak position for channel second\n",
      "Res_KeV_2 = round(F_W_H_M_2/P_pos_2*1275); # Resolution in KeV for channel second\n",
      "\n",
      "#Results \n",
      "print \"Resolution  for channel first  = %d KeV  \\n Resolution  for channel second  = %d KeV \"%(Res_KeV_1, Res_KeV_2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resolution  for channel first  = 41 KeV  \n",
        " Resolution  for channel second  = 87 KeV \n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.6.2, Page 314"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "e = 1.6e-019; # Charge of an electron, C\n",
      "n = 4.2e+08; # Number of photoelectrons\n",
      "C = 200e-012; # Capacitance, F\n",
      "\n",
      "#Calculations\n",
      "A = n*e/C; # Amplitude of output voltage pulse, V\n",
      "\n",
      "#Result\n",
      "print \"Amplitude of output voltage pulse : %4.2f V \"%A"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Amplitude of output voltage pulse : 0.34 V \n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.6.3, Page 315"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "F_W_H_M = 0.72; # Full width at half maximum, V\n",
      "P_p = 6.0; # Peak position, V\n",
      "E = 662; # Energy of photopeak, KeV\n",
      "\n",
      "#Calculations\n",
      "per_resolution = F_W_H_M/P_p*100; # Percentage resolution in percent\n",
      "Res_KeV = per_resolution/100*E; # Resolution in KeV for Cs-137\n",
      "\n",
      "#Results\n",
      "print \"The percentage resolution = %d percent \\n Resolution in KeV  = %4.1f KeV  \"%(per_resolution, Res_KeV)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The percentage resolution = 12 percent \n",
        " Resolution in KeV  = 79.4 KeV  \n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.7.1, Page 316"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "E_r = 12; # Relative permittivity \n",
      "E_o = 8.85e-012; # Permittivity of free space\n",
      "E = E_r*E_o; # Absolute dielectric constant\n",
      "C = 100e-012; # Capacitance of the dielectric, F\n",
      "A = 1.6e-04; # Area of the detector, m^2\n",
      "e = 1.602e-019; # Charge of an electrin, C\n",
      "E_p = 3.2; # Energy required to create an ion pair, eV\n",
      "E_s = 12e+06; # Energy required to stopped ion pair, eV\n",
      "\n",
      "#Calculations\n",
      "n = E_s/E_p; # Number of ion-pair produced\n",
      "Q = n*e; # Charge of these ion pair, C\n",
      "d = A*E/(C*10**-6); # The thickness of the depletion layer, micron\n",
      "A = Q/C*1000; # The amplitude of voltage pulse, mV\n",
      "\n",
      "#Results\n",
      "print \"The thickness of the depletion layer = %d micron \\n  The amplitude of voltage pulse: = %6.4f mV  \"%(d, A)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The thickness of the depletion layer = 169 micron \n",
        "  The amplitude of voltage pulse: = 6.0075 mV  \n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7.7.2, Page 316"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "E_r = 12; # Relative permittivity \n",
      "E_o = 8.85e-012; # Permittivity of free space\n",
      "E = E_r*E_o; # Absolute dielectric constant\n",
      "A = 2e-04; # Area of the detector, m^2\n",
      "e = 1.602e-019; # Charge of an electron, C\n",
      "d = 100e-06; # The thickness of the depletion layer, m\n",
      "E_p = 3.0; # Energy required to create an ion pair, eV\n",
      "E_s = 5.48e+06; # Energy required to stopped ion pair, eV\n",
      "\n",
      "#Calculations\n",
      "C = E*A/d; # The capacitance of the dielectric, F\n",
      "n = E_s/E_p; # Number of ion-pair produced\n",
      "Q = n*e; # Charge of these ion pair, C\n",
      "A = Q/C*1000; # The amplitude of voltage pulse, mV\n",
      "\n",
      "#Results\n",
      "print \"The capacitance of dielectric = %5.3e F \\n The amplitude of voltage pulse = %5.3f mV\"%(C, A)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The capacitance of dielectric = 2.124e-10 F \n",
        " The amplitude of voltage pulse = 1.378 mV\n"
       ]
      }
     ],
     "prompt_number": 14
    }
   ],
   "metadata": {}
  }
 ]
}