File indexing completed on 2025-01-18 09:58:51
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 #ifndef G4ParticleHPAngular_h
0033 #define G4ParticleHPAngular_h 1
0034
0035 #include "G4Cache.hh"
0036 #include "G4ParticleHPLegendreStore.hh"
0037 #include "G4ParticleHPPartial.hh"
0038 #include "G4ReactionProduct.hh"
0039 #include "G4ios.hh"
0040 #include "Randomize.hh"
0041 #include "globals.hh"
0042
0043 #include <fstream>
0044
0045 class G4ParticleHPAngular
0046 {
0047 struct toBeCached
0048 {
0049 const G4ReactionProduct* theProjectileRP{nullptr};
0050 const G4ReactionProduct* theTarget{nullptr};
0051 toBeCached() = default;
0052 };
0053
0054 public:
0055 G4ParticleHPAngular()
0056 {
0057 theIsoFlag = true;
0058 theCoefficients = nullptr;
0059 theProbArray = nullptr;
0060 toBeCached val;
0061 fCache.Put(val);
0062
0063 theAngularDistributionType = 0;
0064 frameFlag = 0;
0065 targetMass = 0.0;
0066 }
0067
0068 ~G4ParticleHPAngular()
0069 {
0070 delete theCoefficients;
0071 delete theProbArray;
0072 }
0073
0074 void Init(std::istream& aDataFile);
0075
0076 void SampleAndUpdate(G4ReactionProduct& anIncidentParticle);
0077
0078 void SetTarget(const G4ReactionProduct& aTarget) { fCache.Get().theTarget = &aTarget; }
0079
0080 void SetProjectileRP(const G4ReactionProduct& anIncidentParticleRP)
0081 {
0082 fCache.Get().theProjectileRP = &anIncidentParticleRP;
0083 }
0084
0085 inline G4double GetTargetMass() { return targetMass; }
0086
0087 private:
0088
0089
0090
0091
0092
0093
0094 G4int theAngularDistributionType;
0095 G4int frameFlag;
0096
0097 G4bool theIsoFlag;
0098
0099 G4ParticleHPLegendreStore* theCoefficients;
0100
0101 G4ParticleHPPartial* theProbArray;
0102
0103
0104 G4double targetMass;
0105
0106 G4Cache<toBeCached> fCache;
0107 };
0108
0109 #endif