herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.2.1
PDT
ThreeBodyAllOnCalculator.h
1
// -*- C++ -*-
2
//
3
// ThreeBodyAllOnCalculator.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_ThreeBodyAllOnCalculator_H
10
#define HERWIG_ThreeBodyAllOnCalculator_H
11
// This is the declaration of the ThreeBodyAllOnCalculator class.
12
13
#include "WidthCalculatorBase.h"
14
#include "Herwig/Utilities/GSLIntegrator.h"
15
#include "Herwig/Decay/DecayIntegrator.h"
16
#include "Herwig/Decay/DecayPhaseSpaceMode.h"
17
18
namespace
Herwig
{
19
using namespace
ThePEG
;
20
21
template
<
class
T>
22
class
ThreeBodyAllOnCalculator
;
23
24
37
template
<
class
T>
38
class
ThreeBodyAllOnCalculator
:
public
WidthCalculatorBase
{
39
40
struct
Outer
{
49
53
Outer
(
typename
Ptr<
Herwig::ThreeBodyAllOnCalculator<T>
>::const_pointer in,
54
double
relerr)
55
: _integrand(in), _integrator(1e-35,relerr,1000)
56
{}
57
61
Energy4 operator ()(
double
x)
const
{
62
Energy2 low, upp;
63
_integrand->outerVariables(x,low,upp);
64
return
_integrator.value(*_integrand,low,upp);
65
}
67
typedef
double
ArgType
;
69
typedef
Energy4
ValType
;
70
74
typename
Ptr<Herwig::ThreeBodyAllOnCalculator<T> >::const_pointer
_integrand
;
75
79
GSLIntegrator
_integrator
;
80
};
81
82
public
:
83
88
friend
struct
ThreeBodyAllOnOuter;
89
90
public
:
91
105
ThreeBodyAllOnCalculator
(vector<double> inweights,
106
vector<int> intype,
107
vector<Energy> inmass,
108
vector<Energy> inwidth,
109
vector<double> inpow,
110
T inme,
int
mode,
111
Energy m1,Energy m2,Energy m3,
112
double
relerr=1e-3)
113
: _channelweights(inweights),_channeltype(intype),_channelmass(inmass),
114
_channelwidth(inwidth),_channelpower(inpow),_theME(inme),_mode(mode),
115
_thechannel(0),_mapping(inweights.size(),0),_souter(
ZERO
),
116
_integrator(1e-35,relerr,1000),_relerr(relerr) {
117
_m.resize(4);
118
_m[1]=m1;_m[2]=m2;_m[3]=m3;
119
_m2.resize(4);
120
for
(
int
ix=1;ix<4;++ix) {
121
_m2[ix]=
sqr
(_m[ix]);
122
}
123
}
124
130
Energy partialWidth(Energy2 q2)
const
;
131
139
void
resetMass
(
int
imass,Energy mass) {
140
assert(imass<4);
141
_m[imass]=mass;
142
_m2[imass]=mass*mass;
143
}
144
151
Energy
getMass
(
const
int
imass)
const
{
152
assert(imass>=0&&imass<4);
153
return
_m[imass];
154
}
155
162
Energy
otherMass
(
const
int
imass)
const
{
163
assert(imass>0&&imass<4);
164
if
(imass==1)
return
_m[2]+_m[3];
165
else
if
(imass==2)
return
_m[1]+_m[3];
166
else
return
_m[1]+_m[2];
167
}
168
174
Energy2 operator ()(Energy2 argument)
const
;
176
typedef
Energy2
ArgType
;
178
typedef
Energy2
ValType
;
179
180
181
protected
:
182
192
void
outerVariables(
double
x, Energy2 & low, Energy2 & upp)
const
;
193
194
private
:
195
199
ThreeBodyAllOnCalculator
& operator=(
const
ThreeBodyAllOnCalculator
&) =
delete
;
200
201
private
:
202
206
vector<double>
_channelweights
;
207
211
vector<int>
_channeltype
;
212
216
vector<Energy>
_channelmass
;
217
221
vector<Energy>
_channelwidth
;
222
226
vector<double>
_channelpower
;
227
231
T
_theME
;
232
236
int
_mode
;
237
241
mutable
int
_thechannel
;
242
246
mutable
vector<int>
_mapping
;
247
251
mutable
Energy2
_souter
;
252
256
mutable
vector<Energy>
_m
;
257
261
mutable
vector<Energy2>
_m2
;
262
266
GSLIntegrator
_integrator
;
267
271
double
_relerr
;
272
};
273
}
274
275
#ifndef ThePEG_TEMPLATES_IN_CC_FILE
276
#include "ThreeBodyAllOnCalculator.tcc"
277
#endif
278
279
#endif
/* HERWIG_ThreeBodyAllOnCalculator_H */
Herwig::ThreeBodyAllOnCalculator::ArgType
Energy2 ArgType
Argument type for the GSLIntegrator.
Definition:
ThreeBodyAllOnCalculator.h:176
Herwig::ThreeBodyAllOnCalculator::Outer::ValType
Energy4 ValType
Return type for the GSLIntegrator.
Definition:
ThreeBodyAllOnCalculator.h:69
Herwig::ThreeBodyAllOnCalculator::Outer::_integrand
Ptr< Herwig::ThreeBodyAllOnCalculator< T > >::const_pointer _integrand
pointer to the decay integrator
Definition:
ThreeBodyAllOnCalculator.h:74
Herwig::ThreeBodyAllOnCalculator::Outer
The class for the outer integrand of the integral of a three body decay matrix element.
Definition:
ThreeBodyAllOnCalculator.h:48
Herwig::WidthCalculatorBase
The WidthCalculatorBase class is a base class to be used by classes which calculate partial widths fo...
Definition:
WidthCalculatorBase.h:29
Herwig::ThreeBodyAllOnCalculator::_relerr
double _relerr
Relative error for the integration.
Definition:
ThreeBodyAllOnCalculator.h:271
Herwig::ThreeBodyAllOnCalculator::Outer::Outer
Outer(typename Ptr< Herwig::ThreeBodyAllOnCalculator< T > >::const_pointer in, double relerr)
Constructor with a pointer to the ThreeBodyAllOnCalculator.
Definition:
ThreeBodyAllOnCalculator.h:53
Herwig::ThreeBodyAllOnCalculator::_m2
vector< Energy2 > _m2
mass squareds of the external particles
Definition:
ThreeBodyAllOnCalculator.h:261
Herwig::ThreeBodyAllOnCalculator::Outer::_integrator
GSLIntegrator _integrator
GSL integration class.
Definition:
ThreeBodyAllOnCalculator.h:79
sqr
constexpr auto sqr(const T &x) -> decltype(x *x)
ThePEG
Herwig::ThreeBodyAllOnCalculator::_mapping
vector< int > _mapping
The mapping currently in used.
Definition:
ThreeBodyAllOnCalculator.h:246
Herwig::ThreeBodyAllOnCalculator::ValType
Energy2 ValType
Return type for the GSLIntegrator.
Definition:
ThreeBodyAllOnCalculator.h:178
Herwig::ThreeBodyAllOnCalculator::_mode
int _mode
The mode.
Definition:
ThreeBodyAllOnCalculator.h:236
Herwig::ThreeBodyAllOnCalculator::_channelweights
vector< double > _channelweights
weights for the different channels
Definition:
ThreeBodyAllOnCalculator.h:206
Herwig::ThreeBodyAllOnCalculator::getMass
Energy getMass(const int imass) const
Get the mass of one of the decay products.
Definition:
ThreeBodyAllOnCalculator.h:151
Herwig::ThreeBodyAllOnCalculator::_m
vector< Energy > _m
masses of the external particles
Definition:
ThreeBodyAllOnCalculator.h:256
Herwig::ThreeBodyAllOnCalculator::_channelmass
vector< Energy > _channelmass
the mass of the resonance for a given channel
Definition:
ThreeBodyAllOnCalculator.h:216
Herwig::ThreeBodyAllOnCalculator::_channelwidth
vector< Energy > _channelwidth
the width of the resonance for a given channel
Definition:
ThreeBodyAllOnCalculator.h:221
Herwig::ThreeBodyAllOnCalculator::ThreeBodyAllOnCalculator
ThreeBodyAllOnCalculator(vector< double > inweights, vector< int > intype, vector< Energy > inmass, vector< Energy > inwidth, vector< double > inpow, T inme, int mode, Energy m1, Energy m2, Energy m3, double relerr=1e-3)
Constructor with all the parameters.
Definition:
ThreeBodyAllOnCalculator.h:105
Herwig::ThreeBodyAllOnCalculator::_channeltype
vector< int > _channeltype
the types for the different channels
Definition:
ThreeBodyAllOnCalculator.h:211
Herwig::ThreeBodyAllOnCalculator::_channelpower
vector< double > _channelpower
the power for power-law smoothing for a given channel
Definition:
ThreeBodyAllOnCalculator.h:226
Herwig
-*- C++ -*-
Definition:
BasicConsistency.h:17
Herwig::ThreeBodyAllOnCalculator::Outer::ArgType
double ArgType
Argument type for the GSLIntegrator.
Definition:
ThreeBodyAllOnCalculator.h:67
Herwig::GSLIntegrator
This class is designed to integrate a given function between 2 limits using the gsl QAGS integration ...
Definition:
GSLIntegrator.h:40
Herwig::ThreeBodyAllOnCalculator::_theME
T _theME
Function giving the matrix element as a function of s12,s13,s23.
Definition:
ThreeBodyAllOnCalculator.h:231
Herwig::ThreeBodyAllOnCalculator::_thechannel
int _thechannel
the channel currently being integrated
Definition:
ThreeBodyAllOnCalculator.h:241
Herwig::ThreeBodyAllOnCalculator::resetMass
void resetMass(int imass, Energy mass)
Get the mass of one of the decay products.
Definition:
ThreeBodyAllOnCalculator.h:139
Herwig::ThreeBodyAllOnCalculator::otherMass
Energy otherMass(const int imass) const
Get the masses of all bar the one specified.
Definition:
ThreeBodyAllOnCalculator.h:162
Herwig::ThreeBodyAllOnCalculator
The ThreeBodyAllOnCalculator class is designed to integrate a three-body matrix element in which all ...
Definition:
ThreeBodyAllOnCalculator.h:22
ZERO
constexpr ZeroUnit ZERO
Herwig::ThreeBodyAllOnCalculator::_integrator
GSLIntegrator _integrator
member to do the integration
Definition:
ThreeBodyAllOnCalculator.h:266
Herwig::ThreeBodyAllOnCalculator::_souter
Energy2 _souter
the value of s for the outer integral
Definition:
ThreeBodyAllOnCalculator.h:251
Generated on Sat Apr 11 2020 14:50:32 for Herwig by
1.8.13