6 #ifndef Pythia8_HadronScatter_H
7 #define Pythia8_HadronScatter_H
11 #include "ParticleData.h"
12 #include "PythiaComplex.h"
29 bool readFile(
string,
string);
32 bool setSubprocess(
int);
33 bool setSubprocess(
int,
int);
36 double sigmaEl(
double Wcm) {
return sigma(0, Wcm); }
37 double sigmaTot(
double Wcm) {
return sigma(1, Wcm); }
38 double dSigma(
double Wcm,
double cTheta) {
return sigma(2, Wcm, cTheta); }
41 double pickCosTheta(
double);
44 double getSigmaElMax() {
return sigElMax; }
53 static const int LSHIFT, ISHIFT, SUBBIN, ITER;
54 static const double CONVERT2MB, WCMBIN, CTBIN, MASSSAFETY, GRIDSAFETY;
55 static const complex BINEND;
58 int process, subprocess, subprocessMax, norm;
61 int idA, idB, Lmax, Imax;
64 double mA, mB, binMax, sigElMax;
69 map < int, pair < int, int > > sp2in;
70 map < pair < int, int >,
int > in2sp;
73 map < int, map < int, double > > isoCoeff;
77 map < int, map < double, complex > > pwData;
80 vector < double > PlVec, PlpVec;
83 vector < vector < vector < double > > > gridMax;
84 vector < vector < double > > gridNorm;
87 void setupSubprocesses();
93 double sigma(
int,
double,
double = 0.);
96 void legendreP(
double,
bool =
false);
108 typedef pair < int, int > HSIndex;
114 const HSIndex &i2in,
int yt2in,
int pt2in,
116 i1(i1in), yt1(yt1in), pt1(pt1in),
117 i2(i2in), yt2(yt2in), pt2(pt2in),
118 measure(measureIn) {}
122 return this->measure < in.measure;
151 void scatter(
Event&);
160 bool doHadronScatter, afterDecay, allowDecayProd,
161 scatterRepeat, doTile;
162 int hadronSelect, scatterProb;
163 double Npar, kPar, pPar, jPar, rMax, rMax2;
164 double pTsigma, pTsigma2, pT0MPI;
168 double yMin, yMax, ytSize, ptSize;
169 vector < vector < set < HSIndex > > > tile;
172 set < HSIndex > scattered;
181 bool canScatter(
Event &,
int);
184 bool doesScatter(
Event &,
const HSIndex &,
const HSIndex &);
187 double measure(
Event &,
int,
int);
193 bool tileIntProb(vector < HadronScatterPair > &,
Event &,
194 const HSIndex &,
int,
int,
bool);
195 int yTile(
Event& event,
int idx) {
196 return (doTile) ? int((event[idx].y() - yMin) / ytSize) : 0;
198 int pTile(
Event& event,
int idx) {
199 return (doTile) ? int((event[idx].phi() + M_PI) / ptSize) : 0;
211 #endif // Pythia8_HadronScatter_H