herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
OneOffShellCalculator.h
1// -*- C++ -*-
2//
3// OneOffShellCalculator.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_OneOffShellCalculator_H
10#define HERWIG_OneOffShellCalculator_H
11//
12// This is the declaration of the OneOffShellCalculator class.
13//
14#include "GenericMassGenerator.h"
15#include "WidthCalculatorBase.h"
16#include "OneOffShellCalculator.fh"
17#include "Herwig/Utilities/GSLIntegrator.h"
18
19
20namespace Herwig {
21using namespace ThePEG;
22
23struct OneOffShellIntegrand;
24
36
37public:
38
43 friend struct OneOffShellIntegrand;
44
45public:
46
55 OneOffShellCalculator(int inloc,WidthCalculatorBasePtr inwidth,
56 GenericMassGeneratorPtr inmass,
57 Energy inmin)
58 : _themass(inloc), _minmass(inmin),_onshellwidth(inwidth),_massptr(inmass)
59 {}
60
66 Energy partialWidth(Energy2 scale) const;
67
75 void resetMass(int imass,Energy mass) {
76 _onshellwidth->resetMass(imass,mass);
77 }
78
85 Energy getMass(const int imass) const {
86 return _onshellwidth->getMass(imass);
87 }
88
95 Energy otherMass(const int imass) const {
96 return _onshellwidth->otherMass(imass);
97 }
98
99protected:
100
106 Energy dGamma(Energy min) const {
107 _onshellwidth->resetMass(_themass,min);
108 Energy wgt = (_onshellwidth->partialWidth(_scale));
109 wgt*=(_massptr->weight(min));
110 return wgt;
111 }
112
113private:
114
119
120private:
121
126
130 Energy _minmass;
131
135 WidthCalculatorBasePtr _onshellwidth;
136
140 GenericMassGeneratorPtr _massptr;
141
146
150 mutable Energy2 _scale;
151
152};
153
154
163
173 OneOffShellIntegrand(tcOneOffShellCalculatorPtr in,Energy2 m2,Energy2 mw)
174 : _integrand(in),_mass2(m2),_mwidth(mw)
175 {}
176
180 Energy operator ()(double x) const {
181 return _integrand->dGamma(sqrt(_mass2+_mwidth*tan(x)));
182 }
184 typedef double ArgType;
186 typedef Energy ValType;
187
191 tcOneOffShellCalculatorPtr _integrand;
192
196 Energy2 _mass2;
197
201 Energy2 _mwidth;
202};
203}
204
205#endif /* HERWIG_OneOffShellCalculator_H */
This class is designed to integrate a given function between 2 limits using the gsl QAGS integration ...
Definition: GSLIntegrator.h:40
Use another WidthCalculatorBase object to integrate over the mass of on of the external particles whi...
Energy dGamma(Energy min) const
The integrand.
OneOffShellCalculator & operator=(const OneOffShellCalculator &)=delete
Private and non-existent assignment operator.
Energy getMass(const int imass) const
Get the mass of one of the decay products.
int _themass
which mass is offshell.
Energy _minmass
the minimum allowed mass.
GSLIntegrator _integrator
integrator
Energy partialWidth(Energy2 scale) const
member to calculate the partial width.
Energy otherMass(const int imass) const
Get the masses of all bar the one specified.
OneOffShellCalculator(int inloc, WidthCalculatorBasePtr inwidth, GenericMassGeneratorPtr inmass, Energy inmin)
Constructor which should be used setting all the required members.
GenericMassGeneratorPtr _massptr
pointer to object calculating the mass of the particle.
WidthCalculatorBasePtr _onshellwidth
pointer to object calculating the on-shell width.
void resetMass(int imass, Energy mass)
Get the mass of one of the decay products.
Energy2 _scale
the mass squared of the decaying particle
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 one of the outgoing particles is off-shell....
tcOneOffShellCalculatorPtr _integrand
pointer to the decay integrator
Energy operator()(double x) const
return the value
Energy2 _mwidth
The mass times width for the off-shell particle for the Jacobian transform.
double ArgType
Argument type for the GSLIntegrator.
Energy2 _mass2
The mass squared for the off-shell particle for the Jacobian transform.
Energy ValType
Return type for the GSLIntegrator.
OneOffShellIntegrand(tcOneOffShellCalculatorPtr in, Energy2 m2, Energy2 mw)
Constructor.