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" 27 bool init(
string path);
28 bool init(istream& stream);
44 auto iter = entries.find(abs(
id));
45 return iter != entries.end();
49 bool canDecay(
int id,
int prodA,
int prodB)
const;
52 double width(
int id,
double m)
const;
55 double partialWidth(
int idR,
int prodA,
int prodB,
double m)
const;
58 double br(
int idR,
int prodA,
int prodB,
double m)
const;
61 double mDistr(
int id,
double m)
const;
65 double& mAOut,
double& mBOut,
int lType = 1);
69 bool pickDecay(
int idDec,
double m,
int& idAOut,
int& idBOut,
70 double& mAOut,
double& mBOut);
76 double widthCalc(
int id,
int prodA,
int prodB,
double m)
const;
87 bool save(ostream& stream)
const;
88 bool save(
string file =
"HadronWidths.dat")
const {
89 ofstream stream(file);
return save(stream); }
94 struct ResonanceDecayChannel {
106 struct HadronWidthEntry {
108 map<pair<int, int>, ResonanceDecayChannel> decayChannels;
113 map<int, HadronWidthEntry> entries;
116 pair<int, int> getKey(
int& idR,
int idA,
int idB)
const;
119 map<int, vector<int>> signatureToParticles;
122 int getSignature(
int baryonNumber,
int charge)
const;
125 double psSize(
double eCM, ParticleDataEntryPtr prodA,
126 ParticleDataEntryPtr prodB,
double lType)
const;
132 bool parameterizeRecursive(
int id,
int precision);
bool save(ostream &stream) const
Write all width data to an xml file.
Definition: HadronWidths.cc:1117
Definition: PhysicsBase.h:27
bool pickDecay(int idDec, double m, int &idAOut, int &idBOut, double &mAOut, double &mBOut)
Definition: HadronWidths.cc:531
double mDistr(int id, double m) const
Get the mass distribution density for the particle at the specified mass.
Definition: HadronWidths.cc:518
bool init(string path)
Load hadron widths data from an xml file.
Definition: HadronWidths.cc:58
double partialWidth(int idR, int prodA, int prodB, double m) const
Get the partial width for the specified decay channel of the particle.
Definition: HadronWidths.cc:422
double width(int id, double m) const
Get the total width of the specified particle at the specified mass.
Definition: HadronWidths.cc:391
bool canDecay(int id, int prodA, int prodB) const
Get whether the resonance can decay into the specified products.
Definition: HadronWidths.cc:374
This class holds info on a single decay channel.
Definition: ParticleData.h:35
bool parameterize(int id, int precision=50)
Regenerate parameterization for particle and its decay products if needed.
Definition: HadronWidths.cc:866
bool hasData(int id) const
Returns whether the specified particle is handled by HadronWidths.
Definition: HadronWidths.h:43
Definition: HadronWidths.h:22
double widthCalc(int id, double m) const
Calculate the total width of the particle without using interpolation.
Definition: HadronWidths.cc:757
bool hasResonances(int idA, int idB) const
Get whether the specified incoming particles can form a resonance.
Definition: HadronWidths.cc:293
bool check()
Check whether input data is valid and matches particle data.
Definition: HadronWidths.cc:189
void parameterizeAll(int precision=50)
Regenerate parameterization for all particles.
Definition: HadronWidths.cc:1090
set< int > getResonances() const
Get all implemented resonances.
Definition: HadronWidths.cc:325
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
double m(const Vec4 &v1)
Invariant mass and its square.
Definition: Basics.cc:595
Definition: MathTools.h:65
double br(int idR, int prodA, int prodB, double m) const
Get the branching ratio for the specified decay channel of the particle.
Definition: HadronWidths.cc:462
bool pickMasses(int idA, int idB, double eCM, double &mAOut, double &mBOut, int lType=1)
Sample masses for the outgoing system with a given eCM.
Definition: HadronWidths.cc:630