StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SigmaQCD.h
1 // SigmaQCD.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2012 Torbjorn Sjostrand.
3 // PYTHIA is licenced under the GNU GPL version 2, see COPYING for details.
4 // Please respect the MCnet Guidelines, see GUIDELINES for details.
5 
6 // Header file for QCD process differential cross sections.
7 // Contains classes derived from SigmaProcess via Sigma(0/2)Process.
8 
9 #ifndef Pythia8_SigmaQCD_H
10 #define Pythia8_SigmaQCD_H
11 
12 #include "SigmaProcess.h"
13 
14 namespace Pythia8 {
15 
16 //==========================================================================
17 
18 // A derived class for minimum-bias (inelastic, nondiffractive) events.
19 
20 class Sigma0minBias : public Sigma0Process {
21 
22 public:
23 
24  // Constructor.
25  Sigma0minBias() {}
26 
27  // Evaluate sigma.
28  virtual double sigmaHat() {return sigmaTotPtr->sigmaND();}
29 
30  // Select flavour, colour and anticolour.
31  virtual void setIdColAcol() {}
32 
33  // Info on the subprocess.
34  virtual string name() const {return "minimum bias";}
35  virtual int code() const {return 101;}
36  virtual bool isMinBias() const {return true;}
37 
38 private:
39 
40 };
41 
42 //==========================================================================
43 
44 // A derived class for elastic scattering A B -> A B.
45 
46 class Sigma0AB2AB : public Sigma0Process {
47 
48 public:
49 
50  // Constructor.
51  Sigma0AB2AB() {}
52 
53  // Evaluate sigma.
54  virtual double sigmaHat() {return sigmaTotPtr->sigmaEl();}
55 
56  // Select flavour, colour and anticolour.
57  virtual void setIdColAcol();
58 
59  // Info on the subprocess.
60  virtual string name() const {return "A B -> A B elastic";}
61  virtual int code() const {return 102;}
62  virtual bool isResolved() const {return false;}
63 
64 private:
65 
66 };
67 
68 //==========================================================================
69 
70 // A derived class for single diffractive scattering A B -> X B.
71 
72 class Sigma0AB2XB : public Sigma0Process {
73 
74 public:
75 
76  // Constructor.
77  Sigma0AB2XB() {}
78 
79  // Evaluate sigma.
80  virtual double sigmaHat() {return sigmaTotPtr->sigmaXB();}
81 
82  // Select flavour, colour and anticolour.
83  virtual void setIdColAcol();
84 
85  // Info on the subprocess.
86  virtual string name() const {return "A B -> X B single diffractive";}
87  virtual int code() const {return 103;}
88  virtual bool isResolved() const {return false;}
89  virtual bool isDiffA() const {return true;};
90 
91 private:
92 
93 };
94 
95 //==========================================================================
96 
97 // A derived class for single diffractive scattering A B -> A X.
98 
99 class Sigma0AB2AX : public Sigma0Process {
100 
101 public:
102 
103  // Constructor.
104  Sigma0AB2AX() {}
105 
106  // Evaluate sigma.
107  virtual double sigmaHat() {return sigmaTotPtr->sigmaAX();}
108 
109  // Select flavour, colour and anticolour.
110  virtual void setIdColAcol();
111 
112  // Info on the subprocess.
113  virtual string name() const {return "A B -> A X single diffractive";}
114  virtual int code() const {return 104;}
115  virtual bool isResolved() const {return false;}
116  virtual bool isDiffB() const {return true;};
117 
118 private:
119 
120 };
121 
122 //==========================================================================
123 
124 // A derived class for double diffractive scattering A B -> X X.
125 
126 class Sigma0AB2XX : public Sigma0Process {
127 
128 public:
129 
130  // Constructor.
131  Sigma0AB2XX() {}
132 
133  // Evaluate sigma.
134  virtual double sigmaHat() {return sigmaTotPtr->sigmaXX();}
135 
136  // Select flavour, colour and anticolour.
137  virtual void setIdColAcol();
138 
139  // Info on the subprocess.
140  virtual string name() const {return "A B -> X X double diffractive";}
141  virtual int code() const {return 105;}
142  virtual bool isResolved() const {return false;}
143  virtual bool isDiffA() const {return true;};
144  virtual bool isDiffB() const {return true;};
145 
146 private:
147 
148 };
149 
150 //==========================================================================
151 
152 // A derived class for g g -> g g.
153 
154 class Sigma2gg2gg : public Sigma2Process {
155 
156 public:
157 
158  // Constructor.
159  Sigma2gg2gg() {}
160 
161  // Calculate flavour-independent parts of cross section.
162  virtual void sigmaKin();
163 
164  // Evaluate d(sigmaHat)/d(tHat).
165  virtual double sigmaHat() {return sigma;}
166 
167  // Select flavour, colour and anticolour.
168  virtual void setIdColAcol();
169 
170  // Info on the subprocess.
171  virtual string name() const {return "g g -> g g";}
172  virtual int code() const {return 111;}
173  virtual string inFlux() const {return "gg";}
174 
175 private:
176 
177  // Values stored for colour flow selection.
178  double sigTS, sigUS, sigTU, sigSum, sigma;
179 
180 };
181 
182 //==========================================================================
183 
184 // A derived class for g g -> q qbar (q = u, d, s, i.e. almost massless).
185 
187 
188 public:
189 
190  // Constructor.
191  Sigma2gg2qqbar() {}
192 
193  // Initialize process.
194  virtual void initProc();
195 
196  // Calculate flavour-independent parts of cross section.
197  virtual void sigmaKin();
198 
199  // Evaluate d(sigmaHat)/d(tHat).
200  virtual double sigmaHat() {return sigma;}
201 
202  // Select flavour, colour and anticolour.
203  virtual void setIdColAcol();
204 
205  // Info on the subprocess.
206  virtual string name() const {return "g g -> q qbar (uds)";}
207  virtual int code() const {return 112;}
208  virtual string inFlux() const {return "gg";}
209 
210 private:
211 
212  // Number of quarks to be considered in massless approximation.
213  int nQuarkNew;
214 
215  // Values stored for colour flow selection.
216  int idNew;
217  double mNew, m2New, sigTS, sigUS, sigSum, sigma;
218 
219 };
220 
221 //==========================================================================
222 
223 // A derived class for q g -> q g (q = u, d, s, c, b).
224 // Use massless approximation also for Q since no alternative.
225 
226 class Sigma2qg2qg : public Sigma2Process {
227 
228 public:
229 
230  // Constructor.
231  Sigma2qg2qg() {}
232 
233  // Calculate flavour-independent parts of cross section.
234  virtual void sigmaKin();
235 
236  // Evaluate d(sigmaHat)/d(tHat).
237  virtual double sigmaHat() {return sigma;}
238 
239  // Select flavour, colour and anticolour.
240  virtual void setIdColAcol();
241 
242  // Info on the subprocess.
243  virtual string name() const {return "q g -> q g";}
244  virtual int code() const {return 113;}
245  virtual string inFlux() const {return "qg";}
246 
247 private:
248 
249  // Values stored for colour flow selection.
250  double mNew, m2New, sigTS, sigTU, sigSum, sigma;
251 
252 };
253 
254 //==========================================================================
255 
256 // A derived class for q qbar' -> q qbar' or q q' -> q q'
257 // (qbar qbar' -> qbar qbar'), q' may be same as q.
258 
259 class Sigma2qq2qq : public Sigma2Process {
260 
261 public:
262 
263  // Constructor.
264  Sigma2qq2qq() {}
265 
266  // Calculate flavour-independent parts of cross section.
267  virtual void sigmaKin();
268 
269  // Evaluate d(sigmaHat)/d(tHat).
270  virtual double sigmaHat();
271 
272  // Select flavour, colour and anticolour.
273  virtual void setIdColAcol();
274 
275  // Info on the subprocess.
276  virtual string name() const {return "q q(bar)' -> q q(bar)'";}
277  virtual int code() const {return 114;}
278  virtual string inFlux() const {return "qq";}
279 
280  private:
281 
282  // Values stored for colour flow selection.
283  double sigT, sigU, sigTU, sigST, sigSum;
284 
285 };
286 
287 //==========================================================================
288 
289 // A derived class for q qbar -> g g.
290 
292 
293 public:
294 
295  // Constructor.
296  Sigma2qqbar2gg() {}
297 
298  // Calculate flavour-independent parts of cross section.
299  virtual void sigmaKin();
300 
301  // Evaluate d(sigmaHat)/d(tHat).
302  virtual double sigmaHat() {return sigma;}
303 
304  // Select flavour, colour and anticolour.
305  virtual void setIdColAcol();
306 
307  // Info on the subprocess.
308  virtual string name() const {return "q qbar -> g g";}
309  virtual int code() const {return 115;}
310  virtual string inFlux() const {return "qqbarSame";}
311 
312  private:
313 
314  // Values stored for colour flow selection.
315  double sigTS, sigUS, sigSum, sigma;
316 
317 };
318 
319 //==========================================================================
320 
321 // A derived class for q qbar -> q' qbar'.
322 
324 
325 public:
326 
327  // Constructor.
329 
330  // Initialize process.
331  virtual void initProc();
332 
333  // Calculate flavour-independent parts of cross section.
334  virtual void sigmaKin();
335 
336  // Evaluate d(sigmaHat)/d(tHat).
337  virtual double sigmaHat() {return sigma;}
338 
339  // Select flavour, colour and anticolour.
340  virtual void setIdColAcol();
341 
342  // Info on the subprocess.
343  virtual string name() const {return "q qbar -> q' qbar' (uds)";}
344  virtual int code() const {return 116;}
345  virtual string inFlux() const {return "qqbarSame";}
346 
347  private:
348 
349  // Number of quarks to be considered in massless approximation.
350  int nQuarkNew;
351 
352  // Values stored for colour flow selection.
353  int idNew;
354  double mNew, m2New, sigS, sigma;
355 
356 };
357 
358 //==========================================================================
359 
360 // A derived class for g g -> Q Qbar (Q = c, b or t).
361 
363 
364 public:
365 
366  // Constructor.
367  Sigma2gg2QQbar(int idIn, int codeIn) : idNew(idIn), codeSave(codeIn) {}
368 
369  // Initialize process.
370  virtual void initProc();
371 
372  // Calculate flavour-independent parts of cross section.
373  virtual void sigmaKin();
374 
375  // Evaluate d(sigmaHat)/d(tHat).
376  virtual double sigmaHat() {return sigma;}
377 
378  // Select flavour, colour and anticolour.
379  virtual void setIdColAcol();
380 
381  // Evaluate weight for W decay angles in top decay (else inactive).
382  virtual double weightDecay( Event& process, int iResBeg, int iResEnd);
383 
384  // Info on the subprocess.
385  virtual string name() const {return nameSave;}
386  virtual int code() const {return codeSave;}
387  virtual string inFlux() const {return "gg";}
388  virtual int id3Mass() const {return idNew;}
389  virtual int id4Mass() const {return idNew;}
390 
391  private:
392 
393  // Values stored for process type and colour flow selection.
394  int idNew, codeSave;
395  string nameSave;
396  double sigTS, sigUS, sigSum, sigma, openFracPair;
397 
398 };
399 
400 //==========================================================================
401 
402 // A derived class for q qbar -> Q Qbar (Q = c, b or t).
403 
405 
406 public:
407 
408  // Constructor.
409  Sigma2qqbar2QQbar(int idIn, int codeIn) : idNew(idIn), codeSave(codeIn) {}
410 
411  // Initialize process.
412  virtual void initProc();
413 
414  // Calculate flavour-independent parts of cross section.
415  virtual void sigmaKin();
416 
417  // Evaluate d(sigmaHat)/d(tHat).
418  virtual double sigmaHat() {return sigma;}
419 
420  // Select flavour, colour and anticolour.
421  virtual void setIdColAcol();
422 
423  // Evaluate weight for W decay angles in top decay (else inactive).
424  virtual double weightDecay( Event& process, int iResBeg, int iResEnd);
425 
426  // Info on the subprocess.
427  virtual string name() const {return nameSave;}
428  virtual int code() const {return codeSave;}
429  virtual string inFlux() const {return "qqbarSame";}
430  virtual int id3Mass() const {return idNew;}
431  virtual int id4Mass() const {return idNew;}
432 
433  private:
434 
435  // Values stored for process type.
436  int idNew, codeSave;
437  string nameSave;
438  double sigma, openFracPair;
439 
440 };
441 
442 //==========================================================================
443 
444 // A derived class for g g -> g g g.
445 
446 class Sigma3gg2ggg : public Sigma3Process {
447 
448 public:
449 
450  // Constructor.
451  Sigma3gg2ggg() {}
452 
453  // Calculate flavour-independent parts of cross section.
454  virtual void sigmaKin();
455 
456  // Evaluate d(sigmaHat)/d(tHat).
457  virtual double sigmaHat() {return sigma;}
458 
459  // Select flavour, colour and anticolour.
460  virtual void setIdColAcol();
461 
462  // Info on the subprocess.
463  virtual string name() const {return "g g -> g g g";}
464  virtual int code() const {return 131;}
465  virtual int nFinal() const {return 3;}
466  virtual string inFlux() const {return "gg";}
467  virtual bool isQCD3body() const {return true;}
468 
469 private:
470 
471  // Values stored for colour flow selection.
472  double sigma;
473 
474  // Intermediate storage and calculation of four-products.
475  double pp[6][6];
476  double cycle(int i1, int i2, int i3, int i4, int i5) {return
477  pp[i1][i2] * pp[i2][i3] * pp[i3][i4] * pp[i4][i5] * pp[i5][i1];}
478 
479 };
480 
481 //==========================================================================
482 
483 // A derived class for q qbar -> g g g.
484 
486 
487 public:
488 
489  // Constructor.
490  Sigma3qqbar2ggg() {}
491 
492  // Calculate flavour-independent parts of cross section.
493  virtual void sigmaKin();
494 
495  // Evaluate d(sigmaHat)/d(tHat).
496  virtual double sigmaHat() {return sigma;}
497 
498  // Select flavour, colour and anticolour.
499  virtual void setIdColAcol();
500 
501  // Info on the subprocess.
502  virtual string name() const {return "q qbar -> g g g";}
503  virtual int code() const {return 132;}
504  virtual int nFinal() const {return 3;}
505  virtual string inFlux() const {return "qqbarSame";}
506  virtual bool isQCD3body() const {return true;}
507 
508 protected:
509 
510  // Pick/map a random final state configuration
511  int config;
512  inline void pickFinal() { config = int( 6 * rndmPtr->flat() ); }
513  inline void mapFinal();
514 
515  // |M|^2 calculation
516  inline double m2Calc();
517 
518  // Four-vectors for |M|^2 calculation
519  Vec4 pCM[5];
520 
521  // Intermediate storage and calculation of four-products
522  double a[3], b[3], pp[3][3], ab[3][3];
523 
524  // Values stored for colour flow selection.
525  double sigma;
526 
527 };
528 
529 //==========================================================================
530 
531 // A derived class for q g -> q g g
532 // Derived from Sigma3qqbar2ggg
533 
535 
536 public:
537 
538  // Constructor.
539  Sigma3qg2qgg() {}
540 
541  // Calculate flavour-independent parts of cross section.
542  virtual void sigmaKin();
543 
544  // Evaluate d(sigmaHat)/d(tHat).
545  virtual double sigmaHat();
546 
547  // Select flavour, colour and anticolour.
548  virtual void setIdColAcol();
549 
550  // Info on the subprocess.
551  virtual string name() const {return "q g -> q g g";}
552  virtual int code() const {return 133;}
553  virtual int nFinal() const {return 3;}
554  virtual string inFlux() const {return "qg";}
555  virtual bool isQCD3body() const {return true;}
556 
557 private:
558 
559  // Sigma for (qg) and (gq) incoming
560  double sigma[2];
561 
562 };
563 
564 //==========================================================================
565 
566 // A derived class for g g -> q qbar g
567 // Derived from Sigma3qqbar2ggg
568 
570 
571 public:
572 
573  // Constructor.
574  Sigma3gg2qqbarg() {}
575 
576  // Initialize process.
577  virtual void initProc();
578 
579  // Calculate flavour-independent parts of cross section.
580  virtual void sigmaKin();
581 
582  // Select flavour, colour and anticolour.
583  virtual void setIdColAcol();
584 
585  // Info on the subprocess.
586  virtual string name() const {return "g g -> q qbar g";}
587  virtual int code() const {return 138;}
588  virtual int nFinal() const {return 3;}
589  virtual string inFlux() const {return "gg";}
590  virtual bool isQCD3body() const {return true;}
591 
592 private:
593 
594  // Number of quarks to be considered in massless approximation.
595  int nQuarkNew;
596 
597 };
598 
599 //==========================================================================
600 
601 // A derived class for q q' -> q q' g
602 
604 
605 public:
606 
607  // Constructor.
608  Sigma3qq2qqgDiff() {}
609 
610  // Calculate flavour-independent parts of cross section.
611  virtual void sigmaKin();
612 
613  // Evaluate d(sigmaHat)/d(tHat).
614  virtual double sigmaHat();
615 
616  // Select flavour, colour and anticolour.
617  virtual void setIdColAcol();
618 
619  // Info on the subprocess.
620  virtual string name() const
621  {return "q(bar) q(bar)' -> q(bar) q(bar)' g";}
622  virtual int code() const {return 134;}
623  virtual int nFinal() const {return 3;}
624  virtual string inFlux() const {return "qq";}
625  virtual bool isQCD3body() const {return true;}
626 
627 protected:
628 
629  // Pick/map a random final state configuration
630  int config;
631  inline void pickFinal() { config = int( 6 * rndmPtr->flat() ); }
632  inline void mapFinal();
633 
634  // |M|^2 calculation
635  inline double m2Calc();
636 
637  // Kinematic configuration
638  Vec4 pCM[5];
639 
640  // Four-products
641  double s, t, u, sp, tp, up;
642 
643  // Cross section
644  double sigma;
645 
646 };
647 
648 //==========================================================================
649 
650 // A derived class for q qbar -> q' qbar' g
651 // Derived from Sigma3qq2qqgDiff
652 
654 
655 public:
656 
657  // Constructor.
659 
660  // Initialize process.
661  virtual void initProc();
662 
663  // Calculate flavour-independent parts of cross section.
664  virtual void sigmaKin();
665 
666  // Evaluate d(sigmaHat)/d(tHat).
667  virtual double sigmaHat() {return sigma;}
668 
669  // Select flavour, colour and anticolour.
670  virtual void setIdColAcol();
671 
672  // Info on the subprocess.
673  virtual string name() const {return "q qbar -> q' qbar' g";}
674  virtual int code() const {return 136;}
675  virtual int nFinal() const {return 3;}
676  virtual string inFlux() const {return "qqbarSame";}
677  virtual bool isQCD3body() const {return true;}
678 
679 private:
680 
681  // Number of quarks to be considered in massless approximation.
682  int nQuarkNew;
683 
684 };
685 
686 //==========================================================================
687 
688 // A derived class for q g -> q q' qbar'
689 // Derived from Sigma3qq2qqgDiff
690 
692 
693 public:
694 
695  // Constructor.
697 
698  // Initialize process.
699  virtual void initProc();
700 
701  // Calculate flavour-independent parts of cross section.
702  virtual void sigmaKin();
703 
704  // Evaluate d(sigmaHat)/d(tHat).
705  virtual double sigmaHat();
706 
707  // Select flavour, colour and anticolour.
708  virtual void setIdColAcol();
709 
710  // Info on the subprocess.
711  virtual string name() const {return "q g -> q q' qbar'";}
712  virtual int code() const {return 139;}
713  virtual int nFinal() const {return 3;}
714  virtual string inFlux() const {return "qg";}
715  virtual bool isQCD3body() const {return true;}
716 
717 private:
718 
719  // Number of quarks to be considered in massless approximation.
720  int nQuarkNew;
721 
722  // gq and qg incoming
723  double sigma[2];
724 
725 };
726 
727 //==========================================================================
728 
729 // A derived class for q q -> q q g
730 
732 
733 public:
734 
735  // Constructor.
736  Sigma3qq2qqgSame() {}
737 
738  // Calculate flavour-independent parts of cross section.
739  virtual void sigmaKin();
740 
741  // Evaluate d(sigmaHat)/d(tHat).
742  virtual double sigmaHat();
743 
744  // Select flavour, colour and anticolour.
745  virtual void setIdColAcol();
746 
747  // Info on the subprocess.
748  virtual string name() const
749  {return "q(bar) q(bar) -> q(bar) q(bar) g";}
750  virtual int code() const {return 135;}
751  virtual int nFinal() const {return 3;}
752  virtual string inFlux() const {return "qq";}
753  virtual bool isQCD3body() const {return true;}
754 
755 protected:
756 
757  // Pick/map a random final state configuration
758  int config;
759  inline void pickFinal() { config = int( 6 * rndmPtr->flat() ); }
760  inline void mapFinal();
761 
762  // |M|^2 calculation
763  inline double m2Calc();
764 
765  // Kinematic configuration
766  Vec4 pCM[5];
767 
768  // Four-products
769  double s, t, u, sp, tp, up;
770  double ssp, ttp, uup, s_sp, t_tp, u_up;
771 
772  // Cross section
773  double sigma;
774 
775 };
776 
777 //==========================================================================
778 
779 // A derived class for q q -> q q g
780 // Derived from Sigma3qq2qqgSame
781 
783 
784 public:
785 
786  // Constructor.
788 
789  // Calculate flavour-independent parts of cross section.
790  virtual void sigmaKin();
791 
792  // Evaluate d(sigmaHat)/d(tHat).
793  virtual double sigmaHat() {return sigma;}
794 
795  // Select flavour, colour and anticolour.
796  virtual void setIdColAcol();
797 
798  // Info on the subprocess.
799  virtual string name() const {return "q qbar -> q qbar g";}
800  virtual int code() const {return 137;}
801  virtual int nFinal() const {return 3;}
802  virtual string inFlux() const {return "qqbarSame";}
803  virtual bool isQCD3body() const {return true;}
804 
805 private:
806 
807 };
808 
809 //==========================================================================
810 
811 // A derived class for q g -> q qbar q; same flavour.
812 // Derived from Sigma3qq2qqgSame
813 
815 
816 public:
817 
818  // Constructor.
820 
821  // Calculate flavour-independent parts of cross section.
822  virtual void sigmaKin();
823 
824  // Evaluate d(sigmaHat)/d(tHat).
825  virtual double sigmaHat();
826 
827  // Select flavour, colour and anticolour.
828  virtual void setIdColAcol();
829 
830  // Info on the subprocess.
831  virtual string name() const {return "q g -> q q qbar";}
832  virtual int code() const {return 140;}
833  virtual int nFinal() const {return 3;}
834  virtual string inFlux() const {return "qg";}
835  virtual bool isQCD3body() const {return true;}
836 
837 private:
838 
839  // gq and qg incoming
840  double sigma[2];
841 
842 };
843 
844 //==========================================================================
845 
846 } // end namespace Pythia8
847 
848 #endif // Pythia8_SigmaQCD_H