8 #ifndef Pythia8_HadronWidths_H
9 #define Pythia8_HadronWidths_H
11 #include "Pythia8/MathTools.h"
12 #include "Pythia8/ParticleData.h"
13 #include "Pythia8/PhysicsBase.h"
31 bool init(
string path);
32 bool init(istream& stream);
38 vector<int> getResonances()
const;
41 bool hasResonances(
int idA,
int idB)
const;
44 vector<int> possibleResonances(
int idA,
int idB)
const;
47 bool hasData(
int id)
const {
48 auto iter = entries.find(abs(
id));
49 return iter != entries.end();
53 bool canDecay(
int id,
int prodA,
int prodB)
const;
56 double width(
int id,
double m)
const;
59 double partialWidth(
int idR,
int prodA,
int prodB,
double m)
const;
62 double br(
int idR,
int prodA,
int prodB,
double m)
const;
65 double mDistr(
int id,
double m)
const;
68 bool pickMasses(
int idA,
int idB,
double eCM,
69 double& mAOut,
double& mBOut,
int lType = 1);
73 bool pickDecay(
int idDec,
double m,
int& idAOut,
int& idBOut,
74 double& mAOut,
double& mBOut);
77 double widthCalc(
int id,
double m)
const;
80 double widthCalc(
int id,
int prodA,
int prodB,
double m)
const;
83 bool parameterize(
int id,
int precision);
86 void parameterizeAll(
int precision);
89 bool save(ostream& stream)
const;
90 bool save(
string file =
"HadronWidths.dat")
const {
91 ofstream stream(file);
return save(stream); }
96 struct ResonanceDecayChannel {
108 struct HadronWidthEntry {
110 map<pair<int, int>, ResonanceDecayChannel> decayChannels;
114 map<int, HadronWidthEntry> entries;
117 pair<int, int> getKey(
int& idR,
int idA,
int idB)
const;
120 map<int, vector<int>> signatureToParticles;
123 int getSignature(
int baryonNumber,
int charge)
const;
130 double widthCalc(
int id,
DecayChannel& channel,
double m)
const;
133 bool parameterizeRecursive(
int id,
int precision);
141 #endif // Pythia8_HadronWidths_H