Import Geant4 11.2.0.beta source tree
This commit is contained in:
@@ -29,90 +29,94 @@
|
||||
#ifndef G4ParticleHPIsoData_h
|
||||
#define G4ParticleHPIsoData_h 1
|
||||
|
||||
// Hadronic Process: Very Low Energy Neutron X-Sections
|
||||
// original by H.P. Wellisch, TRIUMF, 14-Feb-97
|
||||
// Has the Cross-section data for on isotope.
|
||||
|
||||
#include "globals.hh"
|
||||
// Hadronic Process: Very Low Energy Neutron X-Sections
|
||||
// original by H.P. Wellisch, TRIUMF, 14-Feb-97
|
||||
// Has the Cross-section data for on isotope.
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include <fstream>
|
||||
// #include <strstream>
|
||||
#include <stdlib.h>
|
||||
#include "G4ParticleHPVector.hh"
|
||||
#include "G4ParticleHPNames.hh"
|
||||
#include "G4ParticleHPVector.hh"
|
||||
|
||||
#include <stdlib.h>
|
||||
class G4ParticleDefinition;
|
||||
|
||||
class G4ParticleHPIsoData
|
||||
{
|
||||
public:
|
||||
|
||||
G4ParticleHPIsoData()
|
||||
{
|
||||
theChannelData = 0;
|
||||
theFissionData = 0;
|
||||
theCaptureData = 0;
|
||||
theElasticData = 0;
|
||||
theInelasticData = 0;
|
||||
}
|
||||
|
||||
~G4ParticleHPIsoData(){if(theChannelData!=0) delete theChannelData;}
|
||||
|
||||
inline G4double GetXsec(G4double energy)
|
||||
{
|
||||
return std::max(0., theChannelData->GetXsec(energy));
|
||||
}
|
||||
|
||||
//G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType);
|
||||
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType){ G4int M = 0 ; return Init( A, Z, M, abun, dirName, aFSType); };
|
||||
G4bool Init(G4int A, G4int Z, G4int M, G4double abun, G4String dirName, G4String aFSType);
|
||||
|
||||
//void Init(G4int A, G4int Z, G4double abun); //fill PhysicsVector for this Isotope
|
||||
void Init(G4int A, G4int Z, G4double abun, G4ParticleDefinition* projectile, const char* dataDirVariable) { G4int M =0;
|
||||
Init( A, Z, M, abun, projectile, dataDirVariable ); };
|
||||
void Init(G4int A, G4int Z, G4int M, G4double abun, G4ParticleDefinition* projectile, const char* dataDirVariable); //fill PhysicsVector for this Isotope
|
||||
|
||||
inline G4ParticleHPVector * MakeElasticData()
|
||||
{return theElasticData;}
|
||||
inline G4ParticleHPVector * MakeFissionData()
|
||||
{return theFissionData;}
|
||||
inline G4ParticleHPVector * MakeCaptureData()
|
||||
{return theCaptureData;}
|
||||
inline G4ParticleHPVector * MakeInelasticData()
|
||||
{return theInelasticData;}
|
||||
inline G4ParticleHPVector * MakeChannelData()
|
||||
{return theChannelData;}
|
||||
|
||||
G4String GetName(G4int A, G4int Z, G4String base, G4String rest);
|
||||
|
||||
inline void FillChannelData(G4ParticleHPVector * aBuffer)
|
||||
{
|
||||
if(theChannelData!=0) throw G4HadronicException(__FILE__, __LINE__, "IsoData has channel full already!!!");
|
||||
theChannelData = new G4ParticleHPVector;
|
||||
for(G4int i=0; i<aBuffer->GetVectorLength(); i++)
|
||||
public:
|
||||
G4ParticleHPIsoData()
|
||||
{
|
||||
theChannelData->SetPoint(i, aBuffer->GetPoint(i));
|
||||
theChannelData = nullptr;
|
||||
theFissionData = nullptr;
|
||||
theCaptureData = nullptr;
|
||||
theElasticData = nullptr;
|
||||
theInelasticData = nullptr;
|
||||
}
|
||||
theChannelData->Hash();
|
||||
}
|
||||
|
||||
inline void ThinOut(G4double precision)
|
||||
{
|
||||
if(theFissionData) theFissionData->ThinOut(precision);
|
||||
if(theCaptureData) theCaptureData->ThinOut(precision);
|
||||
if(theElasticData) theElasticData->ThinOut(precision);
|
||||
if(theInelasticData) theInelasticData->ThinOut(precision);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
G4ParticleHPVector * theFissionData;
|
||||
G4ParticleHPVector * theCaptureData;
|
||||
G4ParticleHPVector * theElasticData;
|
||||
G4ParticleHPVector * theInelasticData;
|
||||
G4ParticleHPVector * theChannelData;
|
||||
~G4ParticleHPIsoData() { delete theChannelData; }
|
||||
|
||||
G4String theFileName;
|
||||
G4ParticleHPNames theNames;
|
||||
inline G4double GetXsec(G4double energy)
|
||||
{
|
||||
return std::max(0., theChannelData->GetXsec(energy));
|
||||
}
|
||||
|
||||
// G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType);
|
||||
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
|
||||
{
|
||||
G4int M = 0;
|
||||
return Init(A, Z, M, abun, dirName, aFSType);
|
||||
};
|
||||
G4bool Init(G4int A, G4int Z, G4int M, G4double abun, G4String dirName, G4String aFSType);
|
||||
|
||||
// void Init(G4int A, G4int Z, G4double abun); //fill PhysicsVector for this Isotope
|
||||
void Init(G4int A, G4int Z, G4double abun, G4ParticleDefinition* projectile,
|
||||
const char* dataDirVariable)
|
||||
{
|
||||
G4int M = 0;
|
||||
Init(A, Z, M, abun, projectile, dataDirVariable);
|
||||
};
|
||||
void Init(G4int A, G4int Z, G4int M, G4double abun, G4ParticleDefinition* projectile,
|
||||
const char* dataDirVariable); // fill PhysicsVector for this Isotope
|
||||
|
||||
inline G4ParticleHPVector* MakeElasticData() { return theElasticData; }
|
||||
inline G4ParticleHPVector* MakeFissionData() { return theFissionData; }
|
||||
inline G4ParticleHPVector* MakeCaptureData() { return theCaptureData; }
|
||||
inline G4ParticleHPVector* MakeInelasticData() { return theInelasticData; }
|
||||
inline G4ParticleHPVector* MakeChannelData() { return theChannelData; }
|
||||
|
||||
G4String GetName(G4int A, G4int Z, G4String base, G4String rest);
|
||||
|
||||
inline void FillChannelData(G4ParticleHPVector* aBuffer)
|
||||
{
|
||||
if (theChannelData != nullptr)
|
||||
throw G4HadronicException(__FILE__, __LINE__, "IsoData has channel full already!!!");
|
||||
theChannelData = new G4ParticleHPVector;
|
||||
for (G4int i = 0; i < aBuffer->GetVectorLength(); i++) {
|
||||
theChannelData->SetPoint(i, aBuffer->GetPoint(i));
|
||||
}
|
||||
theChannelData->Hash();
|
||||
}
|
||||
|
||||
inline void ThinOut(G4double precision)
|
||||
{
|
||||
if (theFissionData != nullptr) theFissionData->ThinOut(precision);
|
||||
if (theCaptureData != nullptr) theCaptureData->ThinOut(precision);
|
||||
if (theElasticData != nullptr) theElasticData->ThinOut(precision);
|
||||
if (theInelasticData != nullptr) theInelasticData->ThinOut(precision);
|
||||
}
|
||||
|
||||
private:
|
||||
G4ParticleHPVector* theFissionData;
|
||||
G4ParticleHPVector* theCaptureData;
|
||||
G4ParticleHPVector* theElasticData;
|
||||
G4ParticleHPVector* theInelasticData;
|
||||
G4ParticleHPVector* theChannelData;
|
||||
|
||||
G4String theFileName;
|
||||
G4ParticleHPNames theNames;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user