Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:17

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    private:
0064       G4int neutronNu; // number of neutrons in this fission event
0065       G4double* neutronEnergies; 
0066       G4double* neutronVelocities; 
0067       G4double* neutronDircosu; 
0068       G4double* neutronDircosv; 
0069       G4double* neutronDircosw; 
0070       G4double* neutronAges; 
0071 
0072       G4int photonNu; // number of photons in this fission event
0073       G4double* photonEnergies; 
0074       G4double* photonVelocities; 
0075       G4double* photonDircosu; 
0076       G4double* photonDircosv; 
0077       G4double* photonDircosw; 
0078       G4double* photonAges; 
0079 
0080       // options
0081       static G4int delayoption;
0082       static G4int correlationoption;
0083       static G4int nudistoption;
0084       static G4int Cf252ndistoption;
0085       static G4int Cf252nengoption;
0086       static G4double (*rngdptr)(void);
0087       static float (*rngfptr)(void);
0088 
0089    public:
0090       // These are all the methods of this class accessible to the caller of the object 
0091       G4fissionEvent(G4int isotope, G4double time, G4double nubar, G4double eng);
0092       ~G4fissionEvent();
0093       G4int getNeutronNu() {
0094          return neutronNu;
0095       }
0096       G4int getPhotonNu() {
0097          return photonNu;
0098       }
0099       G4double getNeutronEnergy(G4int index) {
0100          if (index >= 0 && index < neutronNu) return neutronEnergies[index];
0101          else return -1;
0102       }
0103       G4double getNeutronVelocity(G4int index) {
0104          if (index >= 0 && index < neutronNu) return neutronVelocities[index];
0105          else return -1;
0106       }
0107       G4double getNeutronDircosu(G4int index) {
0108          if (index >= 0 && index < neutronNu) return neutronDircosu[index];
0109          else return -1;
0110       }
0111       G4double getNeutronDircosv(G4int index) {
0112          if (index >= 0 && index < neutronNu) return neutronDircosv[index];
0113          else return -1;
0114       }
0115       G4double getNeutronDircosw(G4int index) {
0116          if (index >= 0 && index < neutronNu) return neutronDircosw[index];
0117          else return -1;
0118       }
0119       G4double getPhotonEnergy(G4int index) {
0120          if (index >= 0 && index < photonNu) return photonEnergies[index];
0121          else return -1;
0122       }
0123       G4double getPhotonVelocity(G4int index) {
0124          if (index >= 0 && index < photonNu) return photonVelocities[index];
0125          else return -1;
0126       }
0127       G4double getPhotonDircosu(G4int index) {
0128          if (index >= 0 && index < photonNu) return photonDircosu[index];
0129          else return -1;
0130       }
0131       G4double getPhotonDircosv(G4int index) {
0132          if (index >= 0 && index < photonNu) return photonDircosv[index];
0133          else return -1;
0134       }
0135       G4double getPhotonDircosw(G4int index) {
0136          if (index >= 0 && index < photonNu) return photonDircosw[index];
0137          else return -1;
0138       }
0139       G4double getNeutronAge(G4int index) {
0140          if (index >= 0 && index < neutronNu) return neutronAges[index];
0141          else return -1;
0142       }
0143       G4double getPhotonAge(G4int index) {
0144          if (index >= 0 && index < photonNu) return photonAges[index];
0145          else return -1;
0146       }
0147       static void setDelayOption(G4int delay) {
0148          delayoption = delay;
0149       };
0150       static void setCorrelationOption(G4int correlation) {
0151          correlationoption = correlation;
0152       };
0153       static void setNudistOption(G4int nudist) {
0154          nudistoption = nudist;
0155       };
0156       static void setCf252Option(G4int ndist, G4int neng) {
0157          Cf252ndistoption = ndist;
0158          Cf252nengoption = neng;
0159       };
0160       static void setRNGf(float (*funcptr) (void)) {
0161          rngfptr = funcptr;
0162          rngdptr = rngf2d;
0163       }
0164       static void setRNGd(G4double (*funcptr) (void)) {
0165          rngdptr = funcptr;
0166       }
0167 
0168 
0169    private:
0170       G4int G4SmpNuDistDataU232_234_236_238(G4double nubar);
0171       G4int G4SmpNuDistDataU232_234_236_238_MC(G4double nubar);
0172       G4int G4SmpNuDistDataU233_235(G4double nubar);
0173       G4int G4SmpNuDistDataU233_235_MC(G4double nubar);
0174       G4int G4SmpNuDistDataU235(G4double erg, G4int option);
0175       G4int G4SmpNuDistDataPu239(G4double erg);
0176       G4double G4SmpNVel(G4double eng, G4double* cosdiru, G4double* cosdirv, G4double* cosdirw);
0177       G4double G4SmpNEngCf252(G4int option);
0178       void G4SmpIsoDir(G4double* cosdiru, G4double* cosdirv, G4double* cosdirw);
0179       G4double G4SmpGEng();
0180       G4int G4SmpNuDistDataPu239_241(G4double nubar);
0181       G4int G4SmpNuDistDataPu239_241_MC(G4double nubar);
0182       G4int G4SmpNuDistDataU238(G4double erg);
0183       G4int G4SmpNugDist(G4int isotope, G4double nubar);
0184       G4double G4SmpPVel(G4double eng, G4double* cosdiru, G4double* cosdirv, G4double* cosdirw);
0185       G4int G4SmpSpNuDistData(G4int isotope, G4int Cf252option);
0186       G4double G4SmpSpNubarData(G4int isotope);
0187       G4int G4SmpSpNugDistData(G4int isotope);
0188       G4double G4SmpTerrell(G4double nubar);
0189       G4double G4SmpWatt(G4double ePart, G4int iso);
0190       void G4fissionerr(G4int iSever, std::string chSubNam, std::string chMsg);
0191       static G4double fisslibrng(void);
0192       static G4double rngf2d(void);
0193 };
0194 
0195 #endif