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 // P. Arce, June-2014 Conversion neutron_hp to particle_hp
0028 //
0029 #ifndef G4ParticleHPIsoData_h
0030 #define G4ParticleHPIsoData_h 1
0031 
0032 // Hadronic Process: Very Low Energy Neutron X-Sections
0033 // original by H.P. Wellisch, TRIUMF, 14-Feb-97
0034 // Has the Cross-section data for on isotope.
0035 
0036 #include "G4ios.hh"
0037 #include "globals.hh"
0038 #include "G4ParticleHPNames.hh"
0039 #include "G4ParticleHPVector.hh"
0040 
0041 class G4ParticleDefinition;
0042 
0043 class G4ParticleHPIsoData
0044 {
0045   public:
0046     G4ParticleHPIsoData() = default;
0047 
0048     ~G4ParticleHPIsoData() { delete theChannelData; }
0049 
0050     inline G4double GetXsec(G4double energy)
0051     {
0052       return std::max(0., theChannelData->GetXsec(energy));
0053     }
0054 
0055     G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
0056     {
0057       return Init(A, Z, 0, abun, dirName, aFSType);
0058     };
0059 
0060     G4bool Init(G4int A, G4int Z, G4int M, G4double abun, G4String dirName, G4String aFSType);
0061 
0062     void Init(G4int A, G4int Z, G4double abun, G4ParticleDefinition* projectile,
0063               const char* dataDirVariable)
0064     {
0065       Init(A, Z, 0, abun, projectile, dataDirVariable);
0066     }
0067 
0068     void Init(G4int A, G4int Z, G4int M, G4double abun, G4ParticleDefinition* projectile,
0069               const char* dataDirVariable);  // fill PhysicsVector for this Isotope
0070 
0071     G4ParticleHPVector* MakeElasticData() { return theElasticData; }
0072     G4ParticleHPVector* MakeFissionData() { return theFissionData; }
0073     G4ParticleHPVector* MakeCaptureData() { return theCaptureData; }
0074     G4ParticleHPVector* MakeInelasticData() { return theInelasticData; }
0075     G4ParticleHPVector* MakeChannelData() { return theChannelData; }
0076 
0077     G4String GetName(G4int A, G4int Z, G4String base, G4String rest);
0078 
0079     void FillChannelData(G4ParticleHPVector* aBuffer);
0080 
0081     void ThinOut(G4double precision)
0082     {
0083       if (theFissionData != nullptr) theFissionData->ThinOut(precision);
0084       if (theCaptureData != nullptr) theCaptureData->ThinOut(precision);
0085       if (theElasticData != nullptr) theElasticData->ThinOut(precision);
0086       if (theInelasticData != nullptr) theInelasticData->ThinOut(precision);
0087     }
0088 
0089     G4ParticleHPIsoData& operator=(const G4ParticleHPIsoData& right) = delete;
0090     G4ParticleHPIsoData(const G4ParticleHPIsoData&) = delete;
0091 
0092   private:
0093     G4ParticleHPVector* theFissionData{nullptr};
0094     G4ParticleHPVector* theCaptureData{nullptr};
0095     G4ParticleHPVector* theElasticData{nullptr};
0096     G4ParticleHPVector* theInelasticData{nullptr};
0097     G4ParticleHPVector* theChannelData{nullptr};
0098 
0099     G4String theFileName;
0100     G4ParticleHPNames theNames;
0101 };
0102 
0103 #endif