ATLAS Offline Software
Loading...
Searching...
No Matches
suep_shower.h
Go to the documentation of this file.
1/*
2 * This file is taken from the available public code at:
3 * https://gitlab.com/simonknapen/suep_generator
4 * by Simon Knapen.
5 */
6#ifndef SUEPSHOWER_h
7#define SUEPSHOWER_h
8
9#include <vector>
10#include <math.h>
11#include <functional> // for bind()
12#include <boost/math/tools/roots.hpp>
13#include "Pythia8/PhaseSpace.h"
14#include "Pythia8/Basics.h"
15
16//** Auxiliary class for tolerance checks */
17class tolerance {
18 public:
19 tolerance(double eps) :
20 m_eps(eps) {
21 }
22 bool operator()(double a, double b) {
23 return (std::abs(b - a) <= m_eps);
24 }
25 private:
26 double m_eps;
27};
28
33{
34 public:
35
42 Suep_shower(double mass, double temperature, double energy, Pythia8::Rndm *rndm = 0);
43
45 std::vector< Pythia8::Vec4 > generate_shower();
46
47 protected:
48
50 Pythia8::Rndm *m_rndmEngine;
51
53 double m_m;
54
56 double m_Temp;
57
59 double m_Etot;
60
61 protected:
62
64 double f(double p);
65
67 double fp(double p);
68
70 double test_fun(double p);
71
73 Pythia8::Vec4 generateFourVector();
74
77 double reballance_func(double a, const std::vector< Pythia8::Vec4 > &event);
78
79 private:
81 double m_A;
83 double m_p_m;
90
91};
92
93#endif
static Double_t a
Suep_shower(double mass, double temperature, double energy, Pythia8::Rndm *rndm=0)
Constructor.
double test_fun(double p)
Test function to be solved for p_plus,p_minus.
double m_p_m
convenience function of mass/Temperature ratio
Definition suep_shower.h:83
double fp(double p)
Derivative of Maxwell-Boltzmann.
double m_q_plus
solutions for shower generation.
Definition suep_shower.h:89
double m_p_minus
Definition suep_shower.h:85
Pythia8::Vec4 generateFourVector()
generate one random 4 vector from the thermal distribution
double m_q_minus
Definition suep_shower.h:89
double m_m
Mass of the dark mesons to be generated in the shower.
Definition suep_shower.h:53
Pythia8::Rndm * m_rndmEngine
Random number generator, if not provided will use rand()
Definition suep_shower.h:50
double m_p_plus
solutions for shower generation.
Definition suep_shower.h:85
double f(double p)
Maxwell-Boltzman distribution, slightly massaged.
double m_lambda_minus
Definition suep_shower.h:87
double m_Etot
Total energy of the system.
Definition suep_shower.h:59
double m_Temp
Temperature parameter.
Definition suep_shower.h:56
double m_lambda_plus
solutions in Lambda for shower generation
Definition suep_shower.h:87
std::vector< Pythia8::Vec4 > generate_shower()
Generate a shower event, in the rest frame of the showe.
double m_q_m
Definition suep_shower.h:89
double reballance_func(double a, const std::vector< Pythia8::Vec4 > &event)
auxiliary function which computes the total energy difference as a function of the momentum vectors a...
double m_A
mass/Temperature ratio
Definition suep_shower.h:81
tolerance(double eps)
Definition suep_shower.h:19
double m_eps
Definition suep_shower.h:26
bool operator()(double a, double b)
Definition suep_shower.h:22