Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:59:09

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 
0047     G4ParticleHPIsoData() = default;
0048 
0049     ~G4ParticleHPIsoData() { delete theChannelData; }
0050 
0051     inline G4double GetXsec(G4double energy)
0052     {
0053       return std::max(0., theChannelData->GetXsec(energy));
0054     }
0055 
0056     G4bool Init(G4int A, G4int Z, G4double abun, const G4String& dirName, const G4String& aFSType)
0057     {
0058       return Init(A, Z, 0, abun, dirName, aFSType);
0059     }
0060 
0061     G4bool Init(G4int A, G4int Z, G4int M, G4double abun, const G4String& dirName, const G4String& aFSType);
0062 
0063     void Init(G4int A, G4int Z, G4double abun, G4ParticleDefinition* projectile,
0064               const char* dataDirVariable)
0065     {
0066       Init(A, Z, 0, abun, projectile, dataDirVariable);
0067     }
0068 
0069     void Init(G4int A, G4int Z, G4int M, G4double abun, G4ParticleDefinition* projectile,
0070               const char* dataDirVariable);  // fill PhysicsVector for this Isotope
0071 
0072     G4ParticleHPVector* MakeElasticData() const { return theElasticData; }
0073     G4ParticleHPVector* MakeFissionData() const { return theFissionData; }
0074     G4ParticleHPVector* MakeCaptureData() const { return theCaptureData; }
0075     G4ParticleHPVector* MakeInelasticData() const { return theInelasticData; }
0076     G4ParticleHPVector* MakeChannelData() const { return theChannelData; }
0077 
0078     G4String GetName(G4int A, G4int Z, const G4String& base, const G4String& rest);
0079 
0080     void FillChannelData(G4ParticleHPVector* aBuffer);
0081 
0082     void ThinOut(G4double precision)
0083     {
0084       if (theFissionData != nullptr) theFissionData->ThinOut(precision);
0085       if (theCaptureData != nullptr) theCaptureData->ThinOut(precision);
0086       if (theElasticData != nullptr) theElasticData->ThinOut(precision);
0087       if (theInelasticData != nullptr) theInelasticData->ThinOut(precision);
0088     }
0089 
0090     G4ParticleHPIsoData& operator=(const G4ParticleHPIsoData& right) = delete;
0091     G4ParticleHPIsoData(const G4ParticleHPIsoData&) = delete;
0092 
0093   private:
0094 
0095     G4ParticleHPVector* theFissionData{nullptr};
0096     G4ParticleHPVector* theCaptureData{nullptr};
0097     G4ParticleHPVector* theElasticData{nullptr};
0098     G4ParticleHPVector* theInelasticData{nullptr};
0099     G4ParticleHPVector* theChannelData{nullptr};
0100 
0101     G4String theFileName;
0102     G4ParticleHPNames theNames;
0103 };
0104 
0105 #endif