Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -28,7 +28,9 @@
|
||||
// 080801 Introduce theNDLDataA,Z which has A and Z of NDL data by T. Koi
|
||||
//
|
||||
// P. Arce, June-2014 Conversion neutron_hp to particle_hp
|
||||
// V. Ivanchenko, July-2023 Basic revision of particle HP classes
|
||||
//
|
||||
|
||||
#ifndef G4ParticleHPFinalState_h
|
||||
#define G4ParticleHPFinalState_h
|
||||
|
||||
@@ -37,6 +39,7 @@
|
||||
#include "G4HadProjectile.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Neutron.hh"
|
||||
#include "G4IonTable.hh"
|
||||
#include "G4ParticleHPManager.hh"
|
||||
#include "G4ParticleHPNames.hh"
|
||||
#include "G4ParticleHPVector.hh"
|
||||
@@ -46,44 +49,23 @@ class G4ParticleDefinition;
|
||||
class G4ParticleHPFinalState
|
||||
{
|
||||
public:
|
||||
G4ParticleHPFinalState()
|
||||
{
|
||||
hasFSData = true;
|
||||
hasXsec = true;
|
||||
hasAnyData = true;
|
||||
theBaseZ = 0;
|
||||
theBaseA = 0;
|
||||
theBaseM = 0;
|
||||
|
||||
theNDLDataZ = 0;
|
||||
theNDLDataA = 0;
|
||||
theNDLDataM = 0;
|
||||
|
||||
theProjectile = G4Neutron::Neutron();
|
||||
|
||||
theResult.Put(nullptr);
|
||||
|
||||
secID = -1;
|
||||
}
|
||||
|
||||
virtual ~G4ParticleHPFinalState()
|
||||
{
|
||||
if (theResult.Get() != nullptr) delete theResult.Get();
|
||||
}
|
||||
G4ParticleHPFinalState();
|
||||
virtual ~G4ParticleHPFinalState();
|
||||
|
||||
void Init(G4double A, G4double Z, G4String& dirName, G4String& aFSType,
|
||||
G4ParticleDefinition* projectile)
|
||||
G4ParticleDefinition* p)
|
||||
{
|
||||
G4int M = 0;
|
||||
Init(A, Z, M, dirName, aFSType, const_cast<G4ParticleDefinition*>(projectile));
|
||||
theProjectile = p;
|
||||
Init(A, Z, 0, dirName, aFSType, p);
|
||||
}
|
||||
virtual void Init(G4double A, G4double Z, G4int M, G4String& dirName, G4String& aFSType,
|
||||
G4ParticleDefinition*) = 0;
|
||||
|
||||
virtual G4HadFinalState* ApplyYourself(const G4HadProjectile&)
|
||||
{
|
||||
throw G4HadronicException(
|
||||
__FILE__, __LINE__,
|
||||
"G4HadFinalState * ApplyYourself(const G4HadProjectile & theTrack) needs implementation");
|
||||
"G4ParticleHPFinalState::ApplyYourself(..) needs implementation");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -100,8 +82,8 @@ class G4ParticleHPFinalState
|
||||
|
||||
void SetA_Z(G4double anA, G4double aZ, G4int aM = 0)
|
||||
{
|
||||
theBaseA = anA;
|
||||
theBaseZ = aZ;
|
||||
theBaseA = G4lrint(anA);
|
||||
theBaseZ = G4lrint(aZ);
|
||||
theBaseM = aM;
|
||||
}
|
||||
G4double GetZ() { return theBaseZ; }
|
||||
@@ -109,37 +91,52 @@ class G4ParticleHPFinalState
|
||||
G4double GetA() { return theBaseA; }
|
||||
G4int GetM() { return theBaseM; }
|
||||
|
||||
void SetAZMs(G4ParticleHPDataUsed used)
|
||||
{
|
||||
theNDLDataA = G4lrint(used.GetA());
|
||||
theNDLDataZ = G4lrint(used.GetZ());
|
||||
theNDLDataM = used.GetM();
|
||||
}
|
||||
|
||||
void SetAZMs(G4double anA, G4double aZ, G4int aM, G4ParticleHPDataUsed used)
|
||||
{
|
||||
theBaseA = anA;
|
||||
theBaseZ = aZ;
|
||||
theBaseA = G4lrint(anA);
|
||||
theBaseZ = G4lrint(aZ);
|
||||
theBaseM = aM;
|
||||
theNDLDataA = (G4int)used.GetA();
|
||||
theNDLDataZ = (G4int)used.GetZ();
|
||||
theNDLDataA = G4lrint(used.GetA());
|
||||
theNDLDataZ = G4lrint(used.GetZ());
|
||||
theNDLDataM = used.GetM();
|
||||
}
|
||||
|
||||
void SetProjectile(G4ParticleDefinition* projectile) { theProjectile = projectile; }
|
||||
|
||||
G4ParticleHPFinalState& operator=
|
||||
(const G4ParticleHPFinalState& right) = delete;
|
||||
G4ParticleHPFinalState(const G4ParticleHPFinalState&) = delete;
|
||||
|
||||
protected:
|
||||
void adjust_final_state(G4LorentzVector);
|
||||
|
||||
G4bool hasXsec;
|
||||
G4bool hasFSData;
|
||||
G4bool hasAnyData;
|
||||
G4ParticleDefinition* theProjectile{nullptr};
|
||||
G4ParticleHPManager* fManager;
|
||||
G4IonTable* ionTable;
|
||||
|
||||
G4int theBaseA{0};
|
||||
G4int theBaseZ{0};
|
||||
G4int theBaseM{0};
|
||||
G4int theNDLDataZ{0};
|
||||
G4int theNDLDataA{0};
|
||||
G4int theNDLDataM{0};
|
||||
|
||||
G4int secID{-1};
|
||||
// Creator model ID for the secondaries created by this class or derived ones
|
||||
|
||||
G4bool hasXsec{true};
|
||||
G4bool hasFSData{true};
|
||||
G4bool hasAnyData{true};
|
||||
G4ParticleHPNames theNames;
|
||||
|
||||
G4Cache<G4HadFinalState*> theResult;
|
||||
G4ParticleDefinition* theProjectile;
|
||||
|
||||
G4double theBaseA;
|
||||
G4double theBaseZ;
|
||||
G4int theBaseM;
|
||||
|
||||
G4int theNDLDataZ;
|
||||
G4int theNDLDataA;
|
||||
G4int theNDLDataM;
|
||||
|
||||
G4int secID; // Creator model ID for the secondaries created by this class or derived ones
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user