StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
LowEnergySigma.h
1 // LowEnergySigma.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2020 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
5 
6 // Header file for cross sections for of energy hadron-hadron collisions.
7 
8 #ifndef Pythia8_LowEnergySigma_H
9 #define Pythia8_LowEnergySigma_H
10 
11 #include "Pythia8/HadronWidths.h"
12 #include "Pythia8/NucleonExcitations.h"
13 #include "Pythia8/PhysicsBase.h"
14 
15 namespace Pythia8 {
16 
17 //==========================================================================
18 
19 // Gets cross sections for hadron-hadron collisions at low energies.
20 
21 class LowEnergySigma : public PhysicsBase {
22 
23 public:
24 
25  // Initialize.
26  void init(NucleonExcitations* nucleonExcitationsPtrIn);
27 
28  // Get the total cross section for the specified collision.
29  double sigmaTotal(int idA, int idB, double eCM, double mA, double mB);
30  double sigmaTotal(int idAIn, int idBIn, double eCMIn) {
31  double mA0 = particleDataPtr->m0(idAIn), mB0 = particleDataPtr->m0(idBIn);
32  return sigmaTotal(idAIn, idBIn, eCMIn, mA0, mB0); }
33 
34  // Get the partial cross section for the specified collision and process.
35  // proc | 0: total; | 1: nondiff; | 2 : el; | 3: SD (XB); | 4: SD (AX);
36  // | 5: DD; | 6: CD (AXB, not implemented)
37  // | 7: excitation | 8: annihilation | 9: resonant
38  // | >100: resonant through the specified resonance particle
39  double sigmaPartial(int idA, int idB, double eCM,
40  double mA, double mB, int proc);
41  double sigmaPartial(int idAIn, int idBIn, double eCMIn, int proc) {
42  double mA0 = particleDataPtr->m0(idAIn), mB0 = particleDataPtr->m0(idBIn);
43  return sigmaPartial(idAIn, idBIn, eCMIn, mA0, mB0, proc); }
44 
45  // Gets all partial cross sections for the specified collision.
46  // This is used when all cross sections are needed to determine which
47  // process to execute. Returns false if no processes are available.
48  bool sigmaPartial(int idA, int idB, double eCM, double mA, double mB,
49  vector<int>& procsOut, vector<double>& sigmasOut);
50  double sigmaPartial(int idAIn, int idBIn, double eCMIn,
51  vector<int>& procsOut, vector<double>& sigmasOut) {
52  double mA0 = particleDataPtr->m0(idAIn), mB0 = particleDataPtr->m0(idBIn);
53  return sigmaPartial(idAIn, idBIn, eCMIn, mA0, mB0, procsOut, sigmasOut); }
54 
55  // Picks a process randomly according to their partial cross sections.
56  int pickProcess(int idA, int idB, double eCM, double mA, double mB);
57 
58  // Picks a resonance according to their partial cross sections.
59  int pickResonance(int idA, int idB, double eCM);
60 
61  // For NN / N Nbar / Nbar Nbar collisions explicit excitation states.
62  // replace a generic smeared-out low-mass diffraction component.
63  bool hasExcitation(int idAIn, int idBIn) const { return (abs(idAIn) == 2212
64  || abs(idAIn) == 2112) && (abs(idBIn) == 2212 || abs(idBIn) == 2112); }
65 
66 private:
67 
68  NucleonExcitations* nucleonExcitationsPtr;
69 
70  // Masses and parameters.
71  double mp, sp, s4p, mpi, mK,
72  sEffAQM, cEffAQM, bEffAQM, fracEtass, fracEtaPss;
73 
74  // Flag for disabling inelastic cross sections.
75  bool doInelastic;
76 
77  // Mode for calculating total cross sections for pi pi and pi K.
78  bool useSummedResonances;
79 
80  // Current configuration.
81  int idA, idB;
82  double mA, mB, eCM;
83  int collType;
84  bool didFlipSign, didSwapIds;
85 
86  // Cached cross sections.
87  double sigTot, sigND, sigEl, sigXB, sigAX, sigXX, sigAnn, sigEx, sigResTot;
88  vector<pair<int, double>> sigRes;
89 
90  // Set current configuration, ordering inputs hadrons in a canonical way.
91  void setConfig(int idAIn, int idBIn, double eCMIn, double mAIn, double mBIn);
92 
93  // Methods for computing cross sections.
94  void calcTot();
95  void calcRes();
96  double calcRes(int idR) const;
97  void calcEla();
98  void calcEx();
99  void calcDiff();
100 
101  // HPR1R2 fit for parameterizing certain total cross sections.
102  double HPR1R2(double p, double r1, double r2, double mA, double mB, double s)
103  const;
104 
105  // HERA/CERN fit for parameterizing certain elastic cross sections.
106  double HERAFit(double a, double b, double n, double c, double d, double p)
107  const;
108 
109  // Additive quark model for generic collisions and for scale factors.
110  double nqEffAQM(int id) const;
111  double factorAQM() const;
112  double totalAQM() const;
113  double elasticAQM() const;
114 
115  // LowEnergyProcess should have access to nqEffAQM for slope in t.
116  friend class LowEnergyProcess;
117 
118  // Check which cross sections contain explicit resonances.
119  bool hasExplicitResonances() const;
120  double meltpoint(int idX, int idM) const;
121 
122 };
123 
124 }
125 
126 #endif