PYTHIA  8.314
DireSplittingsQED.h
1 // DireWeightContainer.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2025 Stefan Prestel, 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 Dire QED splittings.
7 
8 #ifndef Pythia8_DireSplittingsQED_H
9 #define Pythia8_DireSplittingsQED_H
10 
11 #define DIRE_SPLITTINGSQED_VERSION "2.002"
12 
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/BeamParticle.h"
15 #include "Pythia8/ParticleData.h"
16 #include "Pythia8/PythiaStdlib.h"
17 #include "Pythia8/Settings.h"
18 #include "Pythia8/StandardModel.h"
19 
20 #include "Pythia8/DireSplittingsQCD.h"
21 
22 namespace Pythia8 {
23 
24 //==========================================================================
25 
27 
28 public:
29 
30  // Constructor and destructor.
31  DireSplittingQED(string idIn, int softRS, Settings* settings,
32  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
33  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
34  DireSplittingQCD(idIn, softRS, settings, particleData, rndm, beamA, beamB,
35  coupSM,info, direInfo) {init();}
36  virtual ~DireSplittingQED() {}
37 
38  void init();
39 
40  // Class members.
41  double sumCharge2Tot, sumCharge2L, sumCharge2Q, aem0, enhance, pT2min,
42  pT2minL, pT2minQ, pT2minA, pT2minForcePos;
43  bool doQEDshowerByQ, doQEDshowerByL, doForcePos;
44 
45  AlphaEM alphaEM;
46 
47  // Function to calculate the correct running coupling/2*Pi value, including
48  // renormalisation scale variations + threshold matching.
49  double aem2Pi ( double pT2, int = 0);
50 
51  bool useFastFunctions() { return true; }
52 
53  virtual vector <int> radAndEmt(int idDaughter, int)
54  { return createvector<int>(motherID(idDaughter))(sisterID(idDaughter)); }
55  virtual int nEmissions() { return 1; }
56  virtual bool isPartial() { return true; }
57 
58  virtual int couplingType (int, int) { return 2; }
59  virtual double coupling (double = 0., double = 0., double = 0., double = -1,
60  pair<int,bool> = pair<int,bool>(), pair<int,bool> = pair<int,bool>()) {
61  return (aem0 / (2.*M_PI));
62  }
63  virtual double couplingScale2 (double = 0., double = 0., double = 0.,
64  pair<int,bool> = pair<int,bool>(), pair<int,bool> = pair<int,bool>()) {
65  return -1.;
66  }
67 
68  virtual bool aboveCutoff( double t, const Particle& radBef,
69  const Particle& recBef, int iSys, PartonSystems* partonSystemsPtr);
70 
71 };
72 
73 //==========================================================================
74 
76 
77 public:
78 
79  Dire_fsr_qed_Q2QA(string idIn, int softRS, Settings* settings,
80  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
81  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
82  DireSplittingQED(idIn, softRS, settings, particleData, rndm, beamA, beamB,
83  coupSM, info, direInfo){}
84 
85  bool canRadiate ( const Event&, pair<int,int>,
86  unordered_map<string,bool> = unordered_map<string,bool>(),
87  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
88  bool canRadiate ( const Event&, int iRadBef, int iRecBef,
89  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
90 
91  int kinMap ();
92 
93  // Return id of mother after splitting.
94  int motherID(int idDaughter);
95 
96  // Return id of emission.
97  int sisterID(int idDaughter);
98 
99  // Return id of recombined radiator (before splitting!)
100  int radBefID(int idRadAfter, int idEmtAfter);
101 
102  // Return colours of recombined radiator (before splitting!)
103  pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
104  int colEmtAfter, int acolEmtAfter);
105 
106  vector<pair<int,int> > radAndEmtCols(int iRad, int, Event state) {
108  (make_pair(state[iRad].col(),state[iRad].acol()))(make_pair(0, 0));
109  }
110 
111  double gaugeFactor ( int=0, int=0 );
112  double symmetryFactor ( int=0, int=0 );
113 
114  vector <int> recPositions( const Event& state, int iRad, int iEmt);
115 
116  // Pick z for new splitting.
117  double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
118 
119  // New overestimates, z-integrated versions.
120  double overestimateInt(double zMinAbs,double zMaxAbs,
121  double pT2Old, double m2dip, int order = -1);
122 
123  // Return kernel for new splitting.
124  double overestimateDiff(double z, double m2dip, int order = -1);
125 
126  // Functions to calculate the kernel from SplitInfo information.
127  bool calc(const Event& state = Event(), int order = -1);
128 
129 };
130 
131 //==========================================================================
132 
134 
135 public:
136 
137  Dire_fsr_qed_Q2AQ(string idIn, int softRS, Settings* settings,
138  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
139  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
140  DireSplittingQED(idIn, softRS, settings, particleData, rndm, beamA, beamB,
141  coupSM, info, direInfo){}
142 
143  bool canRadiate ( const Event&, pair<int,int>,
144  unordered_map<string,bool> = unordered_map<string,bool>(),
145  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
146  bool canRadiate ( const Event&, int iRadBef, int iRecBef,
147  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
148 
149  int kinMap ();
150 
151  // Return id of mother after splitting.
152  int motherID(int idDaughter);
153 
154  vector<pair<int,int> > radAndEmtCols(int iRad, int, Event state) {
156  (make_pair(state[iRad].col(),state[iRad].acol()))(make_pair(0, 0));
157  }
158 
159  // Return id of emission.
160  int sisterID(int idDaughter);
161 
162  // Return id of recombined radiator (before splitting!)
163  int radBefID(int idRadAfter, int idEmtAfter);
164 
165  // Return colours of recombined radiator (before splitting!)
166  pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
167  int colEmtAfter, int acolEmtAfter);
168 
169  double gaugeFactor ( int=0, int=0 );
170  double symmetryFactor ( int=0, int=0 );
171 
172  vector <int> recPositions( const Event& state, int iRad, int iEmt);
173 
174  // Pick z for new splitting.
175  double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
176 
177  // New overestimates, z-integrated versions.
178  double overestimateInt(double zMinAbs,double zMaxAbs,
179  double pT2Old, double m2dip, int order = -1);
180 
181  // Return kernel for new splitting.
182  double overestimateDiff(double z, double m2dip, int order = -1);
183 
184  // Functions to calculate the kernel from SplitInfo information.
185  bool calc(const Event& state = Event(), int order = -1);
186 
187 };
188 
189 //==========================================================================
190 
192 
193 public:
194 
195  Dire_fsr_qed_L2LA(string idIn, int softRS, Settings* settings,
196  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
197  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
198  DireSplittingQED(idIn, softRS, settings, particleData, rndm, beamA, beamB,
199  coupSM, info, direInfo){}
200 
201  bool canRadiate ( const Event&, pair<int,int>,
202  unordered_map<string,bool> = unordered_map<string,bool>(),
203  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
204  bool canRadiate ( const Event&, int iRadBef, int iRecBef,
205  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
206 
207  int kinMap ();
208 
209  // Return id of mother after splitting.
210  int motherID(int idDaughter);
211 
212  // Return id of emission.
213  int sisterID(int idDaughter);
214 
215  // Return id of recombined radiator (before splitting!)
216  int radBefID(int idRadAfter, int idEmtAfter);
217 
218  // Return colours of recombined radiator (before splitting!)
219  pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
220  int colEmtAfter, int acolEmtAfter);
221 
222  vector<pair<int,int> > radAndEmtCols(int, int, Event) {
223  return createvector<pair<int,int> > (make_pair(0,0))(make_pair(0, 0));
224  }
225 
226  double gaugeFactor ( int=0, int=0 );
227  double symmetryFactor ( int=0, int=0 );
228 
229  vector <int> recPositions( const Event& state, int iRad, int iEmt);
230 
231  // Pick z for new splitting.
232  double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
233 
234  // New overestimates, z-integrated versions.
235  double overestimateInt(double zMinAbs,double zMaxAbs,
236  double pT2Old, double m2dip, int order = -1);
237 
238  // Return kernel for new splitting.
239  double overestimateDiff(double z, double m2dip, int order = -1);
240 
241  // Functions to calculate the kernel from SplitInfo information.
242  bool calc(const Event& state = Event(), int order = -1);
243 
244 };
245 
246 //==========================================================================
247 
249 
250 public:
251 
252  Dire_fsr_qed_L2AL(string idIn, int softRS, Settings* settings,
253  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
254  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
255  DireSplittingQED(idIn, softRS, settings, particleData, rndm, beamA, beamB,
256  coupSM, info, direInfo){}
257 
258  bool canRadiate ( const Event&, pair<int,int>,
259  unordered_map<string,bool> = unordered_map<string,bool>(),
260  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
261  bool canRadiate ( const Event&, int iRadBef, int iRecBef,
262  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
263 
264  int kinMap ();
265 
266  // Return id of mother after splitting.
267  int motherID(int idDaughter);
268 
269  // Return id of emission.
270  int sisterID(int idDaughter);
271 
272  // Return id of recombined radiator (before splitting!)
273  int radBefID(int idRadAfter, int idEmtAfter);
274 
275  // Return colours of recombined radiator (before splitting!)
276  pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
277  int colEmtAfter, int acolEmtAfter);
278 
279  vector<pair<int,int> > radAndEmtCols(int, int, Event) {
280  return createvector<pair<int,int> > (make_pair(0,0))(make_pair(0, 0));
281  }
282 
283  double gaugeFactor ( int=0, int=0 );
284  double symmetryFactor ( int=0, int=0 );
285 
286  vector <int> recPositions( const Event& state, int iRad, int iEmt);
287 
288  // Pick z for new splitting.
289  double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
290 
291  // New overestimates, z-integrated versions.
292  double overestimateInt(double zMinAbs,double zMaxAbs,
293  double pT2Old, double m2dip, int order = -1);
294 
295  // Return kernel for new splitting.
296  double overestimateDiff(double z, double m2dip, int order = -1);
297 
298  // Functions to calculate the kernel from SplitInfo information.
299  bool calc(const Event& state = Event(), int order = -1);
300 
301 };
302 
303 //==========================================================================
304 
306 
307 public:
308 
309  int idRadAfterSave;
310  double nchSaved;
311 
312  Dire_fsr_qed_A2FF(int idRadAfterIn, string idIn, int softRS,
313  Settings* settings,
314  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
315  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
316  DireSplittingQED(idIn,
317  softRS, settings, particleData, rndm, beamA, beamB, coupSM, info,
318  direInfo),
319  idRadAfterSave(idRadAfterIn), nchSaved(1) {}
320  bool canRadiate ( const Event& state, pair<int,int> ints,
321  unordered_map<string,bool> = unordered_map<string,bool>(),
322  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr) {
323  return ( state[ints.first].isFinal()
324  && state[ints.first].id() == 22
325  && state[ints.second].isCharged());
326  }
327  bool canRadiate ( const Event& state, int iRadBef, int iRecBef,
328  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr) {
329  return ( state[iRadBef].isFinal()
330  && state[iRadBef].id() == 22
331  && state[iRecBef].isCharged());
332  }
333 
334  int kinMap () { return 1;};
335  bool canUseForBranching() { return true; }
336  bool isPartial() { return false; }
337 
338  vector<pair<int,int> > radAndEmtCols(int iRad, int, Event state) {
339  vector< pair<int,int> > ret;
340  if (state[iRad].id() != 22) return ret;
341  ret = createvector<pair<int,int> >(make_pair(0, 0))(make_pair(0, 0));
342  if (particleDataPtr->colType(idRadAfterSave) != 0) {
343  int sign = (idRadAfterSave > 0) ? 1 : -1;
344  int newCol = state.nextColTag();
345  if (sign> 0) {
346  ret[0].first = newCol;
347  ret[0].second = 0;
348  ret[1].first = 0;
349  ret[1].second = newCol;
350  } else {
351  ret[0].first = 0;
352  ret[0].second = newCol;
353  ret[1].first = newCol;
354  ret[1].second = 0;
355  }
356  }
357  return ret;
358  }
359 
360  // Return id of mother after splitting.
361  int motherID(int)
362  { return idRadAfterSave; }
363  int sisterID(int)
364  { return -idRadAfterSave; }
365  vector <int> radAndEmt(int, int)
366  { return createvector<int>(idRadAfterSave)(-idRadAfterSave); }
367  //{ return createvector<int>(1)(-1); }
368  double gaugeFactor ( int=0, int=0 )
369  { return pow2(particleDataPtr->charge(idRadAfterSave)); }
370  double symmetryFactor ( int=0, int=0 )
371  { return 1./double(nchSaved); }
372  // Return id of recombined radiator (before splitting!)
373  int radBefID(int idRadAfter, int idEmtAfter) {
374  if ( idRadAfter == idRadAfterSave
375  && particleDataPtr->isQuark(idRadAfter)
376  && particleDataPtr->isQuark(idEmtAfter)) return 22;
377  return 0;
378  }
379  // Return colours of recombined radiator (before splitting!)
380  pair<int,int> radBefCols(int, int, int, int) { return make_pair(0,0); }
381 
382  // All charged particles are potential recoilers.
383  vector <int> recPositions( const Event& state, int iRad, int iEmt) {
384  if ( state[iRad].isFinal() || state[iRad].id() != idRadAfterSave
385  || state[iEmt].id() != -idRadAfterSave) return vector<int>();
386  // Particles to exclude as recoilers.
387  vector<int> iExc(createvector<int>(iRad)(iEmt));
388  // Find charged particles.
389  vector<int> recs;
390  for (int i=0; i < state.size(); ++i) {
391  if ( find(iExc.begin(), iExc.end(), i) != iExc.end() ) continue;
392  if ( state[i].isCharged() ) {
393  if (state[i].isFinal())
394  recs.push_back(i);
395  if (state[i].mother1() == 1 && state[i].mother2() == 0)
396  recs.push_back(i);
397  if (state[i].mother1() == 2 && state[i].mother2() == 0)
398  recs.push_back(i);
399  }
400  }
401  // Done.
402  return recs;
403  }
404 
405  // All charged particles are potential recoilers.
406  int set_nCharged( const Event& state) {
407  // Find charged particles.
408  int nch=0;
409  for (int i=0; i < state.size(); ++i) {
410  if ( state[i].isCharged() ) {
411  if (state[i].isFinal()) nch++;
412  if (state[i].mother1() == 1 && state[i].mother2() == 0) nch++;
413  if (state[i].mother1() == 2 && state[i].mother2() == 0) nch++;
414  }
415  }
416  // Done.
417  nchSaved = nch;
418  return nch;
419  }
420 
421  // Pick z for new splitting.
422  double zSplit(double zMinAbs, double zMaxAbs, double /*m2dip*/) {
423  return (zMinAbs + rndmPtr->flat() * (zMaxAbs - zMinAbs));
424  }
425 
426  // New overestimates, z-integrated versions.
427  double overestimateInt(double zMinAbs,double zMaxAbs,
428  double /*pT2Old*/, double /*m2dip*/, int /*order*/ = -1) {
429  double preFac = symmetryFactor() * gaugeFactor();
430  double wt = 2. *enhance * preFac * 0.5 * ( zMaxAbs - zMinAbs);
431  return wt;
432  }
433 
434  // Return kernel for new splitting.
435  double overestimateDiff(double /*z*/, double /*m2dip*/, int /*order*/ = -1) {
436  double preFac = symmetryFactor() * gaugeFactor();
437  double wt = 2. *enhance * preFac * 0.5;
438  return wt;
439  }
440 
441  // Functions to calculate the kernel from SplitInfo information.
442  bool calc(const Event& state, int orderNow) {
443 
444  // Dummy statement to avoid compiler warnings.
445  if (false) cout << state[0].e() << orderNow << endl;
446 
447  // Read all splitting variables.
448  double z(splitInfo.kinematics()->z), pT2(splitInfo.kinematics()->pT2),
449  m2dip(splitInfo.kinematics()->m2Dip),
450  //m2RadBef(splitInfo.kinematics()->m2RadBef),
451  m2Rad(splitInfo.kinematics()->m2RadAft),
452  m2Rec(splitInfo.kinematics()->m2Rec),
453  m2Emt(splitInfo.kinematics()->m2EmtAft);
454  int splitType(splitInfo.type);
455 
456  // Set number of recoilers.
457  set_nCharged(state);
458 
459  double wt = 0.;
460  double preFac = symmetryFactor() * gaugeFactor();
461  double kappa2 = pT2/m2dip;
462  wt = preFac
463  * (pow(1.-z,2.) + pow(z,2.));
464 
465  // Correction for massive splittings.
466  bool doMassive = (abs(splitType) == 2);
467 
468  if (doMassive) {
469 
470  double vijk = 1., pipj = 0.;
471 
472  // splitType == 2 -> Massive FF
473  if (splitType == 2) {
474  // Calculate CS variables.
475  double yCS = kappa2 / (1.-z);
476  double nu2Rad = m2Rad/m2dip;
477  double nu2Emt = m2Emt/m2dip;
478  double nu2Rec = m2Rec/m2dip;
479  vijk = pow2(1.-yCS) - 4.*(yCS+nu2Rad+nu2Emt)*nu2Rec;
480  vijk = sqrt(vijk) / (1-yCS);
481  pipj = m2dip * yCS /2.;
482 
483  // splitType ==-2 -> Massive FI
484  } else if (splitType ==-2) {
485  // Calculate CS variables.
486  double xCS = 1 - kappa2/(1.-z);
487  vijk = 1.;
488  pipj = m2dip/2. * (1-xCS)/xCS;
489  }
490 
491  // Reset kernel for massive splittings.
492  wt = preFac * 1. / vijk * ( pow2(1.-z) + pow2(z)
493  + m2Emt / ( pipj + m2Emt) );
494  }
495 
496  // Multiply with z factor
497  if (idRadAfterSave > 0) wt *= z;
498  else wt *= 1.-z;
499 
500  // Trivial map of values, since kernel does not depend on coupling.
501  unordered_map<string,double> wts;
502  wts.insert( make_pair("base", wt ));
503  if (doVariations) {
504  // Create muR-variations.
505  if (settingsPtr->parm("Variations:muRfsrDown") != 1.)
506  wts.insert( make_pair("Variations:muRfsrDown", wt ));
507  if (settingsPtr->parm("Variations:muRfsrUp") != 1.)
508  wts.insert( make_pair("Variations:muRfsrUp", wt ));
509  }
510 
511  // Store kernel values.
512  clearKernels();
513  for ( unordered_map<string,double>::iterator it = wts.begin();
514  it != wts.end(); ++it )
515  kernelVals.insert(make_pair( it->first, it->second ));
516 
517  return true;
518  }
519 
520 };
521 
522 
523 //==========================================================================
524 
526 
527 public:
528 
529  Dire_isr_qed_Q2QA(string idIn, int softRS, Settings* settings,
530  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
531  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
532  DireSplittingQED(idIn, softRS, settings, particleData, rndm, beamA, beamB,
533  coupSM, info, direInfo){}
534 
535  bool canRadiate ( const Event&, pair<int,int>,
536  unordered_map<string,bool> = unordered_map<string,bool>(),
537  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
538  bool canRadiate ( const Event&, int iRadBef, int iRecBef,
539  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
540 
541  int kinMap ();
542 
543  // Return id of mother after splitting.
544  int motherID(int idDaughter);
545 
546  // Return id of emission.
547  int sisterID(int idDaughter);
548 
549  // Return id of recombined radiator (before splitting!)
550  int radBefID(int idRadAfter, int idEmtAfter);
551 
552  // Return colours of recombined radiator (before splitting!)
553  pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
554  int colEmtAfter, int acolEmtAfter);
555 
556  vector<pair<int,int> > radAndEmtCols(int iRad, int, Event state) {
558  (make_pair(state[iRad].col(),state[iRad].acol()))(make_pair(0, 0));
559  }
560 
561  double gaugeFactor ( int=0, int=0 );
562  double symmetryFactor ( int=0, int=0 );
563 
564  vector <int> recPositions( const Event& state, int iRad, int iEmt);
565 
566  // Pick z for new splitting.
567  double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
568 
569  // New overestimates, z-integrated versions.
570  double overestimateInt(double zMinAbs,double zMaxAbs,
571  double pT2Old, double m2dip, int order = -1);
572 
573  // Return kernel for new splitting.
574  double overestimateDiff(double z, double m2dip, int order = -1);
575 
576  // Functions to calculate the kernel from SplitInfo information.
577  bool calc(const Event& state = Event(), int order = -1);
578 
579 };
580 
582 
583 public:
584 
585  Dire_isr_qed_A2QQ(string idIn, int softRS, Settings* settings,
586  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
587  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
588  DireSplittingQED(idIn, softRS, settings, particleData, rndm, beamA, beamB,
589  coupSM, info, direInfo){}
590 
591  bool canRadiate ( const Event&, pair<int,int>,
592  unordered_map<string,bool> = unordered_map<string,bool>(),
593  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
594  bool canRadiate ( const Event&, int iRadBef, int iRecBef,
595  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
596 
597  int kinMap ();
598 
599  // Return id of mother after splitting.
600  int motherID(int idDaughter);
601 
602  // Return id of emission.
603  int sisterID(int idDaughter);
604 
605  // Return id of recombined radiator (before splitting!)
606  int radBefID(int idRadAfter, int idEmtAfter);
607 
608  // Return colours of recombined radiator (before splitting!)
609  pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
610  int colEmtAfter, int acolEmtAfter);
611 
612  vector<pair<int,int> > radAndEmtCols(int iRad, int, Event state) {
614  (make_pair(0, 0))(make_pair(state[iRad].acol(),state[iRad].col()));
615  }
616 
617  double gaugeFactor ( int=0, int=0 );
618  double symmetryFactor ( int=0, int=0 );
619 
620  // Pick z for new splitting.
621  double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
622 
623  // New overestimates, z-integrated versions.
624  double overestimateInt(double zMinAbs,double zMaxAbs,
625  double pT2Old, double m2dip, int order = -1);
626 
627  // Return kernel for new splitting.
628  double overestimateDiff(double z, double m2dip, int order = -1);
629 
630  // Functions to calculate the kernel from SplitInfo information.
631  bool calc(const Event& state = Event(), int order = -1);
632 
633 };
634 
636 
637 public:
638 
639  Dire_isr_qed_Q2AQ(string idIn, int softRS, Settings* settings,
640  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
641  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
642  DireSplittingQED(idIn, softRS, settings, particleData, rndm, beamA, beamB,
643  coupSM, info, direInfo){}
644 
645  bool canRadiate ( const Event&, pair<int,int>,
646  unordered_map<string,bool> = unordered_map<string,bool>(),
647  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
648  bool canRadiate ( const Event&, int iRadBef, int iRecBef,
649  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
650 
651  int kinMap ();
652 
653  // Return id of mother after splitting.
654  int motherID(int idDaughter);
655 
656  // Return id of emission.
657  int sisterID(int idDaughter);
658 
659  // Return id of recombined radiator (before splitting!)
660  int radBefID(int idRadAfter, int idEmtAfter);
661 
662  // Return colours of recombined radiator (before splitting!)
663  pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
664  int colEmtAfter, int acolEmtAfter);
665 
666  vector<pair<int,int> > radAndEmtCols(int, int colType, Event state) {
667  int newCol = state.nextColTag();
668  if (colType > 0) return createvector<pair<int,int> >
669  (make_pair(newCol,0))(make_pair(newCol,0));
671  (make_pair(0,newCol))(make_pair(0,newCol));
672  }
673 
674  double gaugeFactor ( int=0, int=0 );
675  double symmetryFactor ( int=0, int=0 );
676 
677  // Pick z for new splitting.
678  double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
679 
680  // New overestimates, z-integrated versions.
681  double overestimateInt(double zMinAbs,double zMaxAbs,
682  double pT2Old, double m2dip, int order = -1);
683 
684  // Return kernel for new splitting.
685  double overestimateDiff(double z, double m2dip, int order = -1);
686 
687  // Functions to calculate the kernel from SplitInfo information.
688  bool calc(const Event& state = Event(), int order = -1);
689 
690 };
691 
693 
694 public:
695 
696  Dire_isr_qed_L2LA(string idIn, int softRS, Settings* settings,
697  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
698  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
699  DireSplittingQED(idIn, softRS, settings, particleData, rndm, beamA, beamB,
700  coupSM, info, direInfo){}
701 
702  bool canRadiate ( const Event&, pair<int,int>,
703  unordered_map<string,bool> = unordered_map<string,bool>(),
704  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
705  bool canRadiate ( const Event&, int iRadBef, int iRecBef,
706  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
707 
708  int kinMap ();
709 
710  // Return id of mother after splitting.
711  int motherID(int idDaughter);
712 
713  // Return id of emission.
714  int sisterID(int idDaughter);
715 
716  // Return id of recombined radiator (before splitting!)
717  int radBefID(int idRadAfter, int idEmtAfter);
718 
719  // Return colours of recombined radiator (before splitting!)
720  pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
721  int colEmtAfter, int acolEmtAfter);
722 
723  vector<pair<int,int> > radAndEmtCols(int, int, Event) {
724  return createvector<pair<int,int> > (make_pair(0,0))(make_pair(0,0));
725  }
726 
727  double gaugeFactor ( int=0, int=0 );
728  double symmetryFactor ( int=0, int=0 );
729 
730  vector <int> recPositions( const Event& state, int iRad, int iEmt);
731 
732  // Pick z for new splitting.
733  double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
734 
735  // New overestimates, z-integrated versions.
736  double overestimateInt(double zMinAbs,double zMaxAbs,
737  double pT2Old, double m2dip, int order = -1);
738 
739  // Return kernel for new splitting.
740  double overestimateDiff(double z, double m2dip, int order = -1);
741 
742  // Functions to calculate the kernel from SplitInfo information.
743  bool calc(const Event& state = Event(), int order = -1);
744 
745 };
746 
748 
749 public:
750 
751  Dire_isr_qed_A2LL(string idIn, int softRS, Settings* settings,
752  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
753  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
754  DireSplittingQED(idIn, softRS, settings, particleData, rndm, beamA, beamB,
755  coupSM, info, direInfo){}
756 
757  bool canRadiate ( const Event&, pair<int,int>,
758  unordered_map<string,bool> = unordered_map<string,bool>(),
759  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
760  bool canRadiate ( const Event&, int iRadBef, int iRecBef,
761  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
762 
763  int kinMap ();
764 
765  // Return id of mother after splitting.
766  int motherID(int idDaughter);
767 
768  // Return id of emission.
769  int sisterID(int idDaughter);
770 
771  // Return id of recombined radiator (before splitting!)
772  int radBefID(int idRadAfter, int idEmtAfter);
773 
774  // Return colours of recombined radiator (before splitting!)
775  pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
776  int colEmtAfter, int acolEmtAfter);
777 
778  vector<pair<int,int> > radAndEmtCols(int, int, Event) {
779  return createvector<pair<int,int> > (make_pair(0,0))(make_pair(0,0));
780  }
781 
782  double gaugeFactor ( int=0, int=0 );
783  double symmetryFactor ( int=0, int=0 );
784 
785  // Pick z for new splitting.
786  double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
787 
788  // New overestimates, z-integrated versions.
789  double overestimateInt(double zMinAbs,double zMaxAbs,
790  double pT2Old, double m2dip, int order = -1);
791 
792  // Return kernel for new splitting.
793  double overestimateDiff(double z, double m2dip, int order = -1);
794 
795  // Functions to calculate the kernel from SplitInfo information.
796  bool calc(const Event& state = Event(), int order = -1);
797 
798 };
799 
801 
802 public:
803 
804  Dire_isr_qed_L2AL(string idIn, int softRS, Settings* settings,
805  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
806  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
807  DireSplittingQED(idIn, softRS, settings, particleData, rndm, beamA, beamB,
808  coupSM, info, direInfo){}
809 
810  bool canRadiate ( const Event&, pair<int,int>,
811  unordered_map<string,bool> = unordered_map<string,bool>(),
812  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
813  bool canRadiate ( const Event&, int iRadBef, int iRecBef,
814  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
815 
816  int kinMap ();
817 
818  // Return id of mother after splitting.
819  int motherID(int idDaughter);
820 
821  // Return id of emission.
822  int sisterID(int idDaughter);
823 
824  // Return id of recombined radiator (before splitting!)
825  int radBefID(int idRadAfter, int idEmtAfter);
826 
827  // Return colours of recombined radiator (before splitting!)
828  pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
829  int colEmtAfter, int acolEmtAfter);
830 
831  vector<pair<int,int> > radAndEmtCols(int, int, Event) {
832  return createvector<pair<int,int> > (make_pair(0,0))(make_pair(0,0));
833  }
834 
835  double gaugeFactor ( int=0, int=0 );
836  double symmetryFactor ( int=0, int=0 );
837 
838  // Pick z for new splitting.
839  double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
840 
841  // New overestimates, z-integrated versions.
842  double overestimateInt(double zMinAbs,double zMaxAbs,
843  double pT2Old, double m2dip, int order = -1);
844 
845  // Return kernel for new splitting.
846  double overestimateDiff(double z, double m2dip, int order = -1);
847 
848  // Functions to calculate the kernel from SplitInfo information.
849  bool calc(const Event& state = Event(), int order = -1);
850 
851 };
852 
853 //==========================================================================
854 
856 
857 public:
858 
859  Dire_fsr_qed_Q2QA_notPartial(string idIn, int softRS, Settings* settings,
860  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
861  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
862  DireSplittingQED(idIn, softRS, settings, particleData, rndm, beamA, beamB,
863  coupSM, info, direInfo){}
864 
865  bool canRadiate ( const Event&, pair<int,int>,
866  unordered_map<string,bool> = unordered_map<string,bool>(),
867  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
868  bool canRadiate ( const Event&, int iRadBef, int iRecBef,
869  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
870 
871  int kinMap ();
872  bool canUseForBranching() { return true; }
873  bool isPartial() { return false; }
874 
875  // Return id of mother after splitting.
876  int motherID(int idDaughter);
877 
878  // Return id of emission.
879  int sisterID(int idDaughter);
880 
881  // Return id of recombined radiator (before splitting!)
882  int radBefID(int idRadAfter, int idEmtAfter);
883 
884  // Return colours of recombined radiator (before splitting!)
885  pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
886  int colEmtAfter, int acolEmtAfter);
887 
888  vector<pair<int,int> > radAndEmtCols(int iRad, int, Event state) {
890  (make_pair(state[iRad].col(),state[iRad].acol()))(make_pair(0, 0));
891  }
892 
893  double gaugeFactor ( int=0, int=0 );
894  double symmetryFactor ( int=0, int=0 );
895 
896  vector <int> recPositions( const Event& state, int iRad, int iEmt);
897 
898  // Pick z for new splitting.
899  double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
900 
901  // New overestimates, z-integrated versions.
902  double overestimateInt(double zMinAbs,double zMaxAbs,
903  double pT2Old, double m2dip, int order = -1);
904 
905  // Return kernel for new splitting.
906  double overestimateDiff(double z, double m2dip, int order = -1);
907 
908  // Functions to calculate the kernel from SplitInfo information.
909  bool calc(const Event& state = Event(), int order = -1);
910 
911 };
912 
913 //==========================================================================
914 
916 
917 public:
918 
919  Dire_fsr_qed_L2LA_notPartial(string idIn, int softRS, Settings* settings,
920  ParticleData* particleData, Rndm* rndm, BeamParticlePtr beamA,
921  BeamParticlePtr beamB, CoupSM* coupSM, Info* info, DireInfo* direInfo) :
922  DireSplittingQED(idIn, softRS, settings, particleData, rndm, beamA, beamB,
923  coupSM, info, direInfo){}
924 
925  bool canRadiate ( const Event&, pair<int,int>,
926  unordered_map<string,bool> = unordered_map<string,bool>(),
927  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
928  bool canRadiate ( const Event&, int iRadBef, int iRecBef,
929  Settings* = nullptr, PartonSystems* = nullptr, BeamParticlePtr = nullptr);
930 
931  int kinMap ();
932  bool canUseForBranching() { return true; }
933  bool isPartial() { return false; }
934 
935  // Return id of mother after splitting.
936  int motherID(int idDaughter);
937 
938  // Return id of emission.
939  int sisterID(int idDaughter);
940 
941  // Return id of recombined radiator (before splitting!)
942  int radBefID(int idRadAfter, int idEmtAfter);
943 
944  // Return colours of recombined radiator (before splitting!)
945  pair<int,int> radBefCols(int colRadAfter, int acolRadAfter,
946  int colEmtAfter, int acolEmtAfter);
947 
948  vector<pair<int,int> > radAndEmtCols(int, int, Event) {
949  return createvector<pair<int,int> > (make_pair(0,0))(make_pair(0,0));
950  }
951 
952  double gaugeFactor ( int=0, int=0 );
953  double symmetryFactor ( int=0, int=0 );
954 
955  vector <int> recPositions( const Event& state, int iRad, int iEmt);
956 
957  // Pick z for new splitting.
958  double zSplit(double zMinAbs, double zMaxAbs, double m2dip);
959 
960  // New overestimates, z-integrated versions.
961  double overestimateInt(double zMinAbs,double zMaxAbs,
962  double pT2Old, double m2dip, int order = -1);
963 
964  // Return kernel for new splitting.
965  double overestimateDiff(double z, double m2dip, int order = -1);
966 
967  // Functions to calculate the kernel from SplitInfo information.
968  bool calc(const Event& state = Event(), int order = -1);
969 
970 };
971 
972 //==========================================================================
973 
974 } // end namespace Pythia8
975 
976 #endif // Pythia8_DireSplittingsQED_H
double aem2Pi(double pT2, int=0)
Definition: DireSplittingsQED.cc:65
constexpr double pow2(const double &x)
Powers of small integers - for balance speed/code clarity.
Definition: PythiaStdlib.h:173
Definition: DireSplittingsQED.h:635
virtual vector< int > recPositions(const Event &, int, int)
Definition: DireSplittings.h:146
virtual double symmetryFactor(int, int)
Return symmetry factor for splitting.
Definition: DireSplittings.h:160
Definition: Info.h:45
The Event class holds all info on the generated event.
Definition: Event.h:408
double zSplit(double zMinAbs, double zMaxAbs, double)
Pick z for new splitting.
Definition: DireSplittingsQED.h:422
Definition: DireSplittingsQED.h:800
Definition: DireSplittingsQCD.h:27
double overestimateDiff(double, double, int=-1)
Return kernel for new splitting.
Definition: DireSplittingsQED.h:435
virtual double coupling(double=0., double=0., double=0., double=-1, pair< int, bool >=pair< int, bool >(), pair< int, bool >=pair< int, bool >())
Definition: DireSplittingsQED.h:59
virtual double gaugeFactor(int, int)
Return color factor for splitting.
Definition: DireSplittings.h:157
int motherID(int)
Return id of mother after splitting.
Definition: DireSplittingsQED.h:361
virtual double overestimateInt(double, double, double, double, int=-1)
New overestimates, z-integrated versions.
Definition: DireSplittings.h:189
Definition: DireBasics.h:374
Definition: DireSplittingsQED.h:75
Definition: StandardModel.h:106
double gaugeFactor(int=0, int=0)
{ return createvector<int>(1)(-1); }
Definition: DireSplittingsQED.h:368
vector< int > recPositions(const Event &state, int iRad, int iEmt)
All charged particles are potential recoilers.
Definition: DireSplittingsQED.h:383
Definition: DireSplittingsQED.h:855
int sisterID(int)
Return id of emission.
Definition: DireSplittingsQED.h:363
Definition: Basics.h:388
virtual bool calc(const Event &=Event(), int=-1)
Functions to calculate the kernel from SplitInfo information.
Definition: DireSplittings.h:203
pair< int, int > radBefCols(int, int, int, int)
Return colours of recombined radiator (before splitting!)
Definition: DireSplittingsQED.h:380
int radBefID(int idRadAfter, int idEmtAfter)
Return id of recombined radiator (before splitting!)
Definition: DireSplittingsQED.h:373
Definition: DireSplittingsQED.h:305
virtual int kinMap()
Definition: DireSplittings.h:123
bool calc(const Event &state, int orderNow)
Functions to calculate the kernel from SplitInfo information.
Definition: DireSplittingsQED.h:442
Definition: DireSplittingsQED.h:525
void init()
The SplittingQED class.
Definition: DireSplittingsQED.cc:23
double overestimateInt(double zMinAbs, double zMaxAbs, double, double, int=-1)
New overestimates, z-integrated versions.
Definition: DireSplittingsQED.h:427
Definition: DireSplittingsQED.h:692
Definition: StandardModel.h:135
int size() const
Event record size.
Definition: Event.h:459
Definition: Event.h:32
Definition: DireSplittingsQED.h:191
Definition: DireSplittingsQED.h:133
virtual double overestimateDiff(double, double, int=-1)
Return kernel for new splitting.
Definition: DireSplittings.h:193
DireSplittingQED(string idIn, int softRS, Settings *settings, ParticleData *particleData, Rndm *rndm, BeamParticlePtr beamA, BeamParticlePtr beamB, CoupSM *coupSM, Info *info, DireInfo *direInfo)
Constructor and destructor.
Definition: DireSplittingsQED.h:31
Definition: DireSplittingsQED.h:915
Definition: DireSplittingsQED.h:747
Definition: DireSplittingsQED.h:26
The PartonSystems class describes the whole set of subcollisions.
Definition: PartonSystems.h:42
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
vector< int > radAndEmt(int, int)
Definition: DireSplittingsQED.h:365
virtual bool aboveCutoff(double t, const Particle &radBef, const Particle &recBef, int iSys, PartonSystems *partonSystemsPtr)
Discard below the cut-off for the splitting.
Definition: DireSplittingsQED.cc:79
Definition: DireSplittingsQED.h:581
double symmetryFactor(int=0, int=0)
Return symmetry factor for splitting.
Definition: DireSplittingsQED.h:370
Definition: DireSplittingsQED.h:248
virtual int couplingType(int, int)
Definition: DireSplittingsQED.h:58
virtual int radBefID(int, int)
Return id of recombined radiator (before splitting!)
Definition: DireSplittings.h:150
double sumCharge2Tot
Class members.
Definition: DireSplittingsQED.h:41
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:422
int set_nCharged(const Event &state)
All charged particles are potential recoilers.
Definition: DireSplittingsQED.h:406
int kinMap()
Definition: DireSplittingsQED.h:334
virtual pair< int, int > radBefCols(int, int, int, int)
Return colours of recombined radiator (before splitting!)
Definition: DireSplittings.h:153
Definition: DireBasics.h:82
virtual vector< int > radAndEmt(int idDaughter, int)
Definition: DireSplittingsQED.h:53
virtual int sisterID(int)
Return id of emission.
Definition: DireSplittings.h:129
Definition: Settings.h:196
virtual double zSplit(double, double, double)
Pick z for new splitting.
Definition: DireSplittings.h:186
virtual int motherID(int)
Return id of mother after splitting.
Definition: DireSplittings.h:126