Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

EGS.h

Go to the documentation of this file.
00001 // -*- C++ -*-  $Id: EGS.h,v 1.1 2000/09/01 20:20:13 burnett Exp $
00002 //
00003 // This file is part of Gismo 2
00004 
00005 
00006 // Contents ----------------------------------------------------------------
00007 //
00008 //      EGS
00009 //
00010 // Description
00011 //
00012 //      class EGS encapsulates the particle list and interactions
00013 //
00014 // End --------------------------------------------------------------------
00015 
00016 #ifndef __EGS_H
00017 #define __EGS_H
00018 
00019 #ifdef _MSC_VER
00020 # pragma warning(disable:4305) //truncation from 'const double' to 'float'
00021 #endif
00022 
00023 class PEGSData;
00024 #include <iostream>
00025 
00026 class EGS   // corresponds to the EGS4 particle stack
00027 {
00028 public:
00029     int   iq;    // charge (-1,0,1) for (electron, photon, positron)
00030     float e;     // energy in MeV
00031     float u,v,w; // direction unit vector
00032     float x,y,z; // position in dunit units
00033     EGS*  prev;  // back link
00034     EGS*  next;  // foward link
00035     
00036     EGS(EGS* tos=0);    // constructor
00037     virtual ~EGS();     // destructor
00038     
00039     void interact(const PEGSData&);         // interact in the material
00040     void mscat(float,const  PEGSData&);      // apply multiple scattering
00041     
00042     void printOn(std::ostream&);
00043     
00044 public:
00045     // these member functions used by interact and mscats
00046 
00047     // rotate by angles
00048     void rotate(double costhe, double phi);
00049     void rotate(double costhe, double phi, double sinthe); // this form when sinth known, and small
00050 
00051     
00052     virtual void  brems(const PEGSData&);
00053     virtual void  pairProd(const PEGSData&);
00054     virtual void  annih();
00055     virtual void  moller(const PEGSData&);
00056     virtual void  compt();
00057     virtual void  bhabha(const PEGSData&);
00058     virtual void  photo(const PEGSData&);
00059     virtual void  rayleigh(const PEGSData &m );
00060     
00061     
00062     // static data used by above routines
00063     
00064 public:
00065     static double rm;           // electron mass in MeV
00066     static double rm2;      // accuarately
00067     static double rmsq;       // square of electron mass
00068     
00069 };
00070 #endif
00071 

Generated at Mon Nov 26 18:18:32 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000