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