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