File indexing completed on 2025-01-18 10:06:27
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef Pythia8_NucleonExcitations_H
0009 #define Pythia8_NucleonExcitations_H
0010
0011 #include "Pythia8/HadronWidths.h"
0012 #include "Pythia8/MathTools.h"
0013 #include "Pythia8/ParticleData.h"
0014 #include "Pythia8/PhysicsBase.h"
0015
0016 namespace Pythia8 {
0017
0018
0019
0020
0021
0022
0023 class NucleonExcitations : public PhysicsBase {
0024
0025 public:
0026
0027
0028 NucleonExcitations() = default;
0029
0030
0031 NucleonExcitations(const NucleonExcitations&) = delete;
0032 NucleonExcitations(NucleonExcitations&&) = delete;
0033 NucleonExcitations& operator=(const NucleonExcitations&) = delete;
0034 NucleonExcitations& operator=(NucleonExcitations&&) = delete;
0035
0036
0037 bool init(string path);
0038
0039
0040 bool init(istream& stream);
0041
0042
0043 bool check();
0044
0045
0046 vector<int> getExcitationMasks() const;
0047
0048
0049 vector<pair<int, int>> getChannels() const;
0050
0051
0052 double sigmaExTotal(double eCM) const;
0053
0054
0055 double sigmaExPartial(double eCM, int maskC, int maskD) const;
0056
0057
0058 bool pickExcitation(int idA, int idB, double eCM,
0059 int& idCOut, double& mCOut, int& idDOut, double& mDOut);
0060
0061
0062 double sigmaCalc(double eCM) const {
0063 double sig = 0.;
0064 for (int maskEx : getExcitationMasks())
0065 sig += sigmaCalc(eCM, 0002, maskEx) + sigmaCalc(eCM, 0004, maskEx);
0066 return sig;
0067 }
0068
0069
0070 double sigmaCalc(double eCM, int maskC, int maskD) const;
0071
0072
0073 bool parameterizeAll(int precision, double threshold = 8.);
0074
0075
0076 bool save(ostream& stream) const;
0077 bool save(string file = "NucleonExcitations.dat") const {
0078 ofstream stream(file); return save(stream); }
0079
0080 private:
0081
0082
0083 struct ExcitationChannel {
0084 LinearInterpolator sigma;
0085
0086
0087 int maskA, maskB;
0088
0089
0090 double scaleFactor;
0091 };
0092
0093
0094 vector<ExcitationChannel> excitationChannels;
0095
0096
0097 LinearInterpolator sigmaTotal;
0098
0099
0100 double psSize(double eCM, ParticleDataEntry& prodA,
0101 ParticleDataEntry& prodB) const;
0102
0103 };
0104
0105
0106
0107 }
0108
0109 #endif