StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
HardDiffraction.h
1 // HardDiffraction.h is a part of the PYTHIA event generator.
2 // Copyright (C) 2018 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 // Author: Christine Rasmussen.
7 
8 // Header file for the HardDiffraction class.
9 
10 #ifndef Pythia8_HardDiffraction_H
11 #define Pythia8_HardDiffraction_H
12 
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/BeamParticle.h"
15 #include "Pythia8/BeamRemnants.h"
16 #include "Pythia8/Info.h"
17 #include "Pythia8/MultipartonInteractions.h"
18 #include "Pythia8/PythiaStdlib.h"
19 #include "Pythia8/Settings.h"
20 #include "Pythia8/SpaceShower.h"
21 #include "Pythia8/TimeShower.h"
22 
23 namespace Pythia8 {
24 
25 //==========================================================================
26 
27 // HardDiffraction class.
28 // This class handles hard diffraction, together with PartonLevel.
29 
31 
32 public:
33 
34  // Constructor and destructor.
35  HardDiffraction() {};
36  ~HardDiffraction() {}
37 
38  // Initialise constants
39  void init(Info* infoPtrIn, Settings& settingsIn, Rndm* rndmPtrIn,
40  BeamParticle* beamAPtrIn, BeamParticle* beamBPtrIn,
41  BeamParticle* beamPomAPtrIn, BeamParticle* beamPomBPtrIn,
42  SigmaTotal* sigTotPtrIn);
43 
44  // Main routine to check if event is from diffractive PDF.
45  bool isDiffractive(int iBeamIn = 1, int partonIn = 0,
46  double xIn = 0., double Q2In = 0., double xfIncIn = 0.);
47 
48  // Get diffractive values.
49  double getXPomeronA() {return xPomA;}
50  double getXPomeronB() {return xPomB;}
51  double getTPomeronA() {return tPomA;}
52  double getTPomeronB() {return tPomB;}
53  double getThetaPomeronA() {return thetaPomA;}
54  double getThetaPomeronB() {return thetaPomB;}
55 
56 private:
57 
58  // Constants: could only be changed in the code itself.
59  static const double TINYPDF;
60  static const double POMERONMASS;
61  static const double RHOMASS;
62  static const double PROTONMASS;
63  static const double DIFFMASSMARGIN;
64 
65  // Initialization and event data.
66  bool isGammaA, isGammaB, isGammaGamma, usePomInPhoton;
67  int pomFlux, iBeam, idA, idB;
68  double rescale, normPom, sigTotRatio,
69  a1, a2, a3, A1, A2, A3, a0, ap, b0,
70  mA, mB, s, s1, s2, s3, s4,
71  xPomA, xPomB, tPomA, tPomB, thetaPomA, thetaPomB;
72 
73  // Pointer to various information on the generation.
74  Info* infoPtr;
75 
76  // Pointer to the settings database.
77  Settings settings;
78 
79  // Pointer to the random number generator.
80  Rndm* rndmPtr;
81 
82  // Pointers to incoming beams.
83  BeamParticle* beamAPtr;
84  BeamParticle* beamBPtr;
85  BeamParticle* beamPomAPtr;
86  BeamParticle* beamPomBPtr;
87 
88  // Pointer to temporary Pomeron PDF.
89  BeamParticle* tmpPomPtr;
90 
91  // Pointer to total cross sections
92  SigmaTotal* sigTotPtr;
93 
94  // Return Pomeron flux inside proton, integrated over t.
95  double xfPom(double xIn = 0.);
96 
97  // Pick a t value for a given x.
98  double pickTNow(double xIn = 0.);
99 
100  // Return Pomeron flux inside proton, differential in t.
101  double xfPomWithT(double xIn = 0., double tIn = 0.);
102 
103  // Make t range available as a pair.
104  pair<double, double> tRange(double xIn = 0.);
105 
106  // Calculate scattering angle from given x and t.
107  double getThetaNow(double xIn = 0., double tIn = 0.);
108 
109 };
110 
111 //==========================================================================
112 
113 } // end namespace Pythia8
114 
115 #endif // Pythia8_HardDiffraction_H