PYTHIA  8.317
SigmaProcess.h
1 // SigmaProcess.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2026 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 hard-process differential cross sections.
7 // SigmaProcess: base class for cross sections.
8 // Sigma0Process: base class for unresolved processes, derived from above.
9 // Sigma1Process: base class for 2 -> 1 processes, derived from above.
10 // Sigma2Process: base class for 2 -> 2 processes, derived from above.
11 // Sigma3Process: base class for 2 -> 3 processes, derived from above.
12 // SigmaLHAProcess: wrapper class for Les Houches Accord external input.
13 // Actual physics processes are found in separate files:
14 // SigmaQCD for QCD processes;
15 // SigmaEW for electroweak processes (including photon production);
16 // SigmaOnia for charmonium and bottomonium processes;
17 // SigmaHiggs for Higgs processes;
18 // SigmaSUSY for supersymmetric production;
19 // SigmaLeftRightSym for processes in left-right-symmetric scenarios;
20 // SigmaLeptoquark for leptoquark production.
21 // SigmaExtraDim for processes in scenarios for extra dimensions;
22 // SigmaGeneric for generic scalar/fermion/vector pair production.
23 
24 #ifndef Pythia8_SigmaProcess_H
25 #define Pythia8_SigmaProcess_H
26 
27 #include "Pythia8/Basics.h"
28 #include "Pythia8/BeamParticle.h"
29 #include "Pythia8/Event.h"
30 #include "Pythia8/Info.h"
31 #include "Pythia8/SigmaLowEnergy.h"
32 #include "Pythia8/LesHouches.h"
33 #include "Pythia8/ParticleData.h"
34 #include "Pythia8/PartonDistributions.h"
35 #include "Pythia8/PhysicsBase.h"
36 #include "Pythia8/PythiaComplex.h"
37 #include "Pythia8/PythiaStdlib.h"
38 #include "Pythia8/ResonanceWidths.h"
39 #include "Pythia8/Settings.h"
40 #include "Pythia8/SigmaTotal.h"
41 #include "Pythia8/StandardModel.h"
42 #include "Pythia8/SLHAinterface.h"
43 #include "Pythia8/SusyLesHouches.h"
44 
45 namespace Pythia8 {
46 
47 //==========================================================================
48 
49 // InBeam is a simple helper class for partons and their flux in a beam.
50 
51 class InBeam {
52 
53 public:
54 
55  // Constructor.
56  InBeam( int idIn = 0) : id(idIn), pdf(0.) {}
57 
58  // Values.
59  int id;
60  double pdf;
61 
62 };
63 
64 //==========================================================================
65 
66 // InPair is a simple helper class for colliding parton pairs and their flux.
67 
68 class InPair {
69 
70 public:
71 
72  // Constructor.
73  InPair( int idAIn = 0, int idBIn = 0) : idA(idAIn), idB(idBIn),
74  pdfA(0.), pdfB(0.), pdfSigma(0.) {}
75 
76  // Values.
77  int idA, idB;
78  double pdfA, pdfB, pdfSigma;
79 
80 };
81 
82 //==========================================================================
83 
84 // SigmaProcess is the base class for cross section calculations.
85 
86 class SigmaProcess : public PhysicsBase {
87 
88 public:
89 
90  // Destructor.
91  virtual ~SigmaProcess() {}
92 
93  // Perform simple initialization and store pointers.
94  void init(BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
95  SLHAinterface* slhaInterfacePtrIn = 0);
96 
97  // Store or replace Les Houches pointer.
98  void setLHAPtr( LHAupPtr lhaUpPtrIn) {lhaUpPtr = lhaUpPtrIn;}
99 
100  // Switch to new beam particle identities; for similar hadrons only.
101  void updateBeamIDs() { idA = beamAPtr->id(); idB = beamBPtr->id();
102  mA = beamAPtr->m(); mB = beamBPtr->m();}
103 
104  // Initialize process. Only used for some processes.
105  virtual void initProc() {}
106 
107  // Set up allowed flux of incoming partons. Default is no flux.
108  virtual bool initFlux();
109 
110  // Input and complement kinematics for resolved 2 -> 1 process.
111  // Usage: set1Kin( x1in, x2in, sHin).
112  virtual void set1Kin( double , double , double ) {}
113 
114  // Input and complement kinematics for resolved 2 -> 2 process.
115  // Usage: set2Kin( x1in, x2in, sHin, tHin, m3in, m4in, runBW3in, runBW4in).
116  virtual void set2Kin( double , double , double , double , double ,
117  double, double, double ) {}
118 
119  // Ditto, but for Multiparton Interactions applications, so different input.
120  // Usage: set2KinMPI( x1in, x2in, sHin, tHin, uHin,
121  // alpSin, alpEMin, needMasses, m3in, m4in)
122  virtual void set2KinMPI( double , double , double , double ,
123  double , double , double , bool , double , double ) {}
124 
125  // Input and complement kinematics for resolved 2 -> 3 process.
126  // Usage: set3Kin( x1in, x2in, sHin, p3prel, p4prel, p5prel,
127  // m3in, m4in, m5in, runBW3in, runBW4in, runBW5in);
128  virtual void set3Kin( double , double , double , Vec4 , Vec4 , Vec4 ,
129  double , double , double , double , double , double ) {}
130 
131  // Calculate flavour-independent parts of cross section.
132  virtual void sigmaKin() {}
133 
134  // Evaluate sigma for unresolved, sigmaHat(sHat) for 2 -> 1 processes,
135  // d(sigmaHat)/d(tHat) for (resolved) 2 -> 2 processes, and |M|^2 for
136  // 2 -> 3 processes. Answer in "native" units, either mb or GeV^-2.
137  virtual double sigmaHat() {return 0.;}
138 
139  // Wrapper to sigmaHat, to (a) store current incoming flavours and
140  // (b) convert from GeV^-2 to mb where required.
141  // For 2 -> 1/2 also (c) convert from from |M|^2 to d(sigmaHat)/d(tHat).
142  virtual double sigmaHatWrap(int id1in = 0, int id2in = 0) {
143  id1 = id1in; id2 = id2in;
144  return ( convert2mb() ? CONVERT2MB * sigmaHat() : sigmaHat() ); }
145 
146  // Convolute above with parton flux and K factor. Sum over open channels.
147  // Possibly different PDF in initialization phase or no sampling for x_gamma
148  // (photons in leptons).
149  virtual double sigmaPDF(bool initPS = false, bool samexGamma = false,
150  bool useNewXvalues = false, double x1New = 0., double x2New = 0.);
151 
152  // Select incoming parton channel and extract parton densities (resolved).
153  void pickInState(int id1in = 0, int id2in = 0);
154 
155  // Select flavour, colour and anticolour.
156  virtual void setIdColAcol() {}
157 
158  // Perform kinematics for a Multiparton Interaction, in its rest frame.
159  virtual bool final2KinMPI( int = 0, int = 0, Vec4 = 0., Vec4 = 0.,
160  double = 0., double = 0.) {return true;}
161 
162  // Evaluate inclusive NLO weight.
163  virtual double weightNLO() {return 1.;}
164 
165  // Evaluate weight for simultaneous flavours (only gamma*/Z0 gamma*/Z0).
166  // Usage: weightDecayFlav( process).
167  virtual double weightDecayFlav( Event&) {return 1.;}
168 
169  // Evaluate weight for decay angular configuration.
170  // Usage: weightDecay( process, iResBeg, iResEnd), where
171  // iResBeg <= i < iResEnd is range of sister partons to test decays of.
172  virtual double weightDecay( Event&, int, int) {return 1.;}
173 
174  // Set scale, when that is missing for an external LHA process.
175  virtual void setScale() {}
176 
177  // Process name and code, and the number of final-state particles.
178  virtual string name() const {return "unnamed process";}
179  virtual int code() const {return 0;}
180  virtual int nFinal() const {return 2;}
181 
182  // Need to know which incoming partons to set up interaction for.
183  virtual string inFlux() const {return "unknown";}
184 
185  // Need to know whether to convert cross section answer from GeV^-2 to mb.
186  virtual bool convert2mb() const {return true;}
187 
188  // For 2 -> 2 process optional conversion from |M|^2 to d(sigmaHat)/d(tHat).
189  virtual bool convertM2() const {return false;}
190 
191  // Special treatment needed for Les Houches processes.
192  virtual bool isLHA() const {return false;}
193 
194  // Special treatment needed for elastic and diffractive processes.
195  virtual bool isNonDiff() const {return false;}
196  virtual bool isResolved() const {return true;}
197  virtual bool isDiffA() const {return false;}
198  virtual bool isDiffB() const {return false;}
199  virtual bool isDiffC() const {return false;}
200 
201  // Special treatment needed for SUSY processes.
202  virtual bool isSUSY() const {return false;}
203 
204  // Special treatment needed if negative cross sections allowed.
205  virtual bool allowNegativeSigma() const {return false;}
206 
207  // Whether this process has an inclusive NLO correction implemented.
208  virtual bool hasNLO() const {return false;}
209 
210  // Flavours in 2 -> 2/3 processes where masses needed from beginning.
211  // (For a light quark masses will be used in the final kinematics,
212  // but not at the matrix-element level. For a gluon no masses at all.)
213  virtual int id3Mass() const {return 0;}
214  virtual int id4Mass() const {return 0;}
215  virtual int id5Mass() const {return 0;}
216 
217  // Special treatment needed if process contains an s-channel resonance.
218  virtual int resonanceA() const {return 0;}
219  virtual int resonanceB() const {return 0;}
220 
221  // 2 -> 2 and 2 -> 3 processes only through s-channel exchange.
222  virtual bool isSChannel() const {return false;}
223 
224  // NOAM: Insert an intermediate resonance in 2 -> 1 -> 2 (or 3) listings.
225  virtual int idSChannel() const {return 0;}
226 
227  // QCD 2 -> 3 processes need special phase space selection machinery.
228  virtual bool isQCD3body() const {return false;}
229 
230  // Special treatment in 2 -> 3 with two massive propagators.
231  virtual int idTchan1() const {return 0;}
232  virtual int idTchan2() const {return 0;}
233  virtual double tChanFracPow1() const {return 0.3;}
234  virtual double tChanFracPow2() const {return 0.3;}
235  virtual bool useMirrorWeight() const {return false;}
236 
237  // Special process-specific gamma*/Z0 choice if >=0 (e.g. f fbar -> H0 Z0).
238  virtual int gmZmode() const {return -1;}
239 
240  // Tell whether tHat and uHat are swapped (= same as swap 3 and 4).
241  bool swappedTU() const {return swapTU;}
242 
243  // Give back particle properties: flavours, colours, masses, or all.
244  int id(int i) const {return idSave[i];}
245  int col(int i) const {return colSave[i];}
246  int acol(int i) const {return acolSave[i];}
247  double m(int i) const {return mSave[i];}
248  Particle getParton(int i) const {return parton[i];}
249 
250  // Give back couplings and parton densities.
251  // Not all known for nondiffractive.
252  double Q2Ren() const {return Q2RenSave;}
253  double alphaEMRen() const {return alpEM;}
254  double alphaSRen() const {return alpS;}
255  double Q2Fac() const {return Q2FacSave;}
256  double pdf1() const {return pdf1Save;}
257  double pdf2() const {return pdf2Save;}
258 
259  // Give back angles; relevant only for multipe-interactions processes.
260  double thetaMPI() const {return atan2( sinTheta, cosTheta);}
261  double phiMPI() const {return phi;}
262  double sHBetaMPI() const {return sHBeta;}
263  double pT2MPI() const {return pT2Mass;}
264  double pTMPIFin() const {return pTFin;}
265 
266  // Save and load kinematics for trial interactions
267  void saveKin() {
268  for (int i = 0; i < 12; i++) { partonT[i] = parton[i];
269  mSaveT[i] = mSave[i]; }
270  pTFinT = pTFin; phiT = phi; cosThetaT = cosTheta; sinThetaT = sinTheta; }
271  void loadKin() {
272  for (int i = 0; i < 12; i++) { parton[i] = partonT[i];
273  mSave[i] = mSaveT[i]; }
274  pTFin = pTFinT; cosTheta = cosThetaT; sinTheta = sinThetaT; phi = phiT;
275  }
276  void swapKin() {
277  for (int i = 0; i < 12; i++) { swap(parton[i], partonT[i]);
278  swap(mSave[i], mSaveT[i]); }
279  swap(pTFin, pTFinT); swap(cosTheta, cosThetaT);
280  swap(sinTheta, sinThetaT); swap(phi, phiT); }
281 
282  // Set the incoming ids for diffraction.
283  virtual void setIdInDiff(int, int) {}
284 
285 protected:
286 
287  // Constructor.
288  SigmaProcess() : slhaPtr(0), lhaUpPtr(0), doVarE(), nQuarkIn(),
289  renormScale1(), renormScale2(), renormScale3(), renormScale3VV(),
290  factorScale1(), factorScale2(), factorScale3(), factorScale3VV(),
291  Kfactor(), mcME(), mbME(), mmuME(), mtauME(), renormMultFac(),
292  renormFixScale(), factorMultFac(), factorFixScale(), higgsH1parity(),
293  higgsH2parity(), higgsA3parity(), higgsH1eta(), higgsH2eta(), higgsA3eta(),
294  higgsH1phi(), higgsH2phi(), higgsA3phi(), idA(), idB(), mA(), mB(),
295  isLeptonA(), isLeptonB(), hasLeptonBeams(), beamA2gamma(), beamB2gamma(),
296  hasGamma(), mH(), sH(), sH2(), x1Save(), x2Save(), sigmaSumSave(),
297  id1(), id2(), id3(), id4(), id5(), idSave(), colSave(), acolSave(),
298  mSave(), cosTheta(), sinTheta(), phi(), sHMass(), sHBeta(), pT2Mass(),
299  pTFin(), mSaveT(), pTFinT(), cosThetaT(), sinThetaT(), phiT(), mME(),
300  swapTU() {
301  for (int i = 0; i < 12; ++i) mSave[i] = 0.;
302  Q2RenSave = alpEM = alpS = Q2FacSave = pdf1Save = pdf2Save = 0.; }
303 
304  // Constants: could only be changed in the code itself.
305  static const double CONVERT2MB, MASSMARGIN, COMPRELERR;
306  static const int NCOMPSTEP;
307 
308  // Pointer to an SLHA object.
310 
311  // Pointer to LHAup for generating external events.
312  LHAupPtr lhaUpPtr;
313 
314  // Initialization data, normally only set once.
315  bool doVarE;
316  int nQuarkIn, renormScale1, renormScale2, renormScale3, renormScale3VV,
317  factorScale1, factorScale2, factorScale3, factorScale3VV;
318  double Kfactor, mcME, mbME, mmuME, mtauME, renormMultFac, renormFixScale,
319  factorMultFac, factorFixScale;
320 
321  // CP violation parameters for Higgs sector, normally only set once.
322  int higgsH1parity, higgsH2parity, higgsA3parity;
323  double higgsH1eta, higgsH2eta, higgsA3eta, higgsH1phi, higgsH2phi,
324  higgsA3phi;
325 
326  // Information on incoming beams.
327  int idA, idB;
328  double mA, mB;
329  bool isLeptonA, isLeptonB, hasLeptonBeams, beamA2gamma, beamB2gamma,
330  hasGamma;
331 
332  // Partons in beams, with PDF's.
333  vector<InBeam> inBeamA;
334  vector<InBeam> inBeamB;
335  void addBeamA(int idIn) {inBeamA.push_back(InBeam(idIn));}
336  void addBeamB(int idIn) {inBeamB.push_back(InBeam(idIn));}
337  int sizeBeamA() const {return inBeamA.size();}
338  int sizeBeamB() const {return inBeamB.size();}
339 
340  // Allowed colliding parton pairs, with pdf's.
341  vector<InPair> inPair;
342  void addPair(int idAIn, int idBIn) {
343  inPair.push_back(InPair(idAIn, idBIn));}
344  int sizePair() const {return inPair.size();}
345 
346  // Store common subprocess kinematics quantities.
347  double mH, sH, sH2;
348 
349  // Store Q2 renormalization and factorization scales, and related values.
350  double Q2RenSave, alpEM, alpS, Q2FacSave, x1Save, x2Save, pdf1Save,
351  pdf2Save, sigmaSumSave;
352 
353  // Store flavour, colour, anticolour, mass, angles and the whole particle.
354  int id1, id2, id3, id4, id5;
355  int idSave[12], colSave[12], acolSave[12];
356  double mSave[12], cosTheta, sinTheta, phi, sHMass, sHBeta, pT2Mass, pTFin;
357  Particle parton[12];
358 
359  // Minimal set of saved kinematics for trial interactions when
360  // using the x-dependent matter profile of multiparton interactions.
361  Particle partonT[12];
362  double mSaveT[12], pTFinT, cosThetaT, sinThetaT, phiT;
363 
364  // Calculate and store all modified masses and four-vectors
365  // intended for matrix elements. Return false if failed.
366  virtual bool setupForME() {return true;}
367  bool setupForMEin();
368  double mME[12];
369  Vec4 pME[12];
370 
371  // Store whether tHat and uHat are swapped (= same as swap 3 and 4).
372  bool swapTU;
373 
374  // Set flavour, colour and anticolour.
375  void setId( int id1in = 0, int id2in = 0, int id3in = 0, int id4in = 0,
376  int id5in = 0) {idSave[1] = id1in; idSave[2] = id2in; idSave[3] = id3in;
377  idSave[4] = id4in; idSave[5] = id5in;}
378  void setColAcol( int col1 = 0, int acol1 = 0,
379  int col2 = 0, int acol2 = 0, int col3 = 0, int acol3 = 0,
380  int col4 = 0, int acol4 = 0, int col5 = 0, int acol5 = 0) {
381  colSave[1] = col1; acolSave[1] = acol1; colSave[2] = col2;
382  acolSave[2] = acol2; colSave[3] = col3; acolSave[3] = acol3;
383  colSave[4] = col4; acolSave[4] = acol4; colSave[5] = col5;
384  acolSave[5] = acol5; }
385  void swapColAcol() { swap(colSave[1], acolSave[1]);
386  swap(colSave[2], acolSave[2]); swap(colSave[3], acolSave[3]);
387  swap(colSave[4], acolSave[4]); swap(colSave[5], acolSave[5]);}
388  void swapCol1234() { swap(colSave[1], colSave[2]);
389  swap(colSave[3], colSave[4]); swap(acolSave[1], acolSave[2]);
390  swap(acolSave[3], acolSave[4]);}
391  void swapCol12() { swap(colSave[1], colSave[2]);
392  swap(acolSave[1], acolSave[2]);}
393  void swapCol34() { swap(colSave[3], colSave[4]);
394  swap(acolSave[3], acolSave[4]);}
395 
396  // Common code for top and Higgs secondary decay angular weights.
397  double weightTopDecay( Event& process, int iResBeg, int iResEnd);
398  double weightHiggsDecay( Event& process, int iResBeg, int iResEnd);
399 
400 };
401 
402 //==========================================================================
403 
404 // Sigma0Process is the base class for unresolved and minimum-bias processes.
405 // It is derived from SigmaProcess.
406 
407 class Sigma0Process : public SigmaProcess {
408 
409 public:
410 
411  // Destructor.
412  virtual ~Sigma0Process() {}
413 
414  // Number of final-state particles.
415  virtual int nFinal() const {return 2;};
416 
417  // No partonic flux to be set up.
418  virtual bool initFlux() {return true;}
419 
420  // Evaluate sigma for unresolved processes.
421  virtual double sigmaHat() {return 0.;}
422 
423  // Since no PDF's there is no difference from above.
424  virtual double sigmaPDF(bool, bool, bool, double, double )
425  {return sigmaHat();}
426 
427  // Answer for these processes already in mb, so do not convert.
428  virtual bool convert2mb() const {return false;}
429 
430  // Set the incoming ids for diffraction.
431  virtual void setIdInDiff(int idAin, int idBin) { idA = idAin; idB = idBin; }
432 
433 protected:
434 
435  // Constructor.
437 
438 };
439 
440 //==========================================================================
441 
442 // Sigma1Process is the base class for 2 -> 1 processes.
443 // It is derived from SigmaProcess.
444 
445 class Sigma1Process : public SigmaProcess {
446 
447 public:
448 
449  // Destructor.
450  virtual ~Sigma1Process() {}
451 
452  // Number of final-state particles.
453  virtual int nFinal() const {return 1;};
454 
455  // Input and complement kinematics for resolved 2 -> 1 process.
456  virtual void set1Kin( double x1in, double x2in, double sHin) {
457  store1Kin( x1in, x2in, sHin); sigmaKin();}
458 
459  // Evaluate sigmaHat(sHat) for resolved 2 -> 1 processes.
460  virtual double sigmaHat() {return 0.;}
461 
462  // Wrapper to sigmaHat, to (a) store current incoming flavours,
463  // (b) convert from GeV^-2 to mb where required, and
464  // (c) convert from |M|^2 to d(sigmaHat)/d(tHat) where required.
465  virtual double sigmaHatWrap(int id1in = 0, int id2in = 0);
466 
467 protected:
468 
469  // Constructor.
471 
472  // Store kinematics and set scales for resolved 2 -> 1 process.
473  virtual void store1Kin( double x1in, double x2in, double sHin);
474 
475  // Calculate modified masses and four-vectors for matrix elements.
476  virtual bool setupForME();
477 
478 };
479 
480 //==========================================================================
481 
482 // Sigma2Process is the base class for 2 -> 2 processes.
483 // It is derived from SigmaProcess.
484 
485 class Sigma2Process : public SigmaProcess {
486 
487 public:
488 
489  // Destructor.
490  virtual ~Sigma2Process() {}
491 
492  // Number of final-state particles.
493  virtual int nFinal() const {return 2;};
494 
495  // Input and complement kinematics for resolved 2 -> 2 process.
496  virtual void set2Kin( double x1in, double x2in, double sHin,
497  double tHin, double m3in, double m4in, double runBW3in,
498  double runBW4in) { store2Kin( x1in, x2in, sHin, tHin, m3in, m4in,
499  runBW3in, runBW4in); sigmaKin();}
500 
501  // Ditto, but for Multiparton Interactions applications, so different input.
502  virtual void set2KinMPI( double x1in, double x2in, double sHin,
503  double tHin, double uHin, double alpSin, double alpEMin,
504  bool needMasses, double m3in, double m4in) {
505  store2KinMPI( x1in, x2in, sHin, tHin, uHin, alpSin, alpEMin,
506  needMasses, m3in, m4in); sigmaKin();}
507 
508  // Evaluate d(sigmaHat)/d(tHat) for resolved 2 -> 2 processes.
509  virtual double sigmaHat() {return 0.;}
510 
511  // Wrapper to sigmaHat, to (a) store current incoming flavours,
512  // (b) convert from GeV^-2 to mb where required, and
513  // (c) convert from |M|^2 to d(sigmaHat)/d(tHat) where required.
514  virtual double sigmaHatWrap(int id1in = 0, int id2in = 0) {
515  id1 = id1in; id2 = id2in; double sigmaTmp = sigmaHat();
516  if (convertM2()) sigmaTmp /= 16. * M_PI * sH2;
517  if (convert2mb()) sigmaTmp *= CONVERT2MB;
518  return sigmaTmp;}
519 
520  // Perform kinematics for a Multiparton Interaction, in its rest frame.
521  virtual bool final2KinMPI( int i1Res = 0, int i2Res = 0, Vec4 p1Res = 0.,
522  Vec4 p2Res = 0., double m1Res = 0., double m2Res = 0.);
523 
524 protected:
525 
526  // Constructor.
527  Sigma2Process() : tH(0.), uH(0.), tH2(0.), uH2(0.), m3(0.), s3(0.),
528  m4(0.), s4(0.), pT2(0.), runBW3(0.), runBW4(0.) {}
529 
530  // Store kinematics and set scales for resolved 2 -> 2 process.
531  virtual void store2Kin( double x1in, double x2in, double sHin,
532  double tHin, double m3in, double m4in, double runBW3in,
533  double runBW4in);
534  virtual void store2KinMPI( double x1in, double x2in, double sHin,
535  double tHin, double uHin, double alpSin, double alpEMin,
536  bool needMasses, double m3in, double m4in);
537 
538  // Calculate modified masses and four-vectors for matrix elements.
539  virtual bool setupForME();
540 
541  // Store subprocess kinematics quantities.
542  double tH, uH, tH2, uH2, m3, s3, m4, s4, pT2, runBW3, runBW4;
543 
544 };
545 
546 //==========================================================================
547 
548 // Sigma3Process is the base class for 2 -> 3 processes.
549 // It is derived from SigmaProcess.
550 
551 class Sigma3Process : public SigmaProcess {
552 
553 public:
554 
555  // Destructor.
556  virtual ~Sigma3Process() {}
557 
558  // Number of final-state particles.
559  virtual int nFinal() const {return 3;};
560 
561  // Input and complement kinematics for resolved 2 -> 3 process.
562  virtual void set3Kin( double x1in, double x2in, double sHin,
563  Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn, double m3in, double m4in,
564  double m5in, double runBW3in, double runBW4in, double runBW5in) {
565  store3Kin( x1in, x2in, sHin, p3cmIn, p4cmIn, p5cmIn, m3in, m4in, m5in,
566  runBW3in, runBW4in, runBW5in); sigmaKin();}
567 
568  // Evaluate d(sigmaHat)/d(tHat) for resolved 2 -> 3 processes.
569  virtual double sigmaHat() {return 0.;}
570 
571 protected:
572 
573  // Constructor.
574  Sigma3Process() : m3(), s3(), m4(), s4(), m5(), s5(), runBW3(),
575  runBW4(), runBW5() {}
576 
577  // Store kinematics and set scales for resolved 2 -> 3 process.
578  virtual void store3Kin( double x1in, double x2in, double sHin,
579  Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn, double m3in, double m4in,
580  double m5in, double runBW3in, double runBW4in, double runBW5in);
581 
582  // Calculate modified masses and four-vectors for matrix elements.
583  virtual bool setupForME();
584 
585  // Store subprocess kinematics quantities.
586  double m3, s3, m4, s4, m5, s5, runBW3, runBW4, runBW5;
587  Vec4 p3cm, p4cm, p5cm;
588 
589 };
590 
591 //==========================================================================
592 
593 // SigmaLHAProcess is a wrapper class for Les Houches Accord external input.
594 // It is derived from SigmaProcess.
595 
597 
598 public:
599 
600  // Constructor.
602 
603  // Destructor.
604  virtual ~SigmaLHAProcess() {}
605 
606  // No partonic flux to be set up.
607  virtual bool initFlux() {return true;}
608 
609  // Dummy function: action is put in PhaseSpaceLHA.
610  virtual double sigmaPDF(bool, bool, bool, double, double ) {return 1.;}
611 
612  // Evaluate weight for decay angular configuration, where relevant.
613  virtual double weightDecay( Event& process, int iResBeg, int iResEnd);
614 
615  // Set scale, when that is missing for an external LHA process.
616  virtual void setScale();
617 
618  // Info on the subprocess.
619  virtual string name() const {return "Les Houches User Process(es)";}
620  virtual int code() const {return 9999;}
621 
622  // Number of final-state particles depends on current process choice.
623  virtual int nFinal() const;
624 
625  // Answer for these processes not in GeV^-2, so do not do this conversion.
626  virtual bool convert2mb() const {return false;}
627 
628  // Ensure special treatment of Les Houches processes.
629  virtual bool isLHA() const {return true;}
630 
631  // Special treatment needed if negative cross sections allowed.
632  virtual bool allowNegativeSigma() const {
633  return (lhaUpPtr->strategy() < 0);}
634 
635 private:
636 
637 };
638 
639 //==========================================================================
640 
641 } // end namespace Pythia8
642 
643 #endif // Pythia8_SigmaProcess_H
virtual bool isSChannel() const
2 -> 2 and 2 -> 3 processes only through s-channel exchange.
Definition: SigmaProcess.h:222
InPair(int idAIn=0, int idBIn=0)
Constructor.
Definition: SigmaProcess.h:73
Sigma3Process()
Constructor.
Definition: SigmaProcess.h:574
int id(int i) const
Give back particle properties: flavours, colours, masses, or all.
Definition: SigmaProcess.h:244
virtual int resonanceA() const
Special treatment needed if process contains an s-channel resonance.
Definition: SigmaProcess.h:218
double m3
Store subprocess kinematics quantities.
Definition: SigmaProcess.h:586
virtual void sigmaKin()
Calculate flavour-independent parts of cross section.
Definition: SigmaProcess.h:132
virtual bool final2KinMPI(int=0, int=0, Vec4=0., Vec4=0., double=0., double=0.)
Perform kinematics for a Multiparton Interaction, in its rest frame.
Definition: SigmaProcess.h:159
bool swapTU
Store whether tHat and uHat are swapped (= same as swap 3 and 4).
Definition: SigmaProcess.h:372
virtual bool hasNLO() const
Whether this process has an inclusive NLO correction implemented.
Definition: SigmaProcess.h:208
virtual double sigmaHat()
Evaluate sigmaHat(sHat) for resolved 2 -> 1 processes.
Definition: SigmaProcess.h:460
Sigma1Process()
Constructor.
Definition: SigmaProcess.h:470
virtual bool convertM2() const
For 2 -> 2 process optional conversion from |M|^2 to d(sigmaHat)/d(tHat).
Definition: SigmaProcess.h:189
Definition: PhysicsBase.h:26
Definition: SigmaProcess.h:445
The Event class holds all info on the generated event.
Definition: Event.h:408
int id
Values.
Definition: SigmaProcess.h:59
Definition: BeamParticle.h:133
virtual void set2KinMPI(double, double, double, double, double, double, double, bool, double, double)
Definition: SigmaProcess.h:122
virtual bool convert2mb() const
Need to know whether to convert cross section answer from GeV^-2 to mb.
Definition: SigmaProcess.h:186
virtual double sigmaHat()
Definition: SigmaProcess.h:137
double mH
Store common subprocess kinematics quantities.
Definition: SigmaProcess.h:347
virtual double sigmaHat()
Evaluate d(sigmaHat)/d(tHat) for resolved 2 -> 3 processes.
Definition: SigmaProcess.h:569
SigmaProcess is the base class for cross section calculations.
Definition: SigmaProcess.h:86
virtual bool isQCD3body() const
QCD 2 -> 3 processes need special phase space selection machinery.
Definition: SigmaProcess.h:228
virtual double weightDecay(Event &, int, int)
Definition: SigmaProcess.h:172
double Q2Ren() const
Definition: SigmaProcess.h:252
Definition: SLHAinterface.h:27
virtual void set3Kin(double x1in, double x2in, double sHin, Vec4 p3cmIn, Vec4 p4cmIn, Vec4 p5cmIn, double m3in, double m4in, double m5in, double runBW3in, double runBW4in, double runBW5in)
Input and complement kinematics for resolved 2 -> 3 process.
Definition: SigmaProcess.h:562
Sigma0Process()
Constructor.
Definition: SigmaProcess.h:436
SigmaLHAProcess()
Constructor.
Definition: SigmaProcess.h:601
virtual string inFlux() const
Need to know which incoming partons to set up interaction for.
Definition: SigmaProcess.h:183
LHAupPtr lhaUpPtr
Pointer to LHAup for generating external events.
Definition: SigmaProcess.h:312
virtual bool isLHA() const
Special treatment needed for Les Houches processes.
Definition: SigmaProcess.h:192
virtual int idTchan1() const
Special treatment in 2 -> 3 with two massive propagators.
Definition: SigmaProcess.h:231
virtual int nFinal() const
Number of final-state particles.
Definition: SigmaProcess.h:453
virtual int idSChannel() const
NOAM: Insert an intermediate resonance in 2 -> 1 -> 2 (or 3) listings.
Definition: SigmaProcess.h:225
virtual bool isSUSY() const
Special treatment needed for SUSY processes.
Definition: SigmaProcess.h:202
SusyLesHouches * slhaPtr
Pointer to an SLHA object.
Definition: SigmaProcess.h:309
virtual bool initFlux()
No partonic flux to be set up.
Definition: SigmaProcess.h:418
InBeam(int idIn=0)
Constructor.
Definition: SigmaProcess.h:56
virtual double sigmaHatWrap(int id1in=0, int id2in=0)
Definition: SigmaProcess.h:142
double thetaMPI() const
Give back angles; relevant only for multipe-interactions processes.
Definition: SigmaProcess.h:260
virtual bool isLHA() const
Ensure special treatment of Les Houches processes.
Definition: SigmaProcess.h:629
virtual bool allowNegativeSigma() const
Special treatment needed if negative cross sections allowed.
Definition: SigmaProcess.h:632
virtual int nFinal() const
Number of final-state particles.
Definition: SigmaProcess.h:559
void saveKin()
Save and load kinematics for trial interactions.
Definition: SigmaProcess.h:267
int higgsH1parity
CP violation parameters for Higgs sector, normally only set once.
Definition: SigmaProcess.h:322
virtual void set3Kin(double, double, double, Vec4, Vec4, Vec4, double, double, double, double, double, double)
Definition: SigmaProcess.h:128
vector< InPair > inPair
Allowed colliding parton pairs, with pdf&#39;s.
Definition: SigmaProcess.h:341
virtual void set1Kin(double, double, double)
Definition: SigmaProcess.h:112
virtual ~Sigma0Process()
Destructor.
Definition: SigmaProcess.h:412
double Q2RenSave
Store Q2 renormalization and factorization scales, and related values.
Definition: SigmaProcess.h:350
virtual ~Sigma1Process()
Destructor.
Definition: SigmaProcess.h:450
Definition: SigmaProcess.h:551
InBeam is a simple helper class for partons and their flux in a beam.
Definition: SigmaProcess.h:51
Definition: SigmaProcess.h:407
virtual bool isNonDiff() const
Special treatment needed for elastic and diffractive processes.
Definition: SigmaProcess.h:195
virtual void setIdColAcol()
Select flavour, colour and anticolour.
Definition: SigmaProcess.h:156
virtual void set2Kin(double x1in, double x2in, double sHin, double tHin, double m3in, double m4in, double runBW3in, double runBW4in)
Input and complement kinematics for resolved 2 -> 2 process.
Definition: SigmaProcess.h:496
Definition: SusyLesHouches.h:393
Definition: SigmaProcess.h:485
virtual double sigmaHatWrap(int id1in=0, int id2in=0)
Definition: SigmaProcess.h:514
vector< InBeam > inBeamA
Partons in beams, with PDF&#39;s.
Definition: SigmaProcess.h:333
virtual int gmZmode() const
Special process-specific gamma*/Z0 choice if >=0 (e.g. f fbar -> H0 Z0).
Definition: SigmaProcess.h:238
virtual double sigmaHat()
Evaluate sigma for unresolved processes.
Definition: SigmaProcess.h:421
virtual double sigmaPDF(bool, bool, bool, double, double)
Dummy function: action is put in PhaseSpaceLHA.
Definition: SigmaProcess.h:610
virtual bool convert2mb() const
Answer for these processes already in mb, so do not convert.
Definition: SigmaProcess.h:428
virtual ~SigmaLHAProcess()
Destructor.
Definition: SigmaProcess.h:604
void updateBeamIDs()
Switch to new beam particle identities; for similar hadrons only.
Definition: SigmaProcess.h:101
Definition: Event.h:32
virtual void set1Kin(double x1in, double x2in, double sHin)
Input and complement kinematics for resolved 2 -> 1 process.
Definition: SigmaProcess.h:456
virtual int id3Mass() const
Definition: SigmaProcess.h:213
static const double MASSMARGIN
The sum of outgoing masses must not be too close to the cm energy.
Definition: SigmaProcess.h:305
virtual void set2KinMPI(double x1in, double x2in, double sHin, double tHin, double uHin, double alpSin, double alpEMin, bool needMasses, double m3in, double m4in)
Ditto, but for Multiparton Interactions applications, so different input.
Definition: SigmaProcess.h:502
virtual int nFinal() const
Number of final-state particles.
Definition: SigmaProcess.h:493
virtual void setIdInDiff(int, int)
Set the incoming ids for diffraction.
Definition: SigmaProcess.h:283
virtual bool setupForME()
Definition: SigmaProcess.h:366
virtual string name() const
Process name and code, and the number of final-state particles.
Definition: SigmaProcess.h:178
virtual ~SigmaProcess()
Destructor.
Definition: SigmaProcess.h:91
Sigma2Process()
Constructor.
Definition: SigmaProcess.h:527
virtual double sigmaPDF(bool, bool, bool, double, double)
Since no PDF&#39;s there is no difference from above.
Definition: SigmaProcess.h:424
virtual ~Sigma3Process()
Destructor.
Definition: SigmaProcess.h:556
double phi(const Vec4 &v1, const Vec4 &v2)
phi is azimuthal angle between v1 and v2 around z axis.
Definition: Basics.cc:708
virtual void set2Kin(double, double, double, double, double, double, double, double)
Definition: SigmaProcess.h:116
virtual ~Sigma2Process()
Destructor.
Definition: SigmaProcess.h:490
virtual bool convert2mb() const
Answer for these processes not in GeV^-2, so do not do this conversion.
Definition: SigmaProcess.h:626
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
double m(const Vec4 &v1)
Invariant mass and its square.
Definition: Basics.cc:587
Definition: SigmaProcess.h:596
double tH
Store subprocess kinematics quantities.
Definition: SigmaProcess.h:542
virtual void setIdInDiff(int idAin, int idBin)
Set the incoming ids for diffraction.
Definition: SigmaProcess.h:431
virtual int nFinal() const
Number of final-state particles.
Definition: SigmaProcess.h:415
virtual void setScale()
Set scale, when that is missing for an external LHA process.
Definition: SigmaProcess.h:175
InPair is a simple helper class for colliding parton pairs and their flux.
Definition: SigmaProcess.h:68
int id1
Store flavour, colour, anticolour, mass, angles and the whole particle.
Definition: SigmaProcess.h:354
virtual string name() const
Info on the subprocess.
Definition: SigmaProcess.h:619
int idA
Values.
Definition: SigmaProcess.h:77
bool swappedTU() const
Tell whether tHat and uHat are swapped (= same as swap 3 and 4).
Definition: SigmaProcess.h:241
virtual double sigmaHat()
Evaluate d(sigmaHat)/d(tHat) for resolved 2 -> 2 processes.
Definition: SigmaProcess.h:509
bool doVarE
Initialization data, normally only set once.
Definition: SigmaProcess.h:315
Definition: Basics.h:32
virtual bool initFlux()
No partonic flux to be set up.
Definition: SigmaProcess.h:607
virtual bool allowNegativeSigma() const
Special treatment needed if negative cross sections allowed.
Definition: SigmaProcess.h:205
SigmaProcess()
Constructor.
Definition: SigmaProcess.h:288
virtual void initProc()
Initialize process. Only used for some processes.
Definition: SigmaProcess.h:105
virtual double weightNLO()
Evaluate inclusive NLO weight.
Definition: SigmaProcess.h:163
int idA
Information on incoming beams.
Definition: SigmaProcess.h:327
void setId(int id1in=0, int id2in=0, int id3in=0, int id4in=0, int id5in=0)
Set flavour, colour and anticolour.
Definition: SigmaProcess.h:375
void setLHAPtr(LHAupPtr lhaUpPtrIn)
Store or replace Les Houches pointer.
Definition: SigmaProcess.h:98