#!/bin/csh -f
#
#      to make an executable  for  generating data
#      to  draw brems function in
#      an arbitrary energy region.
#
echoErr  "This will make an executable, drawbrems[1,3].out,  which produces "
echoErr  "         k, xf, f, Ee     on the standard output "
echoErr  "where:"
echoErr  "         Ee:   electron total energy (GeV)"
echoErr  "         k :   Eg/Ek (Ek: electron kinetic energy)"
echoErr  "                     (Eg: photon energy) "
echoErr  "         x :   Eg/Ee "
echoErr  "         f :   dsigma/dx "
echoErr  "    in various units. "
echoErr  " "
echoErr  "  Output from the executable you are now making "
echoErr  "  will depend on the next choice only when "
echoErr  "  the energy region is intermediate: "
echoErr  "  100 MeV<  Ee  < 150/Z**3 GeV (=rough value) "
echoErr  "  In other energy region, you will get the same"
echoErr  "  result indepenent of the choice "
echoErr  " "
echoErr " For intermidiate energy Bremsstrahlung, you must choose"
echoErr "  1) Tsai's formula  "  
echoErr     or
echoErr "  3) Corrected  Messel and Crawford formula"
echoErr " "
echoErr "Enter 1) or 3)."
echoErr " "
     set brems=$<
echoErr "Your choice is" $brems
     if( x$brems == x1 ||  x$brems == x3) then
	echoErr " "
     else
	echoErr "It's invalid"
	exit 1
     endif		
make  -f  DrawBremsFunc$brems.mk
if(-f drawbrems$brems.out) then
        echoErr  " " 
        echoErr  "drawbrems$brems.out  has been made."
        echoErr  "you may use this, say, as "
	echoErr  "drawbrems$brems.out > /tmp/data"
else	
    echoErr "executable drawbrems$brems.out not yet made"
    exit 1
endif




