herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
ThreeBodyAllOn1IntegralCalculator.h
1// -*- C++ -*-
2//
3// ThreeBodyAllOn1IntegralCalculator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4// Copyright (C) 2002-2019 The Herwig Collaboration
5//
6// Herwig is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef HERWIG_ThreeBodyAllOn1IntegralCalculator_H
10#define HERWIG_ThreeBodyAllOn1IntegralCalculator_H
11// This is the declaration of the ThreeBodyAllOn1IntegralCalculator class.
12
13#include "WidthCalculatorBase.h"
14#include "Herwig/Utilities/GSLIntegrator.h"
15
16namespace Herwig {
17using namespace ThePEG;
18
27template<class T>
29
30public:
31
44 ThreeBodyAllOn1IntegralCalculator(int intype, Energy inmass, Energy inwidth,
45 double inpow, T indGamma,int mode,
46 Energy m1,Energy m2,Energy m3)
47 : _variabletype(intype),_intmass(inmass),_intwidth(inwidth),
48 _intpower(inpow),_mode(mode), _theDgamma(indGamma) {
49 _m .resize(4);
50 _m2.resize(4);
51 _m[1]=m1;_m[2]=m2;_m[3]=m3;
52 for(int ix=1;ix<4;++ix)_m2[ix]=sqr(_m[ix]);
53 }
54
60 Energy partialWidth(Energy2 q2) const;
61
69 void resetMass(int imass,Energy mass) {
70 assert(imass<4);
71 _m[imass]=mass;
72 _m2[imass]=mass*mass;
73 }
74
81 Energy getMass(const int imass) const {
82 assert(imass<4);
83 return _m[imass];
84 }
85
92 Energy otherMass(const int imass) const {
93 assert(imass>0&&imass<4);
94 if(imass==1) return _m[2]+_m[3];
95 else if(imass==2) return _m[1]+_m[3];
96 else return _m[1]+_m[2];
97 }
98
104 Energy operator ()(double argument) const;
106 typedef double ArgType;
108 typedef Energy ValType;
109
110private:
111
117
118private:
119
124
128 Energy _intmass;
129
133 Energy _intwidth;
134
138 double _intpower;
139
140
144 int _mode;
145
149 mutable vector<Energy> _m;
150
154 mutable vector<Energy2> _m2;
155
160
165
166};
167}
168
169#ifndef ThePEG_TEMPLATES_IN_CC_FILE
170 #include "ThreeBodyAllOn1IntegralCalculator.tcc"
171#endif
172
173#endif /* HERWIG_ThreeBodyAllOn1IntegralCalculator_H */
This class is designed to integrate a given function between 2 limits using the gsl QAGS integration ...
Definition: GSLIntegrator.h:40
The ThreeBodyAllOn1IntegralCalculator class is designed to integrate a function which gives to give ...
ThreeBodyAllOn1IntegralCalculator & operator=(const ThreeBodyAllOn1IntegralCalculator &)=delete
Private and non-existent assignment operator.
Energy partialWidth(Energy2 q2) const
calculate the width for a given mass
double ArgType
Argument type for the GSLIntegrator.
Energy operator()(double argument) const
The integrand for the inner integrand.
void resetMass(int imass, Energy mass)
Get the mass of one of the decay products.
Energy otherMass(const int imass) const
Get the masses of all bar the one specified.
double _intpower
The power for power-law smoothing.
vector< Energy2 > _m2
mass squareds of the external particles
Energy ValType
Return type for the GSLIntegrator.
Energy getMass(const int imass) const
Get the mass of one of the decay products.
T _theDgamma
The function for the differential rate.
vector< Energy > _m
masses of the external particles
ThreeBodyAllOn1IntegralCalculator(int intype, Energy inmass, Energy inwidth, double inpow, T indGamma, int mode, Energy m1, Energy m2, Energy m3)
Constructor with the as a function.
The WidthCalculatorBase class is a base class to be used by classes which calculate partial widths fo...
-*- C++ -*-
constexpr auto sqr(const T &x) -> decltype(x *x)