CMS 3D CMS Logo

SuepShower.h
Go to the documentation of this file.
1 #ifndef GeneratorInterface_Pythia8Interface_SuepShower_h
2 #define GeneratorInterface_Pythia8Interface_SuepShower_h
3 
4 #include <vector>
5 #include <utility>
6 #include <cmath>
7 #include <boost/math/tools/roots.hpp>
8 #include <boost/bind/bind.hpp>
9 #include "Pythia8/Pythia.h"
11 
12 class SuepShower {
13 public:
14  // Constructor
15  SuepShower(double mass, double temperature, Pythia8::Rndm* rndmPtr);
16 
17  // Empty destructor
18  ~SuepShower();
19 
20  // Method to generate 4-momenta of dark mesons after the showering
21  std::vector<Pythia8::Vec4> generateShower(double energy);
22 
23 private:
24  // private variables
25  // Shower parameters
27  double mass_over_T_;
28 
29  // Overall energy of the decaying particle
31 
32  // For the numerical algorithm precision
33  boost::math::tools::eps_tolerance<double> tolerance_;
34 
35  // Several auxiliar variables for generating the 4-momentum of showered particles. Following the naming of Appendix 1 of https://arxiv.org/pdf/1305.5226.pdf
36  // Median momentum in the M-B distribution
37  double p_m_;
38  // Two values of momentum at fMB(x)/fMB(p_m_) = e
39  double p_plus_, p_minus_;
40  // Auxiliars: fMB(p_plus_)/f'(p_plus_), fMB(p_minus_)/f'(p_minus_)
42  // More auxiliars: lambda_plus_/(p_plus_ + p_minus_), lambda_minus_/(p_plus_ + p_minus_), 1-q_plus_-q_minus_
43  double q_plus_, q_minus_, q_m_;
44 
45  // Pythia random number generator, to get the randomness into the shower
46  Pythia8::Rndm* fRndmPtr_;
47 
48  // Methods
49  // Maxwell-Boltzmann distribution as a function of |p|, slightly massaged, Eq. 6 of https://arxiv.org/pdf/1305.5226.pdf
50  const double fMaxwellBoltzmann(double p);
51  // Maxwell-Boltzmann derivative as a function of |p|, slightly massaged
52  const double fMaxwellBoltzmannPrime(double p);
53  // Log(fMaxwellBoltzmann(x)/fMaxwellBoltzmann(xmedian))+1, as a function of |p|, to be solved to find p_plus_, p_minus_
54  const double logTestFunction(double p);
55  // Generate the four vector of a particle (dark meson) in the shower
57  // sum(scale*scale*p*p + m*m) - E*E, find roots in scale to reballance momenta and impose E conservation
58  const double reballanceFunction(double scale, const std::vector<Pythia8::Vec4>& shower);
59 };
60 
61 #endif
double darkmeson_mass_
Definition: SuepShower.h:26
const double reballanceFunction(double scale, const std::vector< Pythia8::Vec4 > &shower)
Definition: SuepShower.cc:165
Pythia8::Rndm * fRndmPtr_
Definition: SuepShower.h:46
double p_m_
Definition: SuepShower.h:37
double mass_over_T_
Definition: SuepShower.h:27
double lambda_plus_
Definition: SuepShower.h:41
boost::math::tools::eps_tolerance< double > tolerance_
Definition: SuepShower.h:33
double q_plus_
Definition: SuepShower.h:43
double p_plus_
Definition: SuepShower.h:39
ExtVec< T, 4 > Vec4
Definition: ExtVec.h:64
const double fMaxwellBoltzmannPrime(double p)
Definition: SuepShower.cc:107
const double logTestFunction(double p)
Definition: SuepShower.cc:112
const Pythia8::Vec4 generateFourVector()
Definition: SuepShower.cc:115
double mediator_energy_
Definition: SuepShower.h:30
double q_minus_
Definition: SuepShower.h:43
double p_minus_
Definition: SuepShower.h:39
double q_m_
Definition: SuepShower.h:43
double lambda_minus_
Definition: SuepShower.h:41
SuepShower(double mass, double temperature, Pythia8::Rndm *rndmPtr)
Definition: SuepShower.cc:18
const double fMaxwellBoltzmann(double p)
Definition: SuepShower.cc:102
std::vector< Pythia8::Vec4 > generateShower(double energy)
Definition: SuepShower.cc:50