File indexing completed on 2025-01-18 09:58:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #ifndef G4ParticleHPFinalState_h
0035 #define G4ParticleHPFinalState_h
0036
0037 #include "G4Cache.hh"
0038 #include "G4HadFinalState.hh"
0039 #include "G4HadProjectile.hh"
0040 #include "G4Material.hh"
0041 #include "G4Neutron.hh"
0042 #include "G4IonTable.hh"
0043 #include "G4ParticleHPManager.hh"
0044 #include "G4ParticleHPNames.hh"
0045 #include "G4ParticleHPVector.hh"
0046
0047 class G4ParticleDefinition;
0048
0049 class G4ParticleHPFinalState
0050 {
0051 public:
0052 G4ParticleHPFinalState();
0053 virtual ~G4ParticleHPFinalState();
0054
0055 void Init(G4double A, G4double Z, G4String& dirName, G4String& aFSType,
0056 G4ParticleDefinition* p)
0057 {
0058 theProjectile = p;
0059 Init(A, Z, 0, dirName, aFSType, p);
0060 }
0061 virtual void Init(G4double A, G4double Z, G4int M, G4String& dirName, G4String& aFSType,
0062 G4ParticleDefinition*) = 0;
0063
0064 virtual G4HadFinalState* ApplyYourself(const G4HadProjectile&)
0065 {
0066 throw G4HadronicException(
0067 __FILE__, __LINE__,
0068 "G4ParticleHPFinalState::ApplyYourself(..) needs implementation");
0069 return nullptr;
0070 }
0071
0072
0073
0074 virtual G4ParticleHPFinalState* New() = 0;
0075
0076 G4bool HasXsec() { return hasXsec; }
0077 G4bool HasFSData() { return hasFSData; }
0078 G4bool HasAnyData() { return hasAnyData; }
0079
0080 virtual G4double GetXsec(G4double) { return 0; }
0081 virtual G4ParticleHPVector* GetXsec() { return nullptr; }
0082
0083 void SetA_Z(G4double anA, G4double aZ, G4int aM = 0)
0084 {
0085 theBaseA = G4lrint(anA);
0086 theBaseZ = G4lrint(aZ);
0087 theBaseM = aM;
0088 }
0089 G4double GetZ() { return theBaseZ; }
0090 G4double GetN() { return theBaseA; }
0091 G4double GetA() { return theBaseA; }
0092 G4int GetM() { return theBaseM; }
0093
0094 void SetAZMs(G4ParticleHPDataUsed used)
0095 {
0096 theNDLDataA = G4lrint(used.GetA());
0097 theNDLDataZ = G4lrint(used.GetZ());
0098 theNDLDataM = used.GetM();
0099 }
0100
0101 void SetAZMs(G4double anA, G4double aZ, G4int aM, G4ParticleHPDataUsed used)
0102 {
0103 theBaseA = G4lrint(anA);
0104 theBaseZ = G4lrint(aZ);
0105 theBaseM = aM;
0106 theNDLDataA = G4lrint(used.GetA());
0107 theNDLDataZ = G4lrint(used.GetZ());
0108 theNDLDataM = used.GetM();
0109 }
0110
0111 void SetProjectile(G4ParticleDefinition* projectile) { theProjectile = projectile; }
0112
0113 G4ParticleHPFinalState& operator=
0114 (const G4ParticleHPFinalState& right) = delete;
0115 G4ParticleHPFinalState(const G4ParticleHPFinalState&) = delete;
0116
0117 protected:
0118 void adjust_final_state(G4LorentzVector);
0119
0120 G4ParticleDefinition* theProjectile{nullptr};
0121 G4ParticleHPManager* fManager;
0122 G4IonTable* ionTable;
0123
0124 G4int theBaseA{0};
0125 G4int theBaseZ{0};
0126 G4int theBaseM{0};
0127 G4int theNDLDataZ{0};
0128 G4int theNDLDataA{0};
0129 G4int theNDLDataM{0};
0130
0131 G4int secID{-1};
0132
0133
0134 G4bool hasXsec{true};
0135 G4bool hasFSData{true};
0136 G4bool hasAnyData{true};
0137 G4ParticleHPNames theNames;
0138
0139 G4Cache<G4HadFinalState*> theResult;
0140
0141 };
0142 #endif