Readme of Cosmos.



What is Cosmos?
 
  Cosmos is a subroutine package (it includes the main program, too) that
enables the user to simulate the cosmic ray
propagation in the atmosphere of the Earth. (It will be quite easy to remake this
code to cope with another spherical media with a nonspherical magnetic field.  
Why don't you try it for a neutron star environment ?)  

  The applicable region is quite wide: From the low energy atmospheric neutrino
phenomena taking the muon polarization and stopping muon into account To very
high energy air shower generation where the magnetic bremshtralung and pair
creation come into question.  

  In normal applications, the only thing the user must do is to supply a user 
hook and compile it to link them  with a given Cosmos library. 
The main task of the user hook is to write a code for getting
desired output. A template is available in UserHook as chook.f	
and may be used for a variety of purposes with  simple modifications.

  The details of the installation procedure is described in man.ps.
We note here that to be able to install Cosmos, a Fortran77 compiler with
some extensions or Fortran 90 compiler is needed. The C preprocessor, cpp, is
also a indispensable tool.
 
 At present we confirmed the following platforms on which Cosmos can run.
 
HP9000 with HP Fortran.
sun4   with sun Fortran.
NeXT   with Absoft Fortran.

The DEC workstation with DEC Fortran should work.  Although the use of 
main frames  is out of scope, it will be possible to generate a source 
code compilable on a main frame by putting the all programs into one
file where all include files are expanded. 

 The reason why we used  extensions to Fortran77 is to enjoy the OOP atmosphere
to some extent.  Although the code is far from the true OOP, its reliability,
easiness for development, maintenance and future extension are much more
increased as compared to the older main frame versions.  The Fortran extensions
employed are compatible with Fortran 90 and included in  almost all current
Fortran 77 compilers.  They are

1)  use of structure, union, map  and record ( != native Fortran's) 
2)  use of implicit none
3)  use of do while/enddo
4)  use of do/enddo without statement number
5)  use of namelist data i/o
6)  use of ! for starting a comment string

  The use of cpp is mainly to employ #include directive. They  could be managed by
the fortran include statement or a platform dependent include. However, the
directory pass specification for Fortran include file is  not so flexible as
for cpp and is platform dependent in some case. 
The cpp # directives have no platform dependence, and more over,
the platform dependent source code can be managed by the cpp # directives. 
For this purpose, a script is prepared for the compilation of the programs.
 
  The decision of using Fortran 77 with the extensions would be reasonable 
since many of the user are still familiar with only Fortran.  However, younger 
generation is more fond of C, though many are not familiar with  Objective-C
, C++ nor OOP.  We expect this situation will be improved gradually.
We will convert this Cosmos code into C++ (g++ actually) code to be able 
to enjoy full OOP programming power and to put it on the same field as GISMO 
(a detector simulation code developed in SLAC by Bill Atwood et. al: We will
use the same basic classes as GISMO does).


All details are given in man.ps.  


Although this software is free, you are requested to send mail to
the author (kasahara@cpnx2.b6.kanagawa-u.ac.jp), if you use this.
Please refer it when you publish an article which uses Cosmos.
There is absolutely NO WARRANTY for this software.
Your mail address is important for further communications.

Have a fun.

K.Kasahara


