PYTHIA  8.312
GammaKinematics.h
1 // GammaKinematics.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 kinematics selection of photons from lepton beams.
7 
8 #ifndef Pythia8_GammaKinematics_H
9 #define Pythia8_GammaKinematics_H
10 
11 #include "Pythia8/Basics.h"
12 #include "Pythia8/BeamParticle.h"
13 #include "Pythia8/Info.h"
14 #include "Pythia8/PhysicsBase.h"
15 #include "Pythia8/Settings.h"
16 
17 namespace Pythia8 {
18 
19 //==========================================================================
20 
21 // Class to sample the virtuality and transverse momentum of emitted photons.
22 
23 class GammaKinematics : public PhysicsBase {
24 
25 public:
26 
27  // Constructor.
28  GammaKinematics() : Q2maxGamma(), Wmin(), Wmax(), eCM(), sCM(), m2BeamA(),
29  m2BeamB(), Q2min1(), Q2min2(), xGamma1(), xGamma2(), Q2gamma1(),
30  Q2gamma2(), phi1(), phi2(), kT1(), kT2(), kz1(), kz2(), mGmGm(), m2GmGm(),
31  theta1(), theta2(), theta1Max(), theta2Max(), eCM2A(), eCM2B(), sHatNew(),
32  kT(), kz(), phi(), theta(), xGammaMax1(), xGammaMax2(), m2eA(), m2eB(),
33  alphaEM(), log2xMinA(), log2xMinB(), log2xMaxA(), log2xMaxB(),
34  sigmaEstimate(), wt(), gammaMode(), subInA(), subInB(), hasGammaA(),
35  hasGammaB(), sampleQ2(), gammaA(), gammaB(),
36  hasApproxFluxA(), hasApproxFluxB(), sHatScaled() {}
37 
38  // Sample the trial or final event kinematics.
39  bool init();
40 
41  // Sampling of the kinematics of the intermediate photon.
42  bool sampleKTgamma(bool nonDiff = false);
43  bool deriveKin(double xGamma, double Q2gamma, double m2beam, double eCM2);
44  bool finalize();
46  double fluxWeight();
47  double setupSoftPhaseSpaceSampling(double sigmaMax);
48 
49  // Calculate and return rescaled sHat according to the process.
50  double calcNewSHat( double sHatOld);
51 
52  // Methods to pass along the sampled values.
53  double getQ2gamma1() const {return Q2gamma1;}
54  double getQ2gamma2() const {return Q2gamma2;}
55  double getPhi1() const {return phi1;}
56  double getPhi2() const {return phi2;}
57  double getKT1() const {return kT1;}
58  double getKT2() const {return kT2;}
59  double eCMsub() const {return mGmGm;}
60  double weight() const {return wt;}
61  int idInA() const {return subInA;}
62  int idInB() const {return subInB;}
63  bool hasNewSHat() const {return sHatScaled;}
64 
65 private:
66 
67  // Kinematics variables.
68  double Q2maxGamma, Wmin, Wmax, eCM, sCM, m2BeamA, m2BeamB, Q2min1, Q2min2,
69  xGamma1, xGamma2, Q2gamma1, Q2gamma2, phi1, phi2, kT1, kT2, kz1, kz2,
70  mGmGm, m2GmGm, theta1, theta2, theta1Max, theta2Max, eCM2A, eCM2B,
71  sHatNew, kT, kz, phi, theta, xGammaMax1, xGammaMax2, m2eA, m2eB,
72  alphaEM, log2xMinA, log2xMinB, log2xMaxA, log2xMaxB, sigmaEstimate,
73  wt;
74 
75  // Direct or resolved processes.
76  int gammaMode, subInA, subInB;
77 
78  // Sample one or two photon kinematics.
79  bool hasGammaA, hasGammaB, sampleQ2, gammaA, gammaB,
80  hasApproxFluxA, hasApproxFluxB, sHatScaled;
81 
82 };
83 
84 //==========================================================================
85 
86 } // end namespace Pythia8
87 
88 #endif // Pythia8_GammaKinematics_H
Definition: PhysicsBase.h:27
bool init()
Sample the trial or final event kinematics.
Definition: GammaKinematics.cc:22
GammaKinematics()
Constructor.
Definition: GammaKinematics.h:28
bool sampleKTgamma(bool nonDiff=false)
Sampling of the kinematics of the intermediate photon.
Definition: GammaKinematics.cc:89
Class to sample the virtuality and transverse momentum of emitted photons.
Definition: GammaKinematics.h:23
double setupSoftPhaseSpaceSampling(double sigmaMax)
Set up phase-space sampling for soft events.
Definition: GammaKinematics.cc:349
double calcNewSHat(double sHatOld)
Calculate and return rescaled sHat according to the process.
Definition: GammaKinematics.cc:256
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
double getQ2gamma1() const
Methods to pass along the sampled values.
Definition: GammaKinematics.h:53
double fluxWeight()
Calculate weight from oversampling with approximated flux.
Definition: GammaKinematics.cc:287
bool deriveKin(double xGamma, double Q2gamma, double m2beam, double eCM2)
Definition: GammaKinematics.cc:220
bool trialKinSoftPhaseSpaceSampling()
Sample photon kinematics for soft events.
Definition: GammaKinematics.cc:416
bool finalize()
Save the accepted values for further use.
Definition: GammaKinematics.cc:319