PYTHIA  8.312
VinciaISR.h
1 // VinciaISR.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2024 Peter Skands, 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 // This file contains header information for the VinciaISR class for
7 // QCD initial-state antenna showers (II and IF), and auxiliary classes.
8 
9 #ifndef Pythia8_VinciaISR_H
10 #define Pythia8_VinciaISR_H
11 
12 #include "Pythia8/SpaceShower.h"
13 #include "Pythia8/VinciaAntennaFunctions.h"
14 #include "Pythia8/VinciaCommon.h"
15 #include "Pythia8/VinciaDiagnostics.h"
16 #include "Pythia8/VinciaQED.h"
17 #include "Pythia8/VinciaEW.h"
18 #include "Pythia8/VinciaWeights.h"
19 
20 namespace Pythia8 {
21 
22 // Forward declarations.
23 class VinciaFSR;
24 
25 //==========================================================================
26 
27 // Base class for initial-state trial generators. Note, base class is
28 // coded for a soft-eikonal trial function.
29 
31 
32 public:
33 
34  // Constructor.
35  TrialGeneratorISR() : isInit(false) {;}
36  virtual ~TrialGeneratorISR() {;}
37 
38  // Initialize pointers.
39  void initPtr(Info* infoPtrIn);
40 
41  // Name of trial generator.
42  virtual string name() {return "TrialGeneratorISR";}
43 
44  // Initialize.
45  virtual void init(double mcIn, double mbIn);
46 
47  // Trial antenna function. Convention for what is coded here:
48  // when using x*PDF ratio <= const : aTrial
49  // when using PDF ratio <= const : aTrial * sab / sAB
50  // Base class implements soft eikonal with PDF ratio as overestimate.
51  virtual double aTrial(double saj, double sjb, double sAB);
52 
53  // Evolution scale.
54  virtual double getQ2(double saj, double sjb, double sAB) {
55  return (saj*sjb/(saj + sjb + sAB));}
56  virtual double getQ2max(double sAB, double, double) {
57  return (0.25*pow2(shhSav - sAB)/shhSav);}
58 
59  // Generate new Q value, with first-order running alphaS.
60  virtual double genQ2run(double q2old, double sAB, double zMin, double zMax,
61  double colFac, double PDFratio, double b0, double kR, double Lambda,
62  double eA, double eB, double headroomFac = 1.0, double enhanceFac = 1.0);
63 
64  // Generate new Q value, with constant trial alphaS.
65  virtual double genQ2(double q2old, double sAB, double zMin, double zMax,
66  double colFac, double alphaSvalue, double PDFratio, double eA, double eB,
67  double headroomFac = 1.0, double enhanceFac = 1.0);
68 
69  // Generate new Q value, with running of the PDFs towards the mass
70  // threshold.
71  virtual double genQ2thres(double q2old, double sAB, double zMin,
72  double zMax, double colFac, double alphaSvalue, double PDFratio, int idA,
73  int idB, double eA, double eB, bool useMpdf, double headroomFac = 1.0,
74  double enhanceFac = 1.0);
75 
76  // Generate a new zeta value in [zMin,zMax].
77  virtual double genZ(double zMin, double zMax);
78 
79  // The zeta integral.
80  virtual double getIz(double zMin, double zMax);
81 
82  // The zeta boundaries, for a given value of the evolution scale.
83  virtual double getZmin(double Qt2, double sAB, double eA, double eBeamUsed);
84  virtual double getZmax(double Qt2, double sAB, double eA, double eBeamUsed);
85 
86  // Inverse transforms to obtain saj and sjb from Qt2 and zeta.
87  virtual double getS1j(double Qt2, double zeta, double sAB);
88  virtual double getSj2(double Qt2, double zeta, double sAB);
89 
90  // Compute trial PDF ratio.
91  virtual double trialPDFratio(BeamParticle* beamAPtr, BeamParticle* beamBPtr,
92  int iSys, int idA, int idB, double eA, double eB,
93  double Qt2A, double Qt2B);
94 
95  // Return last trial PDF ratio.
96  virtual double getTrialPDFratio() {return trialPDFratioSav;}
97 
98  // Check initialization.
99  bool checkInit();
100 
101  // Return the last trial flavor.
102  int trialFlav() {return trialFlavSav;}
103 
104  protected:
105 
106  // Pointers.
108  Rndm* rndmPtr{};
109  Settings* settingsPtr{};
110  Logger* loggerPtr{};
111 
112  // Use m or pT evolution for collinear singularities.
114 
115  // s for hadron hadron.
116  double shhSav;
117 
118  // For conversion trial generators.
120  int nGtoQISRSav;
121 
122  // Masses.
123  double mbSav;
124  double mcSav;
125 
126  // Doing a sector shower?
128 
129  // Saved trial PDF ratio and trial tolerance.
131  double TINYPDFtrial;
132 
133  private:
134 
135  // Status.
136  bool isInit;
137 
138  // Verbosity level.
139  int verbose;
140 
141 };
142 
143 //==========================================================================
144 
145 // Soft-eikonal trial function for II (clone of base class but with
146 // name change).
147 
149 
150 public:
151 
152  // Name of trial generator.
153  virtual string name() override {return "TrialIISoft";}
154 
155 };
156 
157 //==========================================================================
158 
159 // A collinear trial function for initial-initial.
160 
162 
163 public:
164 
165  // Name of trial generator.
166  virtual string name() override {return "TrialIIGCollA";}
167 
168  // Trial antenna function for g->gg (collinear to beam A).
169  // Used with x*PDF <= const, so no extra x-factor.
170  virtual double aTrial(double saj, double sjb, double sAB) override;
171 
172  // Evolution scale
173  virtual double getQ2(double saj, double sjb, double sAB) override {
174  return (saj*sjb/(saj + sjb + sAB));}
175  virtual double getQ2max(double sAB, double, double) override {
176  return (0.25*pow2(shhSav - sAB)/shhSav);}
177 
178  // Generate a new Q value, with first-order running alphaS.
179  virtual double genQ2run(double q2old, double sAB, double zMin, double zMax,
180  double colFac, double PDFratio, double b0, double kR, double Lambda,
181  double eA, double eB, double headroomFac = 1.0, double enhanceFac = 1.0)
182  override;
183 
184  // Generate a new Q value, with constant trial alphaS.
185  virtual double genQ2(double q2old, double sAB, double zMin, double zMax,
186  double colFac, double alphaSvalue, double PDFratio,
187  double eA, double eB, double headroomFac = 1.0, double enhanceFac = 1.0)
188  override;
189 
190  // Generate a new zeta value in [zMin,zMax].
191  virtual double genZ(double zMin, double zMax) override;
192 
193  // The zeta integral.
194  virtual double getIz(double zMin, double zMax) override;
195 
196  // The zeta boundaries, for a given value of the evolution scale
197  virtual double getZmin(double Qt2, double sAB, double eA, double eBeamUsed)
198  override;
199  virtual double getZmax(double Qt2, double sAB, double eA, double eBeamUsed)
200  override;
201 
202  // Inverse transforms to obtain saj and sjb from Qt2 and zeta.
203  virtual double getS1j(double Qt2, double zeta, double sAB) override;
204  virtual double getSj2(double Qt2, double zeta, double sAB) override;
205 
206 };
207 
208 //==========================================================================
209 
210 // B collinear trial function for initial-initial.
211 
212 class TrialIIGCollB : public TrialIIGCollA {
213 
214 public:
215 
216  // Name of trial generator.
217  virtual string name() override {return "TrialIIGCollB";}
218 
219  // Trial antenna function.
220  virtual double aTrial(double saj, double sjb, double sAB) override {
221  // Note: arguments reversed intentionally!
222  return TrialIIGCollA::aTrial(sjb, saj, sAB);}
223 
224  // Inverse transforms to obtain saj and sjb from Qt2 and zeta.
225  virtual double getS1j(double Qt2, double zeta, double sAB) override {
226  return TrialIIGCollA::getSj2(Qt2, zeta, sAB);}
227  virtual double getSj2(double Qt2, double zeta, double sAB) override {
228  return TrialIIGCollA::getS1j(Qt2, zeta, sAB);}
229 
230  // Trial PDF ratio.
231  virtual double trialPDFratio(BeamParticle* beamAPtr, BeamParticle* beamBPtr,
232  int iSys, int idA, int idB, double eA, double eB,
233  double Qt2A, double Qt2B) override {
234  // Note: arguments reversed intentionally!
236  beamBPtr, beamAPtr, iSys, idB, idA, eB, eA, Qt2B, Qt2A);}
237 
238 };
239 
240 //==========================================================================
241 
242 // A splitting trial function for initial-initial, q -> gqbar.
243 
245 
246 public:
247 
248  // Name of trial generator.
249  virtual string name() override {return "TrialIISplitA";}
250 
251  // Trial antenna function. This trial used with PDF ratio <= const,
252  // so has sab/sAB prefactor.
253  virtual double aTrial(double saj, double sjb, double sAB) override;
254 
255  // Evolution scale.
256  virtual double getQ2(double saj, double sjb, double sAB) override {
257  return ((useMevolSav) ? saj : saj*sjb/(saj + sjb + sAB));}
258  virtual double getQ2max(double sAB, double, double) override {
259  return ((useMevolSav) ? shhSav-sAB : 0.25*pow2(shhSav-sAB)/shhSav);}
260 
261  // Generate new Q value, with first-order running alphaS. Same
262  // expression for QT and QA; Iz is different.
263  virtual double genQ2run(double q2old, double sAB, double zMin, double zMax,
264  double colFac, double PDFratio, double b0, double kR, double Lambda,
265  double eA, double eB, double headroomFac = 1.0, double enhanceFac = 1.0)
266  override;
267 
268  // Generate new Q value, with constant trial alphaS.
269  virtual double genQ2(double q2old, double sAB, double zMin, double zMax,
270  double colFac, double alphaSvalue, double PDFratio,
271  double eA, double eB, double headroomFac = 1.0, double enhanceFac = 1.0)
272  override;
273 
274  // Generate new Q value, with running of the PDFs towards the mass
275  // threshold.
276  virtual double genQ2thres(double q2old, double sAB,
277  double zMin, double zMax, double colFac, double alphaSvalue,
278  double PDFratio, int idA, int idB, double eA, double eB, bool useMpdf,
279  double headroomFac = 1.0, double enhanceFac = 1.0) override;
280 
281  // Generate a new zeta value in [zMin,zMax]. For QT 1/(1+z3)
282  // distribution; for QA 1/z4 distribution.
283  virtual double genZ(double zMin, double zMax) override;
284 
285  // The zeta integral (with alpha = 0). For QT integral dz4 1/(1+z3),
286  // for QA integral dz4 1/z4.
287  virtual double getIz(double zMin, double zMax) override;
288 
289  // The zeta boundaries, for a given value of the evolution scale.
290  virtual double getZmin(double Qt2, double sAB, double eA, double eBeamUsed)
291  override;
292  virtual double getZmax(double Qt2, double sAB, double eA, double eBeamUsed)
293  override;
294 
295  // Inverse transforms to obtain saj and sjb from Qt2 and zeta.
296  virtual double getS1j(double Qt2, double zeta, double sAB) override;
297  virtual double getSj2(double Qt2, double zeta, double sAB) override;
298 
299  // Trial PDF ratio.
300  virtual double trialPDFratio(BeamParticle* beamAPtr, BeamParticle* beamBPtr,
301  int iSys, int idA, int idB, double eA, double eB,
302  double Qt2A, double Qt2B) override;
303 
304 };
305 
306 //==========================================================================
307 
308 // B splitting trial function for initial-initial, q -> gqbar.
309 
310 class TrialIISplitB : public TrialIISplitA {
311 
312 public:
313 
314  // Name of trial generator.
315  virtual string name() override {return "TrialIISplitB";}
316 
317  // Trial antenna function.
318  virtual double aTrial(double saj, double sjb, double sAB) override {
319  // Note: arguments reversed intentionally!
320  return TrialIISplitA::aTrial(sjb, saj, sAB);}
321 
322  // Evolution scale.
323  virtual double getQ2(double saj, double sjb, double sAB) override {
324  // Note: arguments reversed intentionally!
325  return TrialIISplitA::getQ2(sjb, saj, sAB);}
326 
327  // Generate new Q value, with first-order running alphaS.
328  virtual double genQ2run(double q2old, double sAB, double zMin, double zMax,
329  double colFac, double PDFratio, double b0, double kR, double Lambda,
330  double eA, double eB, double headroomFac = 1.0, double enhanceFac = 1.0)
331  override {return TrialIISplitA::genQ2run(q2old, sAB, zMin, zMax, colFac,
332  PDFratio, b0, kR, Lambda, eB, eA, headroomFac, enhanceFac);}
333 
334  // Generate new Q value, with constant trial alphaS.
335  virtual double genQ2(double q2old, double sAB, double zMin, double zMax,
336  double colFac, double alphaSvalue, double PDFratio,
337  double eA, double eB, double headroomFac = 1.0, double enhanceFac = 1.0)
338  override {return TrialIISplitA::genQ2(q2old, sAB, zMin, zMax, colFac,
339  alphaSvalue, PDFratio, eB, eA, headroomFac, enhanceFac);}
340 
341  // Generate new Q value, with running of the PDFs towards the mass
342  // threshold.
343  virtual double genQ2thres(double q2old, double sAB,
344  double zMin, double zMax, double colFac, double alphaSvalue,
345  double PDFratio, int idA, int idB, double eA, double eB, bool useMpdf,
346  double headroomFac = 1.0, double enhanceFac = 1.0) override {
347  return TrialIISplitA::genQ2thres(q2old, sAB, zMin, zMax, colFac,
348  alphaSvalue, PDFratio, idB, idA, eB, eA, useMpdf, headroomFac,
349  enhanceFac);}
350 
351  // Inverse transforms to obtain saj and sjb from Qt2 and zeta.
352  virtual double getS1j(double Qt2, double zeta, double sAB) override {
353  return TrialIISplitA::getSj2(Qt2, zeta, sAB);}
354  virtual double getSj2(double Qt2, double zeta, double sAB) override {
355  return TrialIISplitA::getS1j(Qt2, zeta, sAB);}
356 
357  // Trial PDF ratio.
358  virtual double trialPDFratio(BeamParticle* beamAPtr, BeamParticle* beamBPtr,
359  int iSys, int idA, int idB, double eA, double eB, double Qt2A, double Qt2B)
360  override {
361  // Note: arguments reversed intentionally!
362  return TrialIISplitA::trialPDFratio(beamBPtr, beamAPtr, iSys,
363  idB, idA, eB, eA, Qt2B, Qt2A);}
364 
365 };
366 
367 //==========================================================================
368 
369 // A conversion trial function for initial-initial, g -> qqbar.
370 
372 
373 public:
374 
375  // Name of trial generator
376  virtual string name() override {return "TrialIIConvA";}
377 
378  // Trial antenna function. Used with x*PDF ratio <= const, so no
379  // extra prefactor.
380  virtual double aTrial(double saj, double sjb, double sAB) override;
381 
382  // Evolution scale.
383  virtual double getQ2(double saj, double sjb, double sAB) override {
384  return ((useMevolSav) ? saj : (saj*sjb/(saj + sjb + sAB)));}
385  virtual double getQ2max(double sAB, double, double) override {
386  return ((useMevolSav) ? (shhSav - sAB) : 0.25*pow2(shhSav - sAB)/shhSav);}
387 
388  // Generate a new Q value, with first-order running alphaS.
389  virtual double genQ2run(double q2old, double sAB, double zMin, double zMax,
390  double colFac, double PDFratio, double b0, double kR, double Lambda,
391  double eA, double eB, double headroomFac = 1.0, double enhanceFac = 1.0)
392  override;
393 
394  // Generate a new Q value, with constant trial alphaS. Same
395  // expression for QT and QA; Iz is different.
396  virtual double genQ2(double q2old, double sAB, double zMin, double zMax,
397  double colFac, double alphaSvalue, double PDFratio,
398  double eA, double eB, double headroomFac = 1.0, double enhanceFac = 1.0)
399  override;
400 
401  // Generate a new zeta value in [zMin,zMax].
402  virtual double genZ(double zMin, double zMax) override;
403 
404  // The zeta integral.
405  virtual double getIz(double zMin, double zMax) override;
406 
407  // The zeta boundaries, for a given value of the evolution scale.
408  virtual double getZmin(double Qt2, double sAB, double eA, double eBeamUsed)
409  override;
410  virtual double getZmax(double Qt2, double sAB, double eA, double eBeamUsed)
411  override;
412 
413  // Inverse transforms to obtain saj and sjb from Qt2 and zeta.
414  virtual double getS1j(double Qt2, double zeta, double sAB) override;
415  virtual double getSj2(double Qt2, double zeta, double sAB) override;
416 
417  // Trial PDF ratio.
418  virtual double trialPDFratio(BeamParticle* beamAPtr, BeamParticle* beamBPtr,
419  int iSys, int idA, int idB, double eA, double eB,
420  double Qt2A, double Qt2B) override;
421 
422 };
423 
424 //==========================================================================
425 
426 // B conversion trial function for initial-initial, g -> qqbar.
427 
428 class TrialIIConvB : public TrialIIConvA {
429 
430 public:
431 
432  // Name of trial generator.
433  virtual string name() override {return "TrialIIConvB";}
434 
435  // Trial antenna function.
436  virtual double aTrial(double saj, double sjb, double sAB) override {
437  // Note: arguments reversed intentionally!
438  return TrialIIConvA::aTrial(sjb, saj, sAB);}
439 
440  // Evolution scale.
441  virtual double getQ2(double saj, double sjb, double sAB) override {
442  // Note: arguments reversed intentionally!
443  return TrialIIConvA::getQ2(sjb, saj, sAB);}
444 
445  // Generate a new Q value, with first-order running alphaS
446  virtual double genQ2run(double q2old, double sAB, double zMin, double zMax,
447  double colFac, double PDFratio, double b0, double kR, double Lambda,
448  double eA, double eB, double headroomFac = 1.0, double enhanceFac = 1.0)
449  override {return TrialIIConvA::genQ2run(q2old, sAB, zMin, zMax, colFac,
450  PDFratio, b0, kR, Lambda, eB, eA, headroomFac, enhanceFac);}
451 
452  // Generate a new Q value, with constant trial alphaS.
453  virtual double genQ2(double q2old, double sAB, double zMin, double zMax,
454  double colFac, double alphaSvalue, double PDFratio,
455  double eA, double eB, double headroomFac = 1.0, double enhanceFac = 1.0)
456  override {return TrialIIConvA::genQ2(q2old, sAB, zMin, zMax, colFac,
457  alphaSvalue, PDFratio, eB, eA, headroomFac, enhanceFac);}
458 
459  // Inverse transforms: to obtain saj and sjb from Qt2 and zeta.
460  virtual double getS1j(double Qt2, double zeta, double sAB) override {
461  return TrialIIConvA::getSj2(Qt2, zeta, sAB);}
462  virtual double getSj2(double Qt2, double zeta, double sAB) override {
463  return TrialIIConvA::getS1j(Qt2, zeta, sAB);}
464 
465  // Trial PDF ratio
466  virtual double trialPDFratio(BeamParticle* beamAPtr, BeamParticle* beamBPtr,
467  int iSys, int idA, int idB, double eA, double eB,
468  double Qt2A, double Qt2B) override {
469  // Note: arguments reversed intentionally!
471  beamBPtr, beamAPtr, iSys, idB, idA, eB, eA, Qt2B, Qt2A);}
472 
473 };
474 
475 //==========================================================================
476 
477 // Soft-eikonal trial function for initial-final.
478 
480 
481 public:
482 
483  // Name of trial generator.
484  virtual string name() override {return "TrialIFSoft";}
485 
486  // Trial antenna function. This trial generator uses x*PDF <= const
487  // as overestimate => no x-factor.
488  virtual double aTrial(double saj, double sjk, double sAK) override;
489 
490  // Evolution scale.
491  virtual double getQ2(double saj, double sjk, double sAK) override {
492  return (saj*sjk/(sAK+sjk));}
493  virtual double getQ2max(double sAK, double eA, double eBeamUsed) override {
494  double eAmax = ((sqrt(shhSav)/2.0) - (eBeamUsed-eA));
495  return (sAK*(eAmax-eA)/eA);}
496 
497  // Generate a new Q value, with first-order running alphaS.
498  virtual double genQ2run(double q2old, double sAK, double zMin, double zMax,
499  double colFac, double PDFratio, double b0, double kR, double Lambda,
500  double eA, double eK, double headroomFac = 1.0, double enhanceFac = 1.0)
501  override;
502 
503  // Generate a new Q value, with constant trial alphaS.
504  virtual double genQ2(double q2old, double sAK, double zMin, double zMax,
505  double colFac, double alphaSvalue, double PDFratio,
506  double eA, double eK, double headroomFac = 1.0, double enhanceFac = 1.0)
507  override;
508 
509  // Generate a new zeta value in [zMin,zMax].
510  virtual double genZ(double zMin, double zMax) override;
511 
512  // The zeta integral: dzeta/zeta/(zeta-1).
513  virtual double getIz(double zMin, double zMax) override;
514 
515  // The zeta boundaries, for a given value of the evolution scale.
516  virtual double getZmin(double Qt2, double sAK, double eA, double eBeamUsed)
517  override;
518  virtual double getZmax(double Qt2, double sAK, double eA, double eBeamUsed)
519  override;
520 
521  // Inverse transforms to obtain saj and sjk from Qt2 and zeta.
522  virtual double getS1j(double Qt2, double zeta, double sAK) override;
523  virtual double getSj2(double Qt2, double zeta, double sAK) override;
524 
525  // Trial PDF ratio.
526  virtual double trialPDFratio(BeamParticle* beamAPtr, BeamParticle* beamBPtr,
527  int iSys, int idA, int idK, double eA, double eK,
528  double Qt2A, double Qt2B) override;
529 
530 };
531 
532 //==========================================================================
533 
534 // Specialised soft-eikonal trial function for initial-final when
535 // initial-state parton is a valence quark.
536 
537 class TrialVFSoft : public TrialIFSoft {
538 
539 public:
540 
541  // Name of trial generator.
542  virtual string name() override {return "TrialVFSoft";}
543 
544  // Trial antenna function. This trial generator uses PDF <= const as
545  // overestimate => x-factor.
546  virtual double aTrial(double saj, double sjk, double sAK) override;
547 
548  // Generate a new zeta value in [zMin,zMax].
549  virtual double genZ(double zMin, double zMax) override;
550 
551  // The zeta integral: dzeta/(zeta-1).
552  virtual double getIz(double zMin, double zMax) override;
553 
554 };
555 
556 //==========================================================================
557 
558 // A gluon collinear trial function for initial-final.
559 
561 
562  public:
563 
564  // Name of trial generator.
565  virtual string name() override {return "TrialIFGCollA";}
566 
567  // Trial antenna function. This trial generator uses x*PDF ratio <=
568  // const as overestimate so the trial function has no extra
569  // x-factor.
570  virtual double aTrial(double saj, double sjk, double sAK) override;
571 
572  // Evolution scale.
573  virtual double getQ2(double saj, double sjk, double sAK) override {
574  return (saj*sjk/(sAK+sjk));}
575  virtual double getQ2max(double sAK, double eA, double eBeamUsed) override {
576  double eAmax = ( (sqrt(shhSav)/2.0) - (eBeamUsed-eA) );
577  return (sAK*(eAmax-eA)/eA);}
578 
579  // Generate a new Q value, with first-order running alphaS.
580  virtual double genQ2run(double q2old, double sAK, double zMin, double zMax,
581  double colFac, double PDFratio, double b0, double kR, double Lambda,
582  double eA, double eK, double headroomFac = 1.0, double enhanceFac = 1.0)
583  override;
584 
585  // Generate a new Q value, with constant trial alphaS.
586  virtual double genQ2(double q2old, double sAK, double zMin, double zMax,
587  double colFac, double alphaSvalue, double PDFratio,
588  double eA, double eK, double headroomFac = 1.0, double enhanceFac = 1.0)
589  override;
590 
591  // Generate a new zeta value in [zMin,zMax].
592  virtual double genZ(double zMin, double zMax) override;
593 
594  // The zeta integral.
595  virtual double getIz(double zMin, double zMax) override;
596 
597  // The zeta boundaries, for a given value of the evolution scale.
598  virtual double getZmin(double Qt2, double sAK, double eA, double eBeamUsed)
599  override;
600  virtual double getZmax(double Qt2, double sAK, double eA, double eBeamUsed)
601  override;
602 
603  // Inverse transforms to obtain saj and sjk from Qt2 and zeta.
604  virtual double getS1j(double Qt2, double zeta, double sAK) override;
605  virtual double getSj2(double Qt2, double zeta, double sAK) override;
606 
607  // Trial PDF ratio (= just a simple headroom factor).
608  virtual double trialPDFratio(BeamParticle* beamAPtr, BeamParticle* beamBPtr,
609  int iSys, int idA, int idK, double eA, double eK,
610  double Qt2A, double Qt2B) override;
611 
612 };
613 
614 //==========================================================================
615 
616 // K gluon collinear trial function for initial-final sector shower.
617 
619 
620  public:
621 
622  // Name of trial generator.
623  virtual string name() override {return "TrialIFGCollK";}
624 
625  // Trial antenna function.
626  virtual double aTrial(double saj, double sjk, double sAK) override;
627 
628  // Evolution scale.
629  virtual double getQ2(double saj, double sjk, double sAK) override {
630  return (saj*sjk/(sAK+sjk));
631  }
632  virtual double getQ2max(double sAK, double eA, double eAused) override {
633  double eAmax = ( (sqrt(shhSav)/2.0) - (eAused-eA) );
634  return (sAK*(eAmax-eA)/eA);}
635 
636  // Generate a new Q value, with first-order running alphaS.
637  virtual double genQ2run(double q2old, double sAK, double zMin, double zMax,
638  double colFac, double PDFratio, double b0, double kR, double Lambda,
639  double eA, double eK, double headroomFac=1.0, double enhanceFac=1.0)
640  override;
641 
642  // Generate a new Q value, with constant trial alphaS.
643  virtual double genQ2(double q2old, double sAK, double zMin, double zMax,
644  double colFac, double alphaSvalue, double PDFratio,
645  double eA, double eK, double headroomFac=1.0, double enhanceFac=1.0)
646  override;
647 
648  // Generate a new zeta value in [zMin,zMax].
649  virtual double genZ(double zMin, double zMax) override;
650 
651  // The zeta integral.
652  virtual double getIz(double zMin, double zMax) override;
653 
654  // The zeta boundaries, for a given value of the evolution scale.
655  virtual double getZmin(double Qt2, double sAK, double eA, double eAused)
656  override;
657  virtual double getZmax(double Qt2, double sAK, double eA, double eAused)
658  override;
659 
660  // Inverse transforms to obtain saj and sjk from Qt2 and zeta.
661  virtual double getS1j(double Qt2, double zeta, double sAK) override;
662  virtual double getSj2(double Qt2, double zeta, double sAK) override;
663 
664  // Trial PDF ratio.
665  virtual double trialPDFratio(BeamParticle* beamAPtr, BeamParticle* beamBPtr,
666  int iSys, int idA, int idK, double eA, double eK,
667  double Qt2A, double Qt2B) override;
668 };
669 
670 //==========================================================================
671 
672 // A splitting trial function for initial-final, q -> gqbar.
673 
675 
676 public:
677 
678  // Name of trial generator.
679  virtual string name() override {return "TrialIFSplitA";}
680 
681  // Trial antenna function. This trial generator uses the xf
682  // overestimate so no extra x-factor.
683  virtual double aTrial(double saj, double sjk, double sAK) override;
684 
685  // Evolution scale.
686  virtual double getQ2(double saj, double sjk, double sAK) override {
687  return ((useMevolSav) ? saj : saj*sjk/(sAK + sjk));}
688  virtual double getQ2max(double sAK, double eA, double eBeamUsed) override {
689  double xA = eA/(sqrt(shhSav)/2.0);
690  double eAmax = ((sqrt(shhSav)/2.0) - (eBeamUsed - eA));
691  return ((useMevolSav) ? sAK/xA : sAK*(eAmax - eA)/eA);}
692 
693  // Generate new Q value, with first-order running alphaS.
694  virtual double genQ2run(double q2old, double sAK, double zMin, double zMax,
695  double colFac, double PDFratio, double b0, double kR, double Lambda,
696  double eA, double eK, double headroomFac = 1.0, double enhanceFac = 1.0)
697  override;
698 
699  // Generate new Q value, with constant trial alphaS.
700  virtual double genQ2(double q2old, double sAK, double zMin, double zMax,
701  double colFac, double alphaSvalue, double PDFratio,
702  double eA, double eK, double headroomFac = 1.0, double enhanceFac = 1.0)
703  override;
704 
705  // Generate new Q value, with running of the PDFs towards the mass
706  // threshold.
707  virtual double genQ2thres(double q2old, double sAK,
708  double zMin, double zMax, double colFac, double alphaSvalue,
709  double PDFratio, int idA, int idK, double eA, double eK, bool useMpdf,
710  double headroomFac = 1.0, double enhanceFac = 1.0) override;
711 
712  // Generate a new zeta value in [zMin,zMax].
713  virtual double genZ(double zMin, double zMax) override;
714 
715  // The zeta integral.
716  virtual double getIz(double zMin, double zMax) override;
717 
718  // The zeta boundaries, for a given value of the evolution scale.
719  virtual double getZmin(double Qt2, double sAK, double eA, double eBeamUsed)
720  override;
721  virtual double getZmax(double Qt2, double sAK, double eA, double eBeamUsed)
722  override;
723 
724  // Inverse transforms to obtain saj and sjk from Qt2 and zeta.
725  virtual double getS1j(double Qt2, double zeta, double sAK) override;
726  virtual double getSj2(double Qt2, double zeta, double sAK) override;
727 
728  // Trial PDF ratio.
729  virtual double trialPDFratio(BeamParticle* beamAPtr, BeamParticle* beamBPtr,
730  int iSys, int idA, int idK, double eA, double eK,
731  double Qt2A, double Qt2B) override;
732 
733 };
734 
735 //==========================================================================
736 
737 // K splitting trial function for initial-final, g -> qqbar.
738 
740 
741  public:
742 
743  // Name of trial generator.
744  virtual string name() override {return "TrialIFSplitK";}
745 
746  // Trial antenna function. This trial uses the xf overestimate so no
747  // extra x factor.
748  virtual double aTrial(double saj, double sjk, double sAK) override;
749 
750  // Evolution scale.
751  virtual double getQ2(double saj, double sjk, double sAK) override {
752  return ((useMevolSav) ? sjk : saj*sjk/(sAK + sjk));}
753  virtual double getQ2max(double sAK, double eA, double eBeamUsed) override {
754  double xA = eA/(sqrt(shhSav)/2.0);
755  double eAmax = ((sqrt(shhSav)/2.0) - (eBeamUsed - eA));
756  return ((useMevolSav) ? sAK*(1.0 - xA)/xA : sAK*(eAmax - eA)/eA);}
757 
758  // Generate a new Q value, with first-order running alphaS.
759  virtual double genQ2run(double q2old, double sAK, double zMin, double zMax,
760  double colFac, double PDFratio, double b0, double kR, double Lambda,
761  double eA, double eK, double headroomFac = 1.0, double enhanceFac = 1.0)
762  override;
763 
764  // Generate a new Q value, with constant trial alphaS.
765  virtual double genQ2(double q2old, double sAK, double zMin, double zMax,
766  double colFac, double alphaSvalue, double PDFratio,
767  double eA, double eK, double headroomFac = 1.0, double enhanceFac = 1.0)
768  override;
769 
770  // Generate a new zeta value in [zMin,zMax].
771  virtual double genZ(double zMin, double zMax) override;
772 
773  // The zeta integral.
774  virtual double getIz(double zMin, double zMax) override;
775 
776  // The zeta boundaries, for a given value of the evolution scale.
777  virtual double getZmin(double Qt2, double sAK, double eA, double eBeamUsed)
778  override;
779  virtual double getZmax(double Qt2, double sAK, double eA, double eBeamUsed)
780  override;
781 
782  // Inverse transforms to obtain saj and sjk from Qt2 and zeta.
783  virtual double getS1j(double Qt2, double zeta, double sAK) override;
784  virtual double getSj2(double Qt2, double zeta, double sAK) override;
785 
786  // Trial PDF ratio.
787  virtual double trialPDFratio(BeamParticle* beamAPtr, BeamParticle* beamBPtr,
788  int iSys, int idA, int idK, double eA, double eK,
789  double Qt2A, double Qt2B) override;
790 
791 };
792 
793 //==========================================================================
794 
795 // A conversion trial function for initial-final, g -> qqbar.
796 
798 
799 public:
800 
801  // Name of trial generator.
802  virtual string name() override {return "TrialIFConvA";}
803 
804  // Trial antenna function. This trial currently uses the xf
805  // overestimate so no extra x-factor (but could be changed to use
806  // the f overestimate if many violations, and/or for valence
807  // flavours).
808  virtual double aTrial(double saj, double sjk, double sAK) override;
809 
810  // Evolution scale.
811  virtual double getQ2(double saj, double sjk, double sAK) override {
812  return ((useMevolSav) ? saj : saj*sjk/(sAK + sjk));}
813  virtual double getQ2max(double sAK, double eA, double eBeamUsed) override {
814  double xA = eA/(sqrt(shhSav)/2.0);
815  double eAmax = ((sqrt(shhSav)/2.0) - (eBeamUsed - eA));
816  return ((useMevolSav) ? sAK/xA : sAK*(eAmax-eA)/eA);}
817 
818  // Generate a new Q value, with first-order running alphaS.
819  virtual double genQ2run(double q2old, double sAK, double zMin, double zMax,
820  double colFac, double PDFratio, double b0, double kR, double Lambda,
821  double eA, double eK, double headroomFac = 1.0, double enhanceFac = 1.0)
822  override;
823 
824  // Generate a new Q value, with constant trial alphaS.
825  virtual double genQ2(double q2old, double sAK, double zMin, double zMax,
826  double colFac, double alphaSvalue, double PDFratio,
827  double eA, double eK, double headroomFac = 1.0, double enhanceFac = 1.0)
828  override;
829 
830  // Generate a new zeta value in [zMin,zMax].
831  virtual double genZ(double zMin, double zMax) override;
832 
833  // The zeta integral.
834  virtual double getIz(double zMin, double zMax) override;
835 
836  // The zeta boundaries, for a given value of the evolution scale.
837  virtual double getZmin(double Qt2, double sAK, double eA, double eBeamUsed)
838  override;
839  virtual double getZmax(double Qt2, double sAK, double eA, double eBeamUsed)
840  override;
841 
842  // Inverse transforms to obtain saj and sjk from Qt2 and zeta.
843  virtual double getS1j(double Qt2, double zeta, double sAK) override;
844  virtual double getSj2(double Qt2, double zeta, double sAK) override;
845 
846  // Trial PDF ratio.
847  virtual double trialPDFratio(BeamParticle* beamAPtr, BeamParticle* beamBPtr,
848  int iSys, int idA, int idK, double eA, double eK,
849  double Qt2A, double Qt2B) override;
850 
851 };
852 
853 //==========================================================================
854 
855 // The BranchElementalISR class, container for 2 -> 3 trial branchings.
856 
857 // Input: i1In carries colour (or incoming anticolour)
858 // i2In carries anticolour (or incoming colour)
859 // colIn colour tag
860 // isVal1In (true if i1In is incoming and is a valence parton on its
861 // side/system)
862 // isVal2In (true if i2In is incoming and is a valence parton on its
863 // side/system)
864 // Internal storage for II:
865 // i1sav: whichever of i1In, i2In has positive pz
866 // i2sav: whichever of i1In, i2In has negative pz
867 // is1A : always true (i1sav always has positive pz)
868 // isII : true
869 // Internal storage for IF:
870 // i1sav: whichever of i1In, i2In is the initial-state leg
871 // i2sav: whichever of i1In, i2In is the final-state leg
872 // is1A : true if i1sav has positive pz, false if it has negative pz
873 // isII : false
874 
876 
877 public:
878 
879  // Constructors.
880  BranchElementalISR() = default;
881  BranchElementalISR(int iSysIn, Event& event, int iOld1In,
882  int iOld2In, int colIn, bool isVal1In, bool isVal2In) {
883  reset(iSysIn, event, iOld1In, iOld2In, colIn, isVal1In, isVal2In);}
884 
885  // Main method to initialize/reset a BranchElemental.
886  void reset(int iSysIn, Event& event, int i1In, int i2In, int colIn,
887  bool isVal1In, bool isVal2In);
888 
889  // Antenna mass (negative if spacelike virtual).
890  double mAnt() const {return mAntSav;}
891  double m2Ant() const {return m2AntSav;}
892  double sAnt() const {return sAntSav;}
893  // Dot products of daughters.
894  double s12() const {return 2*new1.p()*new2.p();}
895  double s23() const {return 2*new2.p()*new3.p();}
896  double s13() const {return 2*new1.p()*new3.p();}
897 
898  // This is an II or an IF type.
899  bool isII() const {return isIIsav;}
900  // Is 1 a side A (p+) guy (need to know for pdfs in IF).
901  bool is1A() const {return is1Asav;}
902  // Valence.
903  bool isVal1() const {return isVal1sav;}
904  bool isVal2() const {return isVal2sav;}
905  int colType1() const {return colType1sav;}
906  int colType2() const {return colType2sav;}
907  int col() const {return colSav;}
908  int geti1() {return i1sav;}
909  int geti2() {return i2sav;}
910  int getId1() {return id1sav;}
911  int getId2() {return id2sav;}
912  int getSystem() {return system;}
913 
914  // Function to reset all trial generators for this branch elemental.
915  void clearTrialGenerators();
916 
917  // Add a trial generator to this BranchElemental.
918  void addTrialGenerator(enum AntFunType antFunTypeIn, bool swapIn,
919  TrialGeneratorISR* trialGenPtrIn);
920 
921  // Add to and get rescue levels.
922  void addRescue(int iTrial) {nShouldRescue[iTrial]++;}
923  int getNshouldRescue(int iTrial) {return nShouldRescue[iTrial];}
924  void resetRescue() {
925  for (int i=0; i<(int)nShouldRescue.size(); i++) nShouldRescue[i] = 0;}
926 
927  // Function to return number of trial generators for this antenna.
928  int nTrialGenerators() const {return trialGenPtrsSav.size();}
929 
930  // Save a generated trial branching.
931  void saveTrial(int iTrial, double qOld, double qTrial, double zMin=0.,
932  double zMax=0., double colFac=0.,double alphaEff=0., double pdfRatio=0.,
933  int trialFlav=0, double extraMpdf=0., double headroom = 1.0,
934  double enhanceFac = 1.0);
935 
936  // Add the physical pdf ratio.
937  void addPDF(int iTrial,double pdfRatio) {physPDFratioSav[iTrial] = pdfRatio;}
938 
939  // Generate invariants for saved branching.
940  bool genTrialInvariants(double& s1j, double& sj2,
941  double eBeamUsed, int iTrial = -1);
942 
943  // Get trial function index of winner.
944  int getTrialIndex() const;
945 
946  // Check if a saved trial exists for a particular trialGenerator.
947  bool hasTrial(int iTrial) const {
948  if (iTrial < int(hasSavedTrial.size())) return hasSavedTrial[iTrial];
949  else return false;}
950 
951  // Get whether physical antenna is swapped.
952  bool getIsSwapped(int iTrial = -1) const {
953  if (iTrial <= -1) iTrial = getTrialIndex();
954  return isSwappedSav[iTrial];}
955 
956  // Get physical antenna function index of winner.
957  enum AntFunType antFunTypePhys(int iTrial = -1) const {
958  if (iTrial <= -1) iTrial = getTrialIndex();
959  return antFunTypePhysSav[iTrial];}
960 
961  // Get scale for a specific saved trial.
962  double getTrialScale(int iTrial) const {
963  if (iTrial < int(scaleSav.size())) return scaleSav[iTrial];
964  else return -1.0;}
965 
966  // Get scale of winner.
967  double getTrialScale() const;
968 
969  // Get colour factor.
970  double getColFac(int iTrial = -1) {
971  if (iTrial <= -1) iTrial = getTrialIndex();
972  return colFacSav[iTrial];}
973 
974  // Get headroom factor.
975  double getHeadroomFac(int iTrial = -1) {
976  if (iTrial <= -1) iTrial = getTrialIndex();
977  return headroomSav[iTrial];}
978 
979  // Get headroom factor.
980  double getEnhanceFac(int iTrial = -1) {
981  if (iTrial <= -1) iTrial = getTrialIndex();
982  return enhanceFacSav[iTrial];}
983 
984  // Get alpha S.
985  double getAlphaTrial(int iTrial = -1) {
986  if (iTrial <= -1) iTrial = getTrialIndex();
987  return alphaSav[iTrial];}
988 
989  // Get pdf ratio.
990  double getPDFratioTrial(int iTrial = -1) {
991  if (iTrial <= -1) iTrial = getTrialIndex();
992  return trialPDFratioSav[iTrial];}
993 
994  // For gluon conversions, get ID of quark flavour to convert to.
995  int getTrialFlav(int iTrial = -1) {
996  if (iTrial <= -1) iTrial = getTrialIndex();
997  return trialFlavSav[iTrial];}
998 
999  // Get pdf ratio.
1000  double getPDFratioPhys(int iTrial = -1) {
1001  if (iTrial <= -1) iTrial = getTrialIndex();
1002  return physPDFratioSav[iTrial];}
1003 
1004  // Get the extra factor when getting rid of the heavy quarks.
1005  double getExtraMassPDFfactor(int iTrial = -1) {
1006  if (iTrial <= -1) iTrial = getTrialIndex();
1007  return extraMassPDFfactorSav[iTrial];}
1008 
1009  // Flag to set if a saved trial should be ignored and a new one generated.
1010  // Default value -1 : force all trials to renew.
1011  void renewTrial(int iTrial = -1) {
1012  if (iTrial >= 0) hasSavedTrial[iTrial] = false;
1013  else for (iTrial = 0; iTrial < int(hasSavedTrial.size()); ++iTrial)
1014  hasSavedTrial[iTrial] = false;}
1015 
1016  // List function.
1017  void list(bool header = false, bool footer = false) const;
1018 
1019  // Data storage members.
1020  int i1sav{}, i2sav{}, id1sav{}, id2sav{}, colType1sav{}, colType2sav{},
1021  h1sav{}, h2sav{};
1022  double e1sav{}, e2sav{};
1023  bool isVal1sav{}, isVal2sav{}, isIIsav{}, is1Asav{};
1024  Particle new1{}, new2{}, new3{};
1025  // Colour, not obvious, since for e.g. gg -> H we have two II antennae.
1026  int colSav{};
1027  // System and counter for vetos.
1028  int system{0}, nVeto{}, nHull{}, nHadr{};
1029  // We have to force a splitting (heavy quarks).
1030  bool forceSplittingSav{};
1031 
1032  // Trial Generators and properties of saved trials.
1033  vector<TrialGeneratorISR*> trialGenPtrsSav{};
1034  vector<double> zMinSav{}, zMaxSav{}, colFacSav{}, alphaSav{};
1035  vector<double> physPDFratioSav{}, trialPDFratioSav{};
1036  vector<double> extraMassPDFfactorSav{};
1037  vector<double> scaleSav{}, scaleOldSav{}, headroomSav{}, enhanceFacSav{};
1038  vector<bool> hasSavedTrial{}, isSwappedSav{};
1039  vector<enum AntFunType> antFunTypePhysSav{};
1040  vector<int> nShouldRescue{}, trialFlavSav{};
1041  // Note: isSwapped = true for II means physical antenna function is
1042  // coded for side A but trial generator is for side B. For IF, is1A
1043  // = true for 1 being on side A, false for 1 being on side B.
1044 
1045  private:
1046 
1047  // Saved antenna invariant mass value.
1048  double m2AntSav{}, mAntSav{}, sAntSav{};
1049 
1050 };
1051 
1052 //==========================================================================
1053 
1054 // The VinciaISR class.
1055 // Main shower class for initial-state (II and IF) antenna showers
1056 // Inherits from SpaceShower in Pythia 8 so can be used as alternative to
1057 // SpaceShower.
1058 // Methods that must replace ones in SpaceShower are marked with override.
1059 
1060 class VinciaISR : public SpaceShower {
1061 
1062  // Allow VinciaFSR to access private information.
1063  friend class VinciaFSR;
1064  friend class VinciaHistory;
1065 
1066 public:
1067 
1068  // Constructor.
1069  VinciaISR() : isInit(false) {;}
1070 
1071  // Destructor.
1072  virtual ~VinciaISR() {;}
1073 
1074  // Initialize shower. Possibility to force re-initialization by hand.
1075  void init(BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn) override;
1076 
1077  // Force reset at beginning of each event.
1078  void onBeginEvent() override { isPrepared = false; }
1079 
1080  // Possible limitation of first emission.
1081  bool limitPTmax(Event& event, double Q2Fac = 0., double Q2Ren = 0.) override;
1082 
1083  // Prepare system for evolution; identify ME.
1084  void prepare(int iSys, Event& event, bool limitPTmaxIn = false) override;
1085 
1086  // Update dipole list after each ISR emission.
1087  void update( int iSys, Event& event, bool hasWeakRad = false) override;
1088 
1089  // Select next pT in downwards evolution.
1090  double pTnext(Event& event, double pTbegAll, double pTendAll,
1091  int nRadIn = -1, bool doTrialIn = false) override;
1092 
1093  // Perform a branching (as defined by current "winner"). Returns
1094  // true of the branching was accepted and false if rejected.
1095  bool branch(Event& event) override;
1096 
1097  // Print a list of II and IF dipole-antennae.
1098  void list() const override;
1099 
1100  // Initialize data members for calculation of uncertainty bands. So
1101  // far purely dummy in Vincia.
1102  bool initUncertainties() override {return false;}
1103 
1104  // Flag for failure in branch(...) that will force a retry of parton
1105  // level. Returns false in base class, and rescatterFail in
1106  // simpleTimeShower. Not implemented in Vincia yet since we do not
1107  // do rescattering.
1108  bool doRestart() const override {return false;}
1109 
1110  // Flag for last ISR branching being gamma -> qqbar. Not implemented
1111  // in Vincia's QED evolution yet.
1112  bool wasGamma2qqbar() override {return false;}
1113 
1114  // Tell whether ISR has done a weak emission. Not implemented in Vincia yet.
1115  bool getHasWeaklyRadiated() override {return false;}
1116 
1117  // Tell which system was the last processed one.
1118  int system() const override {return iSysWin;}
1119 
1120  // Potential enhancement factor of pTmax scale for hardest emission.
1121  // Used if limitPTmax = true.
1122  double enhancePTmax() const override {return pTmaxFudge;}
1123 
1124  // Initialise pointers to Vincia objects.
1125  void initVinciaPtrs(VinciaColour* colourPtrIn,
1126  shared_ptr<VinciaFSR> fsrPtrIn, MECs* mecsPtrIn,
1127  Resolution* resolutionPtrIn, VinciaCommon* vinComPtrIn,
1128  VinciaWeights* vinWeightsPtrIn);
1129 
1130  // Set pointer to object to use for diagnostics and profiling.
1131  void setDiagnosticsPtr(shared_ptr<VinciaDiagnostics> diagnosticsPtrIn) {
1132  diagnosticsPtr = diagnosticsPtrIn;
1133  }
1134 
1135  // Set EW shower module.
1136  void setEWShowerPtr(VinciaModulePtr ewShowerPtrIn) {
1137  ewShowerPtr = ewShowerPtrIn;
1138  }
1139 
1140  // Set QED shower module for hard process and resonance decays.
1141  void setQEDShowerHardPtr(VinciaModulePtr qedShowerPtrIn) {
1142  qedShowerHardPtr = qedShowerPtrIn;
1143  }
1144 
1145  // Set QED shower module for MPI and hadronisation.
1146  void setQEDShowerSoftPtr(VinciaModulePtr qedShowerPtrIn) {
1147  qedShowerSoftPtr = qedShowerPtrIn;
1148  }
1149 
1150  // Clear all containers.
1151  void clearContainers();
1152 
1153  // Initialize pointers to antenna sets.
1154  void initAntPtr(AntennaSetISR* antSetIn) {antSetPtr = antSetIn;}
1155 
1156  // Function to tell if VinciaISR::prepare() has treated this system.
1157  bool prepared(int iSys) {
1158  if (hasPrepared.find(iSys) != hasPrepared.end()) return hasPrepared[iSys];
1159  else return false;}
1160 
1161  // Wrapper function to return a specific antenna inside antenna set
1163  return antSetPtr->getAntFunPtr(antFunType);}
1164 
1165  // Evolution windows, phase space region boundaries.
1166  int getRegion(double q) {
1167  for (int i=1; i<(int)regMinScalesSav.size(); i++)
1168  if (q < regMinScalesSav[i]) return i-1;
1169  return (int)regMinScalesSav.size() - 1;}
1170 
1171  // Evolution window, phase space region boundaries.
1172  double getQmin(int iRegion) {
1173  iRegion = max(0,iRegion);
1174  iRegion = min(iRegion,(int)regMinScalesSav.size()-1);
1175  return regMinScalesSav[iRegion];}
1176 
1177  // Number of active flavors.
1178  int getNf(int iRegion) {
1179  if (iRegion <= 1) return 3;
1180  else if (iRegion <= 2) return 4;
1181  else if (iRegion <= 4) return 5;
1182  else return 6;}
1183 
1184  // Lambda value
1185  double getLambda(int nFin) {
1186  if (nFin <= 3) return alphaSptr->Lambda3();
1187  else if (nFin <= 4) return alphaSptr->Lambda4();
1188  else if (nFin <= 5) return alphaSptr->Lambda5();
1189  else return alphaSptr->Lambda6();}
1190 
1191  // Add trial functions to a BranchElemental.
1192  void resetTrialGenerators(shared_ptr<BranchElementalISR> trial);
1193 
1194  // Method to check if a gluon splitting in the initial state (to get
1195  // rid of heavy quarks) is still possible after the current
1196  // branching.
1197  bool checkHeavyQuarkPhaseSpace(vector<Particle> parts, int iSyst);
1198 
1199  // Method to check if heavy quark left after passing the evolution window.
1200  bool heavyQuarkLeft(double qTrial);
1201 
1202  // Function to ask if a system is hard.
1203  bool isSysHard(int iSys) {
1204  if (!isInit) return false;
1205  if ((int)isHardSys.size() <= iSys) return false;
1206  return isHardSys[iSys];}
1207 
1208  // Return a vector of the masses.
1209  vector<double> getMasses() {return vector<double> {mt, mtb, mb, mc, ms};}
1210 
1211  // Get number of systems.
1212  int getNsys() {return nBranchISR.size();}
1213  // Get number of branchings in a system (return -1 if no such system).
1214  int getNbranch(int iSys = -1) {
1215  int n = 0;
1216  if (iSys < 0) for (int i = 0; i < (int)nBranchISR.size(); ++i)
1217  n += nBranchISR[iSys];
1218  else if (iSys < (int)nBranchISR.size()) n = nBranchISR[iSys];
1219  else n = -1;
1220  return n;}
1221 
1222  // Communicate information about trial showers for merging.
1223  void setIsTrialShower(bool isTrialIn){ isTrialShower = isTrialIn; }
1224  void setIsTrialShowerRes(bool isTrialIn){ isTrialShowerRes = isTrialIn; }
1225 
1226  // Save the flavour content of system in Born state
1227  // (needed for sector shower).
1228  void saveBornState(Event& born, int iSys);
1229  // Save the flavour content of Born for trial shower.
1230  void saveBornForTrialShower(Event& born);
1231 
1232  // Set verbosity level.
1233  void setVerbose(int verboseIn) {verbose = verboseIn;}
1234 
1235  // Check the antennae.
1236  bool checkAntennae(const Event& event);
1237 
1238  // Pointer to global AlphaStrong instance.
1240 
1241 private:
1242 
1243  // Set starting scale of shower (power vs wimpy) for system iSys.
1244  void setStartScale(int iSys, Event& event);
1245 
1246  // Function to return headroom factor.
1247  double getHeadroomFac(int iSys, enum AntFunType antFunTypePhysIn,
1248  double qMinNow);
1249 
1250  // Generate trial branching kinematics and check physical phase space
1251  bool generateKinematics(Event& event,
1252  shared_ptr<BranchElementalISR> trialPtr, vector<Vec4>& pRec) {
1253  return ( trialPtr->isII()
1254  ? generateKinematicsII(event, trialPtr, pRec)
1255  : generateKinematicsIF(event, trialPtr, pRec) ); }
1256 
1257  // Generate kinematics (II) and set flavours and masses.
1258  bool generateKinematicsII(Event& event,
1259  shared_ptr<BranchElementalISR> trialPtr, vector<Vec4>& pRec);
1260 
1261  // Generate kinematics (IF) and set flavours and masses.
1262  bool generateKinematicsIF(Event& event,
1263  shared_ptr<BranchElementalISR> trialPtr, vector<Vec4>& pRec);
1264 
1265  // Main trial accept function.
1266  bool acceptTrial(const Event& event,
1267  shared_ptr<BranchElementalISR> winnerPtr);
1268 
1269  // Method to assign colour flow.
1270  bool assignColourFlow(Event& event, shared_ptr<BranchElementalISR> trialPtr);
1271 
1272  // Initialised.
1273  bool isInit;
1274  bool isPrepared;
1275 
1276  // Possibility to allow user veto of emission step.
1277  bool hasUserHooks, canVetoEmission;
1278 
1279  // Beams, saved as positive and negative pz respectively.
1280  int beamFrameType;
1281  double eBeamA, eBeamB, eCMBeamsSav, m2BeamsSav;
1282  double TINYPDF;
1283 
1284  // Main Vincia ISR on/off switches.
1285  bool doII, doIF, doQED;
1286 
1287  // Map of which systems ISR::prepare() has treated.
1288  map<int, bool> hasPrepared;
1289 
1290  // Shower parameters.
1291  bool helicityShower, sectorShower, convGluonToQuarkI, convQuarkToGluonI;
1292  bool kineMapIFretry;
1293  int nGluonToQuark;
1294  double cutoffScaleII, cutoffScaleIF;
1295  int nFlavZeroMass;
1296 
1297  // Shower starting-scale settings.
1298  int pTmaxMatch{}, pTdampMatch{};
1299  double pTmaxFudge{}, pT2maxFudge{}, pT2maxFudgeMPI{}, pTdampFudge{};
1300 
1301  // AlphaS parameters.
1302  bool useCMW;
1303  int alphaSorder;
1304  double alphaSvalue, alphaSmax, alphaSmuFreeze, alphaSmuMin;
1305  double aSkMu2EmitI, aSkMu2SplitI, aSkMu2SplitF, aSkMu2Conv;
1306  double mt, mtb, ms, mb, mc;
1307  // Calculated values.
1308  double mu2freeze, mu2min;
1309 
1310  // Trial generators.
1311  TrialIISoft trialIISoft;
1312  TrialIIGCollA trialIIGCollA;
1313  TrialIIGCollB trialIIGCollB;
1314  TrialIISplitA trialIISplitA;
1315  TrialIISplitB trialIISplitB;
1316  TrialIIConvA trialIIConvA;
1317  TrialIIConvB trialIIConvB;
1318  TrialIFSoft trialIFSoft;
1319  TrialVFSoft trialVFSoft;
1320  TrialIFGCollA trialIFGCollA;
1321  TrialIFSplitA trialIFSplitA;
1322  TrialIFSplitK trialIFSplitK;
1323  TrialIFConvA trialIFConvA;
1324 
1325  // Trial generators for the sector shower.
1326  TrialIFGCollK trialIFGCollK;
1327 
1328  // Enhancing switches and parameters.
1329  bool enhanceInHard, enhanceInResDec, enhanceInMPI;
1330  double enhanceAll, enhanceBottom, enhanceCharm, enhanceCutoff;
1331 
1332  // Pointer to VINCIA objects.
1333  AntennaSetISR* antSetPtr{};
1334  MECs* mecsPtr{};
1335  VinciaColour* colourPtr{};
1336  Resolution* resolutionPtr{};
1337  shared_ptr<VinciaFSR> fsrPtr{};
1338  VinciaCommon* vinComPtr{};
1339  VinciaWeights* weightsPtr{};
1340 
1341  // Diagnostics and Profiling.
1342  shared_ptr<VinciaDiagnostics> diagnosticsPtr;
1343 
1344  // Electroweak shower pointers.
1345  VinciaModulePtr ewShowerPtr;
1346  VinciaModulePtr qedShowerHardPtr;
1347  VinciaModulePtr qedShowerSoftPtr;
1348 
1349  // Total and MEC accept probability.
1350  vector<double> Paccept;
1351 
1352  // Evolution windows.
1353  vector<double> regMinScalesMtSav;
1354  vector<double> regMinScalesSav;
1355  vector<double> regMinScalesNow;
1356 
1357  // Vector of dipoles (with trial branchings, 4 at most).
1358  vector<shared_ptr<BranchElementalISR> > branchElementals;
1359 
1360  // Current winner.
1361  shared_ptr<BranchElementalISR> winnerPtr{};
1362  int indxWin;
1363  int iSysWin;
1364  vector<Particle> stateNew;
1365  VinciaClustering minClus;
1366 
1367  // Flags to tell a few basic properties of each parton system.
1368  map<int, bool> isHardSys{}, isResonanceSys{}, polarisedSys{}, doMECsSys{};
1369 
1370  // Saved particle state and number in event record.
1371  map<int, vector< Particle > > partsSav{};
1372  map<int, vector< int > > indexSav{};
1373 
1374  // Save initial ISR starting scale system by system.
1375  map<int, double> q2Hat{};
1376  vector<bool> doPTlimit{}, doPTdamp{};
1377  map<int, double> pT2damp{};
1378 
1379  // Count the number of branchings in the system.
1380  map<int, int> nBranch, nBranchISR;
1381 
1382  // Saved incoming guys.
1383  map<int, Particle> initialA;
1384  map<int, Particle> initialB;
1385  double eBeamAUsed, eBeamBUsed;
1386 
1387  // Count numbers of quarks and gluons.
1388  map<int, int> nG, nQQ;
1389 
1390  // Partons present in the Born (needed in sector shower).
1391  map<int, bool> savedBorn;
1392  map<int, bool> resolveBorn;
1393  map<int, map<int, int>> nFlavsBorn;
1394 
1395  // Flags used in merging
1396  bool doMerging, isTrialShower, isTrialShowerRes;
1397 
1398  // Rescue mechanism.
1399  bool doRescue;
1400  int nRescue;
1401  double rescueMin;
1402 
1403  // Verbose setting.
1404  int verbose;
1405 
1406 };
1407 
1408 //==========================================================================
1409 
1410 } // end namespace Pythia8
1411 
1412 #endif // Pythia8_VinciaISR_H
virtual double aTrial(double saj, double sjb, double sAB)
Trial antenna function.
Definition: VinciaISR.cc:63
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:249
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:153
virtual double trialPDFratio(BeamParticle *beamAPtr, BeamParticle *beamBPtr, int iSys, int idA, int idB, double eA, double eB, double Qt2A, double Qt2B) override
Trial PDF ratio.
Definition: VinciaISR.h:231
virtual double getQ2(double saj, double sjb, double sAB) override
Evolution scale.
Definition: VinciaISR.h:441
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:484
virtual double getS1j(double Qt2, double zeta, double sAB) override
Inverse transforms to obtain saj and sjb from Qt2 and zeta.
Definition: VinciaISR.h:352
void setQEDShowerHardPtr(VinciaModulePtr qedShowerPtrIn)
Set QED shower module for hard process and resonance decays.
Definition: VinciaISR.h:1141
History class for the Vincia shower.
Definition: VinciaHistory.h:247
virtual double genQ2(double q2old, double sAB, double zMin, double zMax, double colFac, double alphaSvalue, double PDFratio, double eA, double eB, double headroomFac=1.0, double enhanceFac=1.0)
Generate new Q value, with constant trial alphaS.
Definition: VinciaISR.cc:103
A conversion trial function for initial-initial, g -> qqbar.
Definition: VinciaISR.h:371
bool wasGamma2qqbar() override
Definition: VinciaISR.h:1112
constexpr double pow2(const double &x)
Powers of small integers - for balance speed/code clarity.
Definition: PythiaStdlib.h:182
Definition: VinciaISR.h:537
void initPtr(Info *infoPtrIn)
Initialize pointers.
Definition: VinciaISR.cc:24
double getLambda(int nFin)
Lambda value.
Definition: VinciaISR.h:1185
virtual double getZmax(double Qt2, double sAB, double eA, double eBeamUsed)
Definition: VinciaISR.cc:164
void addRescue(int iTrial)
Add to and get rescue levels.
Definition: VinciaISR.h:922
virtual double genQ2thres(double q2old, double sAB, double zMin, double zMax, double colFac, double alphaSvalue, double PDFratio, int idA, int idB, double eA, double eB, bool useMpdf, double headroomFac=1.0, double enhanceFac=1.0) override
Definition: VinciaISR.h:343
A splitting trial function for initial-final, q -> gqbar.
Definition: VinciaISR.h:674
double getExtraMassPDFfactor(int iTrial=-1)
Get the extra factor when getting rid of the heavy quarks.
Definition: VinciaISR.h:1005
virtual double getQ2(double saj, double sjb, double sAB) override
Evolution scale.
Definition: VinciaISR.h:173
bool hasTrial(int iTrial) const
Check if a saved trial exists for a particular trialGenerator.
Definition: VinciaISR.h:947
virtual double getS1j(double Qt2, double zeta, double sAB) override
Inverse transforms to obtain saj and sjb from Qt2 and zeta.
Definition: VinciaISR.h:225
Definition: StandardModel.h:23
virtual double genQ2run(double q2old, double sAB, double zMin, double zMax, double colFac, double PDFratio, double b0, double kR, double Lambda, double eA, double eB, double headroomFac=1.0, double enhanceFac=1.0) override
Generate a new Q value, with first-order running alphaS.
Definition: VinciaISR.cc:566
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:802
virtual double genQ2run(double q2old, double sAB, double zMin, double zMax, double colFac, double PDFratio, double b0, double kR, double Lambda, double eA, double eB, double headroomFac=1.0, double enhanceFac=1.0) override
Generate a new Q value, with first-order running alphaS.
Definition: VinciaISR.h:446
VinciaISR()
Constructor.
Definition: VinciaISR.h:1069
Definition: Info.h:45
int system() const override
Tell which system was the last processed one.
Definition: VinciaISR.h:1118
int trialFlavSav
For conversion trial generators.
Definition: VinciaISR.h:119
The Event class holds all info on the generated event.
Definition: Event.h:453
double shhSav
s for hadron hadron.
Definition: VinciaISR.h:116
bool isVal1() const
Valence.
Definition: VinciaISR.h:903
bool isII() const
This is an II or an IF type.
Definition: VinciaISR.h:899
int getTrialFlav(int iTrial=-1)
For gluon conversions, get ID of quark flavour to convert to.
Definition: VinciaISR.h:995
int trialFlav()
Return the last trial flavor.
Definition: VinciaISR.h:102
Definition: BeamParticle.h:133
Simple struct to store information about a 3 -> 2 clustering.
Definition: VinciaCommon.h:278
virtual double getQ2(double saj, double sjk, double sAK) override
Evolution scale.
Definition: VinciaISR.h:811
virtual double getSj2(double Qt2, double zeta, double sAB) override
Definition: VinciaISR.cc:346
virtual double getS1j(double Qt2, double zeta, double sAB)
Inverse transforms to obtain saj and sjb from Qt2 and zeta.
Definition: VinciaISR.cc:176
A collinear trial function for initial-initial.
Definition: VinciaISR.h:161
K splitting trial function for initial-final, g -> qqbar.
Definition: VinciaISR.h:739
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:623
double s12() const
Dot products of daughters.
Definition: VinciaISR.h:894
Definition: VinciaCommon.h:211
B splitting trial function for initial-initial, q -> gqbar.
Definition: VinciaISR.h:310
double getPDFratioPhys(int iTrial=-1)
Get pdf ratio.
Definition: VinciaISR.h:1000
Definition: VinciaAntennaFunctions.h:416
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:376
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:679
virtual double getQ2(double saj, double sjb, double sAB) override
Evolution scale.
Definition: VinciaISR.h:383
The BranchElementalISR class, container for 2 -> 3 trial branchings.
Definition: VinciaISR.h:875
Definition: VinciaISR.h:30
virtual string name()
Name of trial generator.
Definition: VinciaISR.h:42
double enhancePTmax() const override
Definition: VinciaISR.h:1122
Soft-eikonal trial function for initial-final.
Definition: VinciaISR.h:479
virtual double genQ2thres(double q2old, double sAB, double zMin, double zMax, double colFac, double alphaSvalue, double PDFratio, int idA, int idB, double eA, double eB, bool useMpdf, double headroomFac=1.0, double enhanceFac=1.0)
Definition: VinciaISR.cc:128
bool isSysHard(int iSys)
Function to ask if a system is hard.
Definition: VinciaISR.h:1203
A conversion trial function for initial-final, g -> qqbar.
Definition: VinciaISR.h:797
virtual double getS1j(double Qt2, double zeta, double sAB) override
Inverse transforms to obtain saj and sjb from Qt2 and zeta.
Definition: VinciaISR.cc:505
virtual double getSj2(double Qt2, double zeta, double sAB)
Definition: VinciaISR.cc:188
virtual double getS1j(double Qt2, double zeta, double sAB) override
Inverse transforms: to obtain saj and sjb from Qt2 and zeta.
Definition: VinciaISR.h:460
Definition: VinciaISR.h:148
virtual double getQ2(double saj, double sjk, double sAK) override
Evolution scale.
Definition: VinciaISR.h:751
bool useMevolSav
Use m or pT evolution for collinear singularities.
Definition: VinciaISR.h:113
virtual double aTrial(double saj, double sjb, double sAB) override
Trial antenna function.
Definition: VinciaISR.h:436
virtual double getTrialPDFratio()
Return last trial PDF ratio.
Definition: VinciaISR.h:96
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:565
virtual double genQ2run(double q2old, double sAB, double zMin, double zMax, double colFac, double PDFratio, double b0, double kR, double Lambda, double eA, double eB, double headroomFac=1.0, double enhanceFac=1.0) override
Generate a new Q value, with first-order running alphaS.
Definition: VinciaISR.cc:379
Definition: Logger.h:23
virtual double genQ2run(double q2old, double sAB, double zMin, double zMax, double colFac, double PDFratio, double b0, double kR, double Lambda, double eA, double eB, double headroomFac=1.0, double enhanceFac=1.0) override
Generate new Q value, with first-order running alphaS.
Definition: VinciaISR.h:328
void setVerbose(int verboseIn)
Set verbosity level.
Definition: VinciaISR.h:1233
virtual double getQ2(double saj, double sjk, double sAK) override
Evolution scale.
Definition: VinciaISR.h:629
double trialPDFratioSav
Saved trial PDF ratio and trial tolerance.
Definition: VinciaISR.h:130
double getHeadroomFac(int iTrial=-1)
Get headroom factor.
Definition: VinciaISR.h:975
double mAnt() const
Antenna mass (negative if spacelike virtual).
Definition: VinciaISR.h:890
B collinear trial function for initial-initial.
Definition: VinciaISR.h:212
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:166
AntFunType
Enumerator for antenna function types, with "void" member NoFun.
Definition: VinciaCommon.h:66
virtual double trialPDFratio(BeamParticle *beamAPtr, BeamParticle *beamBPtr, int iSys, int idA, int idB, double eA, double eB, double Qt2A, double Qt2B) override
Trial PDF ratio.
Definition: VinciaISR.h:358
A splitting trial function for initial-initial, q -> gqbar.
Definition: VinciaISR.h:244
Info * infoPtr
Pointers.
Definition: VinciaISR.h:107
void renewTrial(int iTrial=-1)
Definition: VinciaISR.h:1011
int nTrialGenerators() const
Function to return number of trial generators for this antenna.
Definition: VinciaISR.h:928
Definition: VinciaFSR.h:582
Definition: Basics.h:386
bool doRestart() const override
Definition: VinciaISR.h:1108
Definition: VinciaCommon.h:494
virtual double getQ2(double saj, double sjb, double sAB) override
Evolution scale.
Definition: VinciaISR.h:323
Definition: VinciaISR.h:1060
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:542
int getNsys()
Get number of systems.
Definition: VinciaISR.h:1212
void setEWShowerPtr(VinciaModulePtr ewShowerPtrIn)
Set EW shower module.
Definition: VinciaISR.h:1136
int getRegion(double q)
Evolution windows, phase space region boundaries.
Definition: VinciaISR.h:1166
void setDiagnosticsPtr(shared_ptr< VinciaDiagnostics > diagnosticsPtrIn)
Set pointer to object to use for diagnostics and profiling.
Definition: VinciaISR.h:1131
TrialGeneratorISR()
Constructor.
Definition: VinciaISR.h:35
virtual double aTrial(double saj, double sjb, double sAB) override
Trial antenna function.
Definition: VinciaISR.h:220
bool prepared(int iSys)
Function to tell if VinciaISR::prepare() has treated this system.
Definition: VinciaISR.h:1157
virtual double aTrial(double saj, double sjb, double sAB) override
A conversion trial function for initial-initial, g -> qqbar.
Definition: VinciaISR.cc:555
double getTrialScale(int iTrial) const
Get scale for a specific saved trial.
Definition: VinciaISR.h:962
virtual double genQ2thres(double q2old, double sAB, double zMin, double zMax, double colFac, double alphaSvalue, double PDFratio, int idA, int idB, double eA, double eB, bool useMpdf, double headroomFac=1.0, double enhanceFac=1.0) override
Definition: VinciaISR.cc:430
void initAntPtr(AntennaSetISR *antSetIn)
Initialize pointers to antenna sets.
Definition: VinciaISR.h:1154
virtual double trialPDFratio(BeamParticle *beamAPtr, BeamParticle *beamBPtr, int iSys, int idA, int idB, double eA, double eB, double Qt2A, double Qt2B) override
Trial PDF ratio.
Definition: VinciaISR.h:466
virtual double genQ2(double q2old, double sAB, double zMin, double zMax, double colFac, double alphaSvalue, double PDFratio, double eA, double eB, double headroomFac=1.0, double enhanceFac=1.0) override
Generate new Q value, with constant trial alphaS.
Definition: VinciaISR.h:335
void setIsTrialShower(bool isTrialIn)
Communicate information about trial showers for merging.
Definition: VinciaISR.h:1223
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:315
void addPDF(int iTrial, double pdfRatio)
Add the physical pdf ratio.
Definition: VinciaISR.h:937
virtual double trialPDFratio(BeamParticle *beamAPtr, BeamParticle *beamBPtr, int iSys, int idA, int idB, double eA, double eB, double Qt2A, double Qt2B) override
Trial PDF ratio.
Definition: VinciaISR.cc:697
virtual double getQ2(double saj, double sjk, double sAK) override
Evolution scale.
Definition: VinciaISR.h:686
int getNbranch(int iSys=-1)
Get number of branchings in a system (return -1 if no such system).
Definition: VinciaISR.h:1214
virtual double getQ2(double saj, double sjb, double sAB) override
Evolution scale.
Definition: VinciaISR.h:256
Class for storing Vincia weights.
Definition: VinciaWeights.h:22
virtual double getIz(double zMin, double zMax)
The zeta integral.
Definition: VinciaISR.cc:147
void setQEDShowerSoftPtr(VinciaModulePtr qedShowerPtrIn)
Set QED shower module for MPI and hadronisation.
Definition: VinciaISR.h:1146
bool sectorShower
Doing a sector shower?
Definition: VinciaISR.h:127
bool checkInit()
Check initialization.
Definition: VinciaISR.cc:214
virtual double trialPDFratio(BeamParticle *beamAPtr, BeamParticle *beamBPtr, int iSys, int idA, int idB, double eA, double eB, double Qt2A, double Qt2B) override
Trial PDF ratio.
Definition: VinciaISR.cc:538
virtual double getQ2(double saj, double sjb, double sAB)
Evolution scale.
Definition: VinciaISR.h:54
void onBeginEvent() override
Force reset at beginning of each event.
Definition: VinciaISR.h:1078
Definition: Event.h:32
virtual double genQ2(double q2old, double sAB, double zMin, double zMax, double colFac, double alphaSvalue, double PDFratio, double eA, double eB, double headroomFac=1.0, double enhanceFac=1.0) override
Generate new Q value, with constant trial alphaS.
Definition: VinciaISR.cc:405
double getAlphaTrial(int iTrial=-1)
Get alpha S.
Definition: VinciaISR.h:985
virtual double getSj2(double Qt2, double zeta, double sAB) override
Definition: VinciaISR.cc:520
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:744
virtual double getS1j(double Qt2, double zeta, double sAB) override
Inverse transforms to obtain saj and sjb from Qt2 and zeta.
Definition: VinciaISR.cc:333
virtual double genZ(double zMin, double zMax)
Generate a new zeta value in [zMin,zMax].
Definition: VinciaISR.cc:136
vector< double > getMasses()
Return a vector of the masses.
Definition: VinciaISR.h:1209
A simple class for containing evolution variable definitions.
Definition: VinciaCommon.h:382
virtual double getZmin(double Qt2, double sAB, double eA, double eBeamUsed)
The zeta boundaries, for a given value of the evolution scale.
Definition: VinciaISR.cc:156
virtual double aTrial(double saj, double sjb, double sAB) override
A collinear trial function for initial-initial.
Definition: VinciaISR.cc:228
virtual ~VinciaISR()
Destructor.
Definition: VinciaISR.h:1072
int getNf(int iRegion)
Number of active flavors.
Definition: VinciaISR.h:1178
virtual double getQ2(double saj, double sjk, double sAK) override
Evolution scale.
Definition: VinciaISR.h:573
The AntennaSetISR class. Simple container of II and IF antenna functions.
Definition: VinciaAntennaFunctions.h:1191
virtual double getQ2(double saj, double sjk, double sAK) override
Evolution scale.
Definition: VinciaISR.h:491
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:217
virtual double trialPDFratio(BeamParticle *beamAPtr, BeamParticle *beamBPtr, int iSys, int idA, int idB, double eA, double eB, double Qt2A, double Qt2B)
Compute trial PDF ratio.
Definition: VinciaISR.cc:204
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
virtual double getSj2(double Qt2, double zeta, double sAB) override
Definition: VinciaISR.cc:678
B conversion trial function for initial-initial, g -> qqbar.
Definition: VinciaISR.h:428
A gluon collinear trial function for initial-final.
Definition: VinciaISR.h:560
virtual string name() override
Name of trial generator.
Definition: VinciaISR.h:433
bool getHasWeaklyRadiated() override
Tell whether ISR has done a weak emission. Not implemented in Vincia yet.
Definition: VinciaISR.h:1115
bool initUncertainties() override
Definition: VinciaISR.h:1102
Definition: VinciaAntennaFunctions.h:1258
double getEnhanceFac(int iTrial=-1)
Get headroom factor.
Definition: VinciaISR.h:980
bool is1A() const
Is 1 a side A (p+) guy (need to know for pdfs in IF).
Definition: VinciaISR.h:901
The SpaceShower class does spacelike showers.
Definition: SpaceShower.h:33
virtual double getS1j(double Qt2, double zeta, double sAB) override
Inverse transforms to obtain saj and sjb from Qt2 and zeta.
Definition: VinciaISR.cc:663
virtual double genQ2run(double q2old, double sAB, double zMin, double zMax, double colFac, double PDFratio, double b0, double kR, double Lambda, double eA, double eB, double headroomFac=1.0, double enhanceFac=1.0)
Generate new Q value, with first-order running alphaS.
Definition: VinciaISR.cc:75
virtual double aTrial(double saj, double sjb, double sAB) override
A splitting trial function for initial-initial, q -> gqbar.
Definition: VinciaISR.cc:367
double mbSav
Masses.
Definition: VinciaISR.h:123
K gluon collinear trial function for initial-final sector shower.
Definition: VinciaISR.h:618
virtual double genQ2(double q2old, double sAB, double zMin, double zMax, double colFac, double alphaSvalue, double PDFratio, double eA, double eB, double headroomFac=1.0, double enhanceFac=1.0) override
Generate a new Q value, with constant trial alphaS.
Definition: VinciaISR.h:453
double getPDFratioTrial(int iTrial=-1)
Get pdf ratio.
Definition: VinciaISR.h:990
virtual double aTrial(double saj, double sjb, double sAB) override
Trial antenna function.
Definition: VinciaISR.h:318
AntennaFunctionIX * getAntFunPtr(enum AntFunType antFunType)
Wrapper function to return a specific antenna inside antenna set.
Definition: VinciaISR.h:1162
Definition: Settings.h:195
double getColFac(int iTrial=-1)
Get colour factor.
Definition: VinciaISR.h:970
virtual void init(double mcIn, double mbIn)
Initialize.
Definition: VinciaISR.cc:35
AlphaStrong * alphaSptr
Pointer to global AlphaStrong instance.
Definition: VinciaISR.h:1239
virtual double genQ2(double q2old, double sAB, double zMin, double zMax, double colFac, double alphaSvalue, double PDFratio, double eA, double eB, double headroomFac=1.0, double enhanceFac=1.0) override
Generate a new Q value, with constant trial alphaS.
Definition: VinciaISR.cc:592
double getQmin(int iRegion)
Evolution window, phase space region boundaries.
Definition: VinciaISR.h:1172
bool getIsSwapped(int iTrial=-1) const
Get whether physical antenna is swapped.
Definition: VinciaISR.h:952