G4LLNLFission.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 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // This software was developed by Lawrence Livermore National Laboratory.
00028 //
00029 // Redistribution and use in source and binary forms, with or without
00030 // modification, are permitted provided that the following conditions are met:
00031 //
00032 // 1. Redistributions of source code must retain the above copyright notice,
00033 //   this list of conditions and the following disclaimer.
00034 // 2. Redistributions in binary form must reproduce the above copyright notice,
00035 //   this list of conditions and the following disclaimer in the documentation
00036 //   and/or other materials provided with the distribution.
00037 // 3. The name of the author may not be used to endorse or promote products
00038 //   derived from this software without specific prior written permission.
00039 //
00040 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
00041 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00042 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
00043 // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00044 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00045 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00046 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00047 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00048 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
00049 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00050 //
00051 // Copyright (c) 2006 The Regents of the University of California.
00052 // All rights reserved.
00053 // UCRL-CODE-224807
00054 //
00055 //
00056 // $Id: G4LLNLFission.cc 69860 2013-05-16 14:39:02Z gcosmo $
00057 //
00058 // This class is a copy of Fission.cc, made for use with Geant4.
00059 //
00060 
00061 #include "G4fissionEvent.hh"
00062 
00063 G4fissionEvent* fe;
00064 
00065 
00066    extern G4float (*rngfptr) (void);
00067 
00068    extern G4double (*rngdptr) (void);
00069 
00070    extern G4double rngf2d(void);
00071 
00072    void genspfissevt_(G4int *isotope, G4double *time) {
00073       if (fe != 0) delete fe;
00074       fe = new G4fissionEvent(*isotope, *time, -1., 0.);
00075    }
00076 
00077    void genfissevt_(G4int *isotope, G4double *time, G4double *nubar, G4double *eng) {
00078       if (fe != 0) delete fe;
00079       fe = new G4fissionEvent(*isotope, *time, *nubar, *eng);
00080    }
00081 
00082    G4int getnnu_() {
00083       return (*fe).getNeutronNu();
00084    }
00085 
00086    G4int getpnu_() {
00087       return (*fe).getPhotonNu();
00088    }
00089 
00090    G4double getneng_(G4int *index) {
00091       return (*fe).getNeutronEnergy(*index);
00092    }
00093 
00094    G4double getnvel_(G4int *index) {
00095       return (*fe).getNeutronVelocity(*index);
00096    }
00097 
00098    G4double getndircosu_(G4int *index) {
00099       return (*fe).getNeutronDircosu(*index);
00100    }
00101 
00102    G4double getndircosv_(G4int *index) {
00103       return (*fe).getNeutronDircosv(*index);
00104    }
00105 
00106    G4double getndircosw_(G4int *index) {
00107       return (*fe).getNeutronDircosw(*index);
00108    }
00109 
00110    G4double getpeng_(G4int *index) {
00111       return (*fe).getPhotonEnergy(*index);
00112    }
00113 
00114    G4double getpvel_(G4int *index) {
00115       return (*fe).getPhotonVelocity(*index);
00116    }
00117 
00118    G4double getpdircosu_(G4int *index) {
00119       return (*fe).getPhotonDircosu(*index);
00120    }
00121 
00122    G4double getpdircosv_(G4int *index) {
00123       return (*fe).getPhotonDircosv(*index);
00124    }
00125 
00126    G4double getpdircosw_(G4int *index) {
00127       return (*fe).getPhotonDircosw(*index);
00128    }
00129 
00130    G4double getnage_(G4int *index) {
00131       return (*fe).getNeutronAge(*index);
00132    }
00133 
00134    G4double getpage_(G4int *index) {
00135       return (*fe).getPhotonAge(*index);
00136    }
00137 
00138    void setdelay_(G4int *delay) {
00139       (*fe).setDelayOption(*delay);
00140    }
00141 
00142    void setcorrel_(G4int *correlation) {
00143       (*fe).setCorrelationOption(*correlation);
00144    }
00145 
00146    void setnudist_(G4int *nudist) {
00147 /*
00148       where the argument *nudist affects induced fissions only, it
00149       is set to
00150          0 for sampling Zucker and Holden probability distributions 
00151            for U-235,238 and Pu-239. Terrell for other isotopes.
00152          1 same as above, but using Gwin, Spencer and Ingle 
00153            tabulated distributions for thermal energies for U-235.
00154            Terrell for other isotopes.
00155          2 for sampling fission-induced neutron multiplicity in 
00156            (a) U-232, U-234, U-236 and U-238 using Zucker and 
00157                Holden's tabulated data for U-238
00158            (b) U-233 and U-235 using Zucker and Holden's tabulated 
00159                data for U-235
00160            (c) Pu-239 and Pu-241 using Zucker and Holden's tabulated 
00161                data for Pu-239
00162            The P(nu) distributions for *nudist=2 are given as a 
00163            function of the average number of neutrons from fission, 
00164            based on interpolation of the data from Zucker and Holden.
00165            Terrell for other isotopes.
00166          3 for sampling fission-induced neutron multiplicity in 
00167            (a) U-232, U-234, U-236 and U-238 using Zucker and 
00168                Holden's tabulated data for U-238
00169            (b) U-233 and U-235 using Zucker and Holden's tabulated 
00170                data for U-235
00171            (c) Pu-239 and Pu-241 using Zucker and Holden's tabulated 
00172                data for Pu-239
00173            The Z&H tables have P(nu) distributions for 11 energies 
00174            (0 MeV through 10 MeV), along with their nubars. For 
00175            *nudist=3, we select the P(nu) distribution that has
00176            a nubar closest either from above, or from below, to the 
00177            to the nubar entered for the induced fission, based on a 
00178            random number and fractional distances to the end of the 
00179            nubar interval thus formed.
00180            Terrell for other isotopes.
00181 */
00182 
00183       (*fe).setNudistOption(*nudist);
00184    }
00185 
00186    void setcf252_(G4int *ndist, G4int *neng) {
00187 /*
00188       where the argument
00189       *ndist is set to 
00190          0 to sample the spontaneous fission neutron multiplicity 
00191            using tabulated data from Spencer
00192          1 to sample the spontaneous fission neutron multiplicity
00193            using tabulated data from Boldeman
00194       *neng is set to 
00195          0 to sample the Mannhart corrected Maxwellian spectrum
00196          1 to sample the Madland-Nix theoretical spectrum
00197          2 to sample the Froehner Watt spectrum
00198 */
00199       (*fe).setCf252Option(*ndist, *neng);
00200    }
00201 
00202    void setrngf_(G4float (*funcptr) (void)) {
00203       G4fissionEvent::setRNGf(funcptr);
00204    }
00205 
00206    void setrngd_(G4double (*funcptr) (void)) {
00207       G4fissionEvent::setRNGd(funcptr);
00208    }
00209 // }

Generated on Mon May 27 17:48:49 2013 for Geant4 by  doxygen 1.4.7