herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
TwoOffShellCalculator.h
1// -*- C++ -*-
2//
3// TwoOffShellCalculator.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_TwoOffShellCalculator_H
10#define HERWIG_TwoOffShellCalculator_H
11//
12// This is the declaration of the TwoOffShellCalculator class.
13//
14#include "WidthCalculatorBase.h"
15#include "GenericMassGenerator.h"
16#include "TwoOffShellCalculator.fh"
17#include "OneOffShellCalculator.fh"
18#include "Herwig/Utilities/GSLIntegrator.h"
19
20namespace Herwig {
21using namespace ThePEG;
22
23struct TwoOffShellIntegrand;
24
34
40
41public:
42
53 TwoOffShellCalculator(int inloc, WidthCalculatorBasePtr inwidth,
54 GenericMassGeneratorPtr inmass,
55 Energy inmin2,Energy inmin1)
56 : _themass(inloc),_minmass(inmin2),_mother(inmin1),_oneoffwidth(inwidth),
57 _massptr(inmass)
58 {}
59
65 Energy partialWidth(Energy2 scale) const;
66
74 void resetMass(int imass,Energy mass) {
75 _oneoffwidth->resetMass(imass,mass);
76 }
77
84 Energy getMass(const int imass) const {
85 return _oneoffwidth->getMass(imass);
86 }
87
94 Energy otherMass(const int imass) const {
95 return _oneoffwidth->otherMass(imass);
96 }
97
98protected:
99
105 Energy dGamma(Energy mass) const {
106 _oneoffwidth->resetMass(_themass,mass);
107 Energy wgt = (_oneoffwidth->partialWidth(_scale));
108 wgt*=(_massptr->weight(mass));
109 return wgt;
110 }
111
112private:
113
118
119private:
120
129 Energy _minmass;
130
134 Energy _mother;
135
139 WidthCalculatorBasePtr _oneoffwidth;
140
144 GenericMassGeneratorPtr _massptr;
145
150
154 mutable Energy2 _scale;
155
156};
157
158
174 TwoOffShellIntegrand(tcTwoOffShellCalculatorPtr in,Energy2 m2,Energy2 mw)
175 : _integrand(in),_mass2(m2),_mwidth(mw)
176 {}
177
181 Energy operator ()(double x) const {
182 return _integrand->dGamma(sqrt(_mass2+_mwidth*tan(x)));
183 }
185 typedef double ArgType;
187 typedef Energy ValType;
188
189private:
190
194 cTwoOffShellCalculatorPtr _integrand;
195
199 Energy2 _mass2;
200
204 Energy2 _mwidth;
205};
206}
207
208#endif /* HERWIG_TwoOffShellCalculator_H */
This class is designed to integrate a given function between 2 limits using the gsl QAGS integration ...
Definition: GSLIntegrator.h:40
Use WidthCalculatorBase objects to integrate over the mass of two external particles which can be off...
Energy dGamma(Energy mass) const
The integrand.
Energy otherMass(const int imass) const
Get the masses of all bar the one specified.
TwoOffShellCalculator(int inloc, WidthCalculatorBasePtr inwidth, GenericMassGeneratorPtr inmass, Energy inmin2, Energy inmin1)
Constructor which should be used setting all the required members.
GSLIntegrator _integrator
integrator
WidthCalculatorBasePtr _oneoffwidth
pointer to object calculating the width for one-off shell particle.
Energy _mother
sum of the masses of the other decay products
Energy getMass(const int imass) const
Get the mass of one of the decay products.
TwoOffShellCalculator & operator=(const TwoOffShellCalculator &)=delete
Private and non-existent assignment operator.
Energy2 _scale
the mass squared of the decaying particle
Energy partialWidth(Energy2 scale) const
member to calculate the partial width.
int _themass
The second mass which is offshell.
Energy _minmass
the minimum allowed mass
GenericMassGeneratorPtr _massptr
pointer to object calculating the mass of the particle
void resetMass(int imass, Energy mass)
Get the mass of one of the decay products.
The WidthCalculatorBase class is a base class to be used by classes which calculate partial widths fo...
-*- C++ -*-
double sqrt(int x)
Class for the integrand of a matrix element where two of the outgoing particles is off-shell.
TwoOffShellIntegrand(tcTwoOffShellCalculatorPtr in, Energy2 m2, Energy2 mw)
Constructor.
Energy operator()(double x) const
Retreive function value.
Energy ValType
Return type for the GSLIntegrator.
double ArgType
Argument type for the GSLIntegrator.
cTwoOffShellCalculatorPtr _integrand
pointer to the decay integrator
Energy2 _mwidth
The mass times width for the off-shell particle for the Jacobian transform.
Energy2 _mass2
The mass squared for the off-shell particle for the Jacobian transform.