15 #ifndef Pythia8_Ropewalk_H
16 #define Pythia8_Ropewalk_H
18 #include "Pythia8/Basics.h"
19 #include "Pythia8/Event.h"
20 #include "Pythia8/FragmentationSystems.h"
21 #include "Pythia8/Info.h"
22 #include "Pythia8/ParticleData.h"
23 #include "Pythia8/Settings.h"
24 #include "Pythia8/PythiaStdlib.h"
43 Particle* getParticlePtr() {
if (!e)
return NULL;
return &(*e)[ne]; }
46 int getNe() {
return ne;}
49 double labrap() {
return getParticlePtr()->y(); }
50 double rap(
double m0){
return getParticlePtr()->y(m0); }
51 double rap(
double m0,
RotBstMatrix& r) {
return getParticlePtr()->y(m0, r); }
77 bool overlap(
double y,
Vec4 ba,
double r0);
112 void addExcitation(
double ylab,
Particle* ex);
123 Vec4 dipoleMomentum();
126 Vec4 bInterpolateDip(
double y,
double m0);
128 Vec4 bInterpolateLab(
double y,
double m0);
134 pair<int, int> getOverlaps(
double yfrac,
double m0,
double r0);
138 overlaps.push_back(d); }
141 double maxRapidity(
double m0) {
return (max(d1.rap(m0), d2.rap(m0))); }
142 double minRapidity(
double m0) {
return (min(d1.rap(m0), d2.rap(m0))); }
145 double maxRapidity(
double m0,
RotBstMatrix& r) {
return (max(d1.rap(m0,r),
147 double minRapidity(
double m0,
RotBstMatrix& r) {
return (min(d1.rap(m0,r),
151 void propagateInit(
double deltat);
154 void propagate(
double deltat,
double m0);
160 void excitationsToString(
double m0,
Event& event);
163 bool hadronized() {
return isHadronized; }
166 int index() {
return iSub; }
171 bool recoil(
Vec4& pg,
bool dummy =
false);
174 void hadronized(
bool h) { isHadronized = h; }
177 int nExcitations() {
return int(excitations.size()); }
192 bool hasRotFrom, hasRotTo;
195 vector<OverlappingRopeDipole> overlaps;
198 map<double, Particle*> excitations;
224 bool calculateOverlaps();
228 double getKappaHere(
int e1,
int e2,
double yfrac);
231 double multiplicity(
double p,
double q) {
232 return ( p < 0 || q < 0 || p + q == 0 )
233 ? 0.0 : 0.5 * (p + 1) * (q + 1) * (p + q + 2);
238 double averageKappa();
241 pair<int, int> select(
int m,
int n,
Rndm* rndm);
244 void shoveTheDipoles(
Event& event);
249 double r0, m0, pTcut;
253 bool shoveJunctionStrings;
255 bool shoveMiniStrings;
257 bool shoveGluonLoops;
265 double gAmplitude, gExponent;
287 typedef multimap<pair<int,int>,
RopeDipole> DMap;
291 vector< vector<Particle> > eParticles;
294 vector<pair<int, int> > states;
295 vector<double> weights;
319 map<string,double> getEffectiveParameters(
double h);
324 static const double DELTAA, ACONV, ZCUT;
327 double getEffectiveA(
double thisb,
double mT2,
bool isDiquark);
330 bool calculateEffectiveParameters(
double h);
333 bool insertEffectiveParameters(
double h);
336 double aEffective(
double aOrig,
double thisb,
double mT2);
339 double fragf(
double z,
double a,
double b,
double mT2);
342 double integrateFragFun(
double a,
double b,
double mT2);
345 double trapIntegrate(
double a,
double b,
double mT2,
double sOld,
int n);
351 map<double, map<string, double> > parameters;
354 map<double, double> aMap;
357 map<double, double> aDiqMap;
360 double aIn, adiqIn, bIn, rhoIn, xIn, yIn, xiIn, sigmaIn, kappaIn;
363 double aEff, adiqEff, bEff, rhoEff, xEff, yEff, xiEff, sigmaEff, kappaEff;
386 particleDataPtrIn,
Info* infoPtrIn,
Ropewalk* rwPtrIn) {
387 settingsPtr = settingsPtrIn, rndmPtr = rndmPtrIn,
388 particleDataPtr = particleDataPtrIn, infoPtr = infoPtrIn,
392 h = settingsPtr->parm(
"Ropewalk:presetKappa");
393 fixedKappa = settingsPtr->flag(
"Ropewalk:setFixedKappa");
394 doBuffon = settingsPtr->flag(
"Ropewalk:doBuffon");
395 rapiditySpan = settingsPtr->parm(
"Ropewalk:rapiditySpan");
396 stringProtonRatio = settingsPtr->parm(
"Ropewalk:stringProtonRatio");
398 fp.init(infoPtr, *settingsPtr);
403 StringPT * pTPtr,
double m2Had, vector<int> iParton,
int endId);
406 void setEnhancement(
double hIn) { h = hIn;}
409 void setEventPtr(
Event& event) { ePtr = &event;}
415 map<string, double> fetchParameters(
double m2Had, vector<int> iParton,
418 map<string, double> fetchParametersBuffon(
double m2Had, vector<int> iParton,
446 double rapiditySpan, stringProtonRatio;
449 vector<int> hadronized;
463 #endif // Pythia8_Ropewalk_H