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