Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

mappings.hpp

Go to the documentation of this file.
00001 /*
00002  * ******** fete: From ENDF To ENDL *********
00003  * 
00004  * Copyright (c) 2006, The Regents of the University of California. 
00005  * All rights reserved.
00006  * 
00007  * Produced at the Lawrence Livermore National Laboratory. 
00008  * Written by David A. Brown, Gerry Hedstrom, Tony Hill
00009  * 
00010  * This file is part of fete v1.0  (UCRL-CODE-218718)
00011  * 
00012  * Please read the COPYING file for "Our Notice and GNU General 
00013  * Public License" in the root of this software distribution.  
00014  * 
00015  * This program is free software; you can redistribute it and/or modify 
00016  * it under the terms of the GNU General Public License (as published by 
00017  * the Free Software Foundation) version 2, dated June 1991. 
00018  * 
00019  * This program is distributed in the hope that it will be useful, 
00020  * but WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF 
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms 
00022  * and conditions of the GNU General Public License for more details. 
00023  * 
00024  * You should have received a copy of the GNU General Public License along 
00025  * with this program; if not, write to the Free Software Foundation, Inc., 
00026  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
00027  * 
00028  * $Revision: 1735 $
00029  * $Date: 2006-02-09 13:47:26 -0800 (Thu, 09 Feb 2006) $
00030  * $Author: dbrown $
00031  * $Id: mappings.hpp 1735 2006-02-09 21:47:26Z dbrown $
00032  * 
00033  * ******** fete: From ENDF To ENDL *********
00034  */
00035 
00036 // header for the mappings class
00037 
00038 #ifndef DEF_MAPPINGS
00039 #define DEF_MAPPINGS
00040 
00041 #include <cmath>
00042 
00043 #include "nuclei.hpp"
00044 
00045 // ----------- Pair class for E-mu structure --------------
00046 // energy and cosine
00047 //! Stores energy and direction cosine pair used in reference frame mapping
00048 class Pair
00049 {
00050 public:
00051   double E;       //  energy of ejected particle
00052   double mu;      //  direction cosine
00053 
00054   //! Default constructor
00055   Pair();
00056   //! Specific pair constructor
00057   Pair(double energy, double cosine);
00058   //! Default destructor
00059   ~Pair();
00060 };
00061 
00062 //! Returns A - B
00063 Pair operator-(const Pair& A, const Pair& B);
00064 
00065 //! Returns area of the triangle generated by A, B, and O
00066 double Pair_area(const Pair& A, const Pair& B);
00067 
00068 // ----------- class mappings -----------------
00069 //! Class that maps energy-angle pairs between reference frames
00070 class mappings
00071 {
00072 private:
00073   // pointers to the particles
00074   Target *_target;   
00075   Projectile *_projectile;
00076   Product *_ejectum;   
00077 
00078   double _E_in;  // energy of the incident particle
00079 
00080 public:
00081   double E_transl;     // translational energy from initial collision
00082 
00083   //! Default constructor
00084   mappings( );
00085 
00086   //! Constructor with particle data
00087   mappings(Target *target, Projectile *projectile,
00088     Product *ejectum, double E_in);
00089 
00090   //! Default destructor
00091   ~mappings();
00092 
00093   //! Set the particle data
00094   void set_map(Target *target, Projectile *projectile,
00095     Product *ejectum, double E_in);
00096 
00097   //! Maps from lab frame to center-of-mass
00098   Pair lab_to_cm(Pair& lab);
00099 
00100   //! Maps from center-of-mass to lab
00101   Pair cm_to_lab(Pair& cm);
00102 
00103   //! Jacobian of the mapping
00104   double J_cm_to_lab( double E_cm, double E_lab );
00105 
00106   //! Returns the minimal cosine (lab frame) for this exit energy
00107   double get_min_mu(double E_cm);
00108 
00109   //! Calculates the lab frame exit energy extremes
00110   void get_E_range(double E_cm, double mu, double *E_back,
00111     double *E_ahead);
00112   // Return the lab frame exit energies for given center-of-mass exit
00113   // energy and lab angle mu.
00114   // If there are 2 such energies, the smaller one is E_back.
00115   // If there is only 1, it is E_ahead and E_back = -1.
00116   // If there are none, then both E_ahead and E_back are set to -1.
00117 
00118   //! Calculates the lab energy for given c-m energy and lab mu
00119   double get_lab_E( double E_cm, double mu_lab, int signum );
00120   // signum designates the sign of the square root.
00121 };
00122 
00123 #endif
00124 

Generated on Thu Sep 7 10:30:07 2006 for fete -- From ENDFB6 To ENDL by doxygen 1.3.4