Line data Source code
1 : // HardDiffraction.h is a part of the PYTHIA event generator.
2 : // Copyright (C) 2015 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 : // 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 :
30 : class HardDiffraction {
31 :
32 : public:
33 :
34 : // Constructor and destructor.
35 0 : HardDiffraction() {};
36 0 : ~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 :
43 : // Main routine to check if event is from diffractive PDF.
44 : bool isDiffractive(int iBeamIn = 1, int partonIn = 0,
45 : double xIn = 0., double Q2In = 0., double xfIncIn = 0.);
46 :
47 : // Get diffractive values.
48 0 : double getXPomeronA() {return xPomA;}
49 0 : double getXPomeronB() {return xPomB;}
50 0 : double getTPomeronA() {return tPomA;}
51 0 : double getTPomeronB() {return tPomB;}
52 0 : double getThetaPomeronA() {return thetaPomA;}
53 0 : double getThetaPomeronB() {return thetaPomB;}
54 :
55 : private:
56 :
57 : // Constants: could only be changed in the code itself.
58 : static const double TINYPDF;
59 : static const double POMERONMASS;
60 : static const double PROTONMASS;
61 :
62 : // Initialization and event data.
63 : int pomSet, pomFlux, iBeam, idA, idB;
64 : double normPom, a1, a2, a3, A1, A2, A3, a0, ap, b0,
65 : mA, mB, s, s1, s2, s3, s4,
66 : xPomA, xPomB, tPomA, tPomB, thetaPomA, thetaPomB;
67 :
68 : // Pointer to various information on the generation.
69 : Info* infoPtr;
70 :
71 : // Pointer to the settings database.
72 : Settings settings;
73 :
74 : // Pointer to the random number generator.
75 : Rndm* rndmPtr;
76 :
77 : // Pointers to incoming beams.
78 : BeamParticle* beamAPtr;
79 : BeamParticle* beamBPtr;
80 : BeamParticle* beamPomAPtr;
81 : BeamParticle* beamPomBPtr;
82 :
83 : // Pointer to temporary Pomeron PDF.
84 : BeamParticle* tmpPDFPtr;
85 :
86 : // Return Pomeron flux inside proton, integrated over t.
87 : double xfPom(double xIn = 0.);
88 :
89 : // Pick a t value for a given x.
90 : double pickTNow(double xIn = 0.);
91 :
92 : // Return Pomeron flux inside proton, differential in t.
93 : double xfPomWithT(double xIn = 0., double tIn = 0.);
94 :
95 : // Make t range available as a pair.
96 : pair<double, double> tRange(double xIn = 0.);
97 :
98 : // Calculate scattering angle from given x and t.
99 : double getThetaNow(double xIn = 0., double tIn = 0.);
100 :
101 : };
102 :
103 : //==========================================================================
104 :
105 : } // end namespace Pythia8
106 :
107 : #endif // Pythia8_HardDiffraction_H
|