G4WilsonRadius.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // *                                                                  *
00021 // * Parts of this code which have been  developed by QinetiQ Ltd     *
00022 // * under contract to the European Space Agency (ESA) are the        *
00023 // * intellectual property of ESA. Rights to use, copy, modify and    *
00024 // * redistribute this software for general public use are granted    *
00025 // * in compliance with any licensing, distribution and development   *
00026 // * policy adopted by the Geant4 Collaboration. This code has been   *
00027 // * written by QinetiQ Ltd for the European Space Agency, under ESA  *
00028 // * contract 17191/03/NL/LvH (Aurora Programme).                     *
00029 // *                                                                  *
00030 // * By using,  copying,  modifying or  distributing the software (or *
00031 // * any work based  on the software)  you  agree  to acknowledge its *
00032 // * use  in  resulting  scientific  publications,  and indicate your *
00033 // * acceptance of all terms of the Geant4 Software license.          *
00034 // ********************************************************************
00035 //
00036 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00037 //
00038 // MODULE:              G4WilsonRadius.cc
00039 //
00040 // Version:             B.1
00041 // Date:                15/04/04
00042 // Author:              P R Truscott
00043 // Organisation:        QinetiQ Ltd, UK
00044 // Customer:            ESA/ESTEC, NOORDWIJK
00045 // Contract:            17191/03/NL/LvH
00046 //
00047 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00048 //
00049 // CHANGE HISTORY
00050 // --------------
00051 //
00052 // 6 October 2003, P R Truscott, QinetiQ Ltd, UK
00053 // Created.
00054 //
00055 // 15 March 2004, P R Truscott, QinetiQ Ltd, UK
00056 // Beta release
00057 //
00058 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00059 //
00061 //
00062 #include "G4WilsonRadius.hh"
00063 #include "G4SystemOfUnits.hh"
00064 
00066 //
00067 G4WilsonRadius::G4WilsonRadius ()
00068 {
00069   G4double r0 = 0.84*fermi;
00070   r0sq        = r0 * r0;
00071   factor      = std::sqrt(5.0/3.0) * fermi;
00072   third       = 1.0 / 3.0;
00073 }
00075 //
00076 G4WilsonRadius::~G4WilsonRadius ()
00077 {;}
00079 //
00080 G4double G4WilsonRadius::GetWilsonRMSRadius (G4double A)
00081 {
00082   G4double radius;
00083   if (A > 26.0)
00084     radius = factor * (0.84*std::pow(A,third) + 0.55);
00085   else
00086   {
00087         // this was changed from just G4double to static const G4double
00088         // to make sure that time wasn't being wasted on every call reloading a stack variable
00089         // by MHM 20050119
00090     static const G4double r[27] = {0.0, 0.85,  2.095, 1.976, 1.671, 1.986,
00091                            2.57,  2.41,  2.23,  2.519, 2.45,
00092                            2.42,  2.471, 2.440, 2.58,  2.611,
00093                            2.730, 2.662, 2.727, 2.9,   3.040,
00094                            2.867, 2.969, 2.94,  3.075, 3.11,
00095                            3.06};
00096     radius = factor * r[(G4int) (A+0.4)];
00097   }
00098   return radius;
00099 }
00101 //
00102 G4double G4WilsonRadius::GetWilsonRadius (G4double A)
00103 {
00104   G4double r  = GetWilsonRMSRadius(A);
00105   return  1.29*std::sqrt(r*r-r0sq);
00106 }
00108 //

Generated on Mon May 27 17:50:25 2013 for Geant4 by  doxygen 1.4.7