Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-17 09:13:15

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 // This software was developed by Lawrence Livermore National Laboratory.
0028 //
0029 // Redistribution and use in source and binary forms, with or without
0030 // modification, are permitted provided that the following conditions are met:
0031 //
0032 // 1. Redistributions of source code must retain the above copyright notice,
0033 //   this list of conditions and the following disclaimer.
0034 // 2. Redistributions in binary form must reproduce the above copyright notice,
0035 //   this list of conditions and the following disclaimer in the documentation
0036 //   and/or other materials provided with the distribution.
0037 // 3. The name of the author may not be used to endorse or promote products
0038 //   derived from this software without specific prior written permission.
0039 //
0040 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
0041 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
0042 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
0043 // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0044 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
0045 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
0046 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
0047 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
0048 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
0049 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0050 //
0051 // Copyright (c) 2006 The Regents of the University of California.
0052 // All rights reserved.
0053 // UCRL-CODE-224807
0054 //
0055 //
0056 #ifndef G4FISSIONEVENT_HH
0057 #define G4FISSIONEVENT_HH
0058 
0059 #include "globals.hh"
0060 #include <string>
0061 
0062 class G4fissionEvent
0063 {
0064    public:
0065 
0066       // These are all the methods of this class accessible to the caller of the object 
0067       G4fissionEvent(G4int isotope, G4double time, G4double nubar, G4double eng);
0068       ~G4fissionEvent();
0069       G4int getNeutronNu() {
0070          return neutronNu;
0071       }
0072       G4int getPhotonNu() {
0073          return photonNu;
0074       }
0075       G4double getNeutronEnergy(G4int index) {
0076          if (index >= 0 && index < neutronNu) return neutronEnergies[index];
0077          else return -1;
0078       }
0079       G4double getNeutronVelocity(G4int index) {
0080          if (index >= 0 && index < neutronNu) return neutronVelocities[index];
0081          else return -1;
0082       }
0083       G4double getNeutronDircosu(G4int index) {
0084          if (index >= 0 && index < neutronNu) return neutronDircosu[index];
0085          else return -1;
0086       }
0087       G4double getNeutronDircosv(G4int index) {
0088          if (index >= 0 && index < neutronNu) return neutronDircosv[index];
0089          else return -1;
0090       }
0091       G4double getNeutronDircosw(G4int index) {
0092          if (index >= 0 && index < neutronNu) return neutronDircosw[index];
0093          else return -1;
0094       }
0095       G4double getPhotonEnergy(G4int index) {
0096          if (index >= 0 && index < photonNu) return photonEnergies[index];
0097          else return -1;
0098       }
0099       G4double getPhotonVelocity(G4int index) {
0100          if (index >= 0 && index < photonNu) return photonVelocities[index];
0101          else return -1;
0102       }
0103       G4double getPhotonDircosu(G4int index) {
0104          if (index >= 0 && index < photonNu) return photonDircosu[index];
0105          else return -1;
0106       }
0107       G4double getPhotonDircosv(G4int index) {
0108          if (index >= 0 && index < photonNu) return photonDircosv[index];
0109          else return -1;
0110       }
0111       G4double getPhotonDircosw(G4int index) {
0112          if (index >= 0 && index < photonNu) return photonDircosw[index];
0113          else return -1;
0114       }
0115       G4double getNeutronAge(G4int index) {
0116          if (index >= 0 && index < neutronNu) return neutronAges[index];
0117          else return -1;
0118       }
0119       G4double getPhotonAge(G4int index) {
0120          if (index >= 0 && index < photonNu) return photonAges[index];
0121          else return -1;
0122       }
0123       static void setDelayOption(G4int delay) {
0124          delayoption = delay;
0125       };
0126       static void setCorrelationOption(G4int correlation) {
0127          correlationoption = correlation;
0128       };
0129       static void setNudistOption(G4int nudist) {
0130          nudistoption = nudist;
0131       };
0132       static void setCf252Option(G4int ndist, G4int neng) {
0133          Cf252ndistoption = ndist;
0134          Cf252nengoption = neng;
0135       };
0136       static void setRNGf(float (*funcptr) (void)) {
0137          rngfptr = funcptr;
0138          rngdptr = rngf2d;
0139       }
0140       static void setRNGd(G4double (*funcptr) (void)) {
0141          rngdptr = funcptr;
0142       }
0143 
0144 
0145    private:
0146 
0147       G4int neutronNu; // number of neutrons in this fission event
0148       G4double* neutronEnergies; 
0149       G4double* neutronVelocities; 
0150       G4double* neutronDircosu; 
0151       G4double* neutronDircosv; 
0152       G4double* neutronDircosw; 
0153       G4double* neutronAges; 
0154 
0155       G4int photonNu; // number of photons in this fission event
0156       G4double* photonEnergies; 
0157       G4double* photonVelocities; 
0158       G4double* photonDircosu; 
0159       G4double* photonDircosv; 
0160       G4double* photonDircosw; 
0161       G4double* photonAges; 
0162 
0163       // options
0164       static G4int delayoption;
0165       static G4int correlationoption;
0166       static G4int nudistoption;
0167       static G4int Cf252ndistoption;
0168       static G4int Cf252nengoption;
0169       static G4double (*rngdptr)(void);
0170       static G4float (*rngfptr)(void);
0171 
0172       G4int G4SmpNuDistDataU232_234_236_238(G4double nubar);
0173       G4int G4SmpNuDistDataU232_234_236_238_MC(G4double nubar);
0174       G4int G4SmpNuDistDataU233_235(G4double nubar);
0175       G4int G4SmpNuDistDataU233_235_MC(G4double nubar);
0176       G4int G4SmpNuDistDataU235(G4double erg, G4int option);
0177       G4int G4SmpNuDistDataPu239(G4double erg);
0178       G4double G4SmpNVel(G4double eng, G4double* cosdiru, G4double* cosdirv, G4double* cosdirw);
0179       G4double G4SmpNEngCf252(G4int option);
0180       void G4SmpIsoDir(G4double* cosdiru, G4double* cosdirv, G4double* cosdirw);
0181       G4double G4SmpGEng();
0182       G4int G4SmpNuDistDataPu239_241(G4double nubar);
0183       G4int G4SmpNuDistDataPu239_241_MC(G4double nubar);
0184       G4int G4SmpNuDistDataU238(G4double erg);
0185       G4int G4SmpNugDist(G4int isotope, G4double nubar);
0186       G4double G4SmpPVel(G4double eng, G4double* cosdiru, G4double* cosdirv, G4double* cosdirw);
0187       G4int G4SmpSpNuDistData(G4int isotope, G4int Cf252option);
0188       G4double G4SmpSpNubarData(G4int isotope);
0189       G4int G4SmpSpNugDistData(G4int isotope);
0190       G4double G4SmpTerrell(G4double nubar);
0191       G4double G4SmpWatt(G4double ePart, G4int iso);
0192       void G4fissionerr(G4int iSever, const G4String& chSubNam, const G4String& chMsg);
0193       static G4double fisslibrng(void);
0194       static G4double rngf2d(void);
0195 };
0196 
0197 #endif