Back to home page

EIC code displayed by LXR

 
 

    


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

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 // 070606 fix for Valgrind by T. Koi
0028 //
0029 // P. Arce, June-2014 Conversion neutron_hp to particle_hp
0030 //
0031 #ifndef G4ParticleHPFissionERelease_h
0032 #define G4ParticleHPFissionERelease_h 1
0033 
0034 #include "G4ios.hh"
0035 #include "globals.hh"
0036 
0037 #include <CLHEP/Units/SystemOfUnits.h>
0038 
0039 #include <fstream>
0040 
0041 class G4ParticleHPFissionERelease
0042 {
0043   public:
0044     G4ParticleHPFissionERelease()
0045 
0046       = default;
0047     ~G4ParticleHPFissionERelease() = default;
0048 
0049     inline void Init(std::istream& aDataFile)
0050     {
0051       G4double dummy;
0052 
0053       aDataFile >> dummy >> fragmentKinetic >> promptNeutronKinetic >> delayedNeutronKinetic
0054         >> promptGammaEnergy >> delayedGammaEnergy >> delayedBetaEnergy >> neutrinoEnergy
0055         >> reducedTotalEnergy >> totalEnergy;
0056 
0057       fragmentKinetic *= CLHEP::eV;
0058       promptNeutronKinetic *= CLHEP::eV;
0059       delayedNeutronKinetic *= CLHEP::eV;
0060       promptGammaEnergy *= CLHEP::eV;
0061       delayedGammaEnergy *= CLHEP::eV;
0062       delayedBetaEnergy *= CLHEP::eV;
0063       neutrinoEnergy *= CLHEP::eV;
0064       reducedTotalEnergy *= CLHEP::eV;
0065       totalEnergy *= CLHEP::eV;
0066     }
0067 
0068     inline G4double GetTotalEnergy(G4double deltaNNeu, G4double anEnergy)
0069     {
0070       G4double result, delta, energy;
0071       energy = anEnergy / CLHEP::eV;
0072       delta = -(1.057 * energy - 8.07 * deltaNNeu);
0073       result = totalEnergy - delta * CLHEP::eV;
0074       return result;
0075     }
0076     inline G4double GetFragmentKinetic() { return fragmentKinetic; }
0077     inline G4double GetPromptNeutronKinetic(G4double deltaNNeu, G4double anEnergy)
0078     {
0079       G4double result, delta, energy;
0080       energy = anEnergy / CLHEP::eV;
0081       delta = -(1.307 * energy - 8.07 * deltaNNeu);
0082       result = totalEnergy - delta * CLHEP::eV;
0083       return result;
0084     }
0085     inline G4double GetDelayedNeutronKinetic() { return delayedNeutronKinetic; }
0086     inline G4double GetPromptGammaEnergy() { return promptGammaEnergy; }
0087     inline G4double GetDelayedGammaEnergy(G4double anEnergy)
0088     {
0089       G4double delta = 0.075 * anEnergy;
0090       G4double result = delayedGammaEnergy - delta;
0091       return result;
0092     }
0093     inline G4double GetDelayedBetaEnergy(G4double anEnergy)
0094     {
0095       G4double delta = 0.075 * anEnergy;
0096       G4double result = delayedBetaEnergy - delta;
0097       return result;
0098     }
0099     inline G4double GetNeutrinoEnergy(G4double anEnergy)
0100     {
0101       G4double delta = 0.1 * anEnergy;
0102       G4double result = neutrinoEnergy - delta;
0103       return result;
0104     }
0105     inline G4double GetReducedTotal(G4double deltaNNeu, G4double anEnergy)
0106     {
0107       return GetTotalEnergy(deltaNNeu, anEnergy) - GetNeutrinoEnergy(anEnergy);
0108     }
0109 
0110   private:
0111     G4double totalEnergy{0.0};
0112     G4double fragmentKinetic{0.0};
0113     G4double promptNeutronKinetic{0.0};
0114     G4double delayedNeutronKinetic{0.0};
0115     G4double promptGammaEnergy{0.0};
0116     G4double delayedGammaEnergy{0.0};
0117     G4double delayedBetaEnergy{0.0};
0118     G4double neutrinoEnergy{0.0};
0119     G4double reducedTotalEnergy{0.0};  // total - neutrino
0120 };
0121 
0122 #endif