1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
|
// -*- C++ -*-
//
// TwoOffShellCalculator.h is a part of Herwig++ - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2011 The Herwig Collaboration
//
// Herwig++ is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef HERWIG_TwoOffShellCalculator_H
#define HERWIG_TwoOffShellCalculator_H
//
// This is the declaration of the TwoOffShellCalculator class.
//
#include "WidthCalculatorBase.h"
#include "GenericMassGenerator.h"
#include "TwoOffShellCalculator.fh"
#include "OneOffShellCalculator.fh"
#include "Herwig++/Utilities/GSLIntegrator.h"
namespace Herwig {
using namespace ThePEG;
struct TwoOffShellIntegrand;
/** \ingroup PDT
*
* Use <code>WidthCalculatorBase</code> objects to integrate over the mass of two
* external particles which can be off-shell for running width calculations.
*
* @see WidthCalculatorBase
* @see TwoOffShellIntegrand
*/
class TwoOffShellCalculator: public WidthCalculatorBase {
/**
* The TwoOffShellIntegrand class is a friend to allow access to the private
* members for the integration.
*/
friend struct TwoOffShellIntegrand;
public:
/**
* Constructor which should be used setting all the required members.
* @param inloc The mass which is off-shell and to be integrated over.
* @param inwidth Pointer to the WidthGeneratorBase object which calculates
* the partial width for a given mass of the off-shell particle. This
* should be a OneOffShellCalculator instance.
* @param inmass Pointer to the GenericMassGenerator for the off-shell particle.
* @param inmin1 The minimum mass for the first off-shell particle.
* @param inmin2 The minimum mass for the second off-shell particle.
*/
TwoOffShellCalculator(int inloc, WidthCalculatorBasePtr inwidth,
GenericMassGeneratorPtr inmass,
Energy inmin2,Energy inmin1)
: _themass(inloc),_minmass(inmin2),_mother(inmin1),_oneoffwidth(inwidth),
_massptr(inmass)
{}
/**
* member to calculate the partial width.
* @param scale The mass squared for the decaying particle.
* @return The partial width.
*/
Energy partialWidth(Energy2 scale) const;
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @param mass The new value.
* @return The mass required.
*/
void resetMass(int imass,Energy mass) {
_oneoffwidth->resetMass(imass,mass);
}
/**
* Get the mass of one of the decay products. This must be
* implemented in classes inheriting from this one.
* @param imass The mass required.
* @return The mass required.
*/
Energy getMass(const int imass) const {
return _oneoffwidth->getMass(imass);
}
/**
* Get the masses of all bar the one specified. Used to get the limits
* for integration.
* @param imass The particle not needed
* @return The sum of the other masses.
*/
Energy otherMass(const int imass) const {
return _oneoffwidth->otherMass(imass);
}
protected:
/**
* The integrand.
* @param mass The mass of the second off-shell particle,
* @return The differential rate.
*/
Energy dGamma(Energy mass) const {
_oneoffwidth->resetMass(_themass,mass);
Energy wgt = (_oneoffwidth->partialWidth(_scale));
wgt*=(_massptr->weight(mass));
return wgt;
}
private:
/**
* Private and non-existent assignment operator.
*/
TwoOffShellCalculator & operator=(const TwoOffShellCalculator &);
private:
/**
* The second mass which is offshell
*/
int _themass;
/**
* the minimum allowed mass
*/
Energy _minmass;
/**
* sum of the masses of the other decay products
*/
Energy _mother;
/**
* pointer to object calculating the width for one-off shell particle.
*/
WidthCalculatorBasePtr _oneoffwidth;
/**
* pointer to object calculating the mass of the particle
*/
GenericMassGeneratorPtr _massptr;
/**
* integrator
*/
GSLIntegrator _integrator;
/**
* the mass squared of the decaying particle
*/
mutable Energy2 _scale;
};
/** \ingroup PDT
* Class for the integrand of a matrix element where two of the outgoing
* particles is off-shell. This class is used by the TwoOffShellCalculator class
* to perform the integral.
*/
struct TwoOffShellIntegrand {
/**
* Constructor.
* @param in Pointer to the OneOffShellCalculator class this is doing the
* integration for.
* @param m2 The mass squared of the off-shell particle for the Jacobian
* transform.
* @param mw The mass times width of the off-shell particle for the Jacobian
* transform.
*/
TwoOffShellIntegrand(tcTwoOffShellCalculatorPtr in,Energy2 m2,Energy2 mw)
: _integrand(in),_mass2(m2),_mwidth(mw)
{}
/**
* Retreive function value
*/
Energy operator ()(double x) const {
return _integrand->dGamma(sqrt(_mass2+_mwidth*tan(x)));
}
/** Argument type for the GSLIntegrator */
typedef double ArgType;
/** Return type for the GSLIntegrator */
typedef Energy ValType;
private:
/**
* pointer to the decay integrator
*/
cTwoOffShellCalculatorPtr _integrand;
/**
* The mass squared for the off-shell particle for the Jacobian transform.
*/
Energy2 _mass2;
/**
* The mass times width for the off-shell particle for the Jacobian transform.
*/
Energy2 _mwidth;
};
}
#endif /* HERWIG_TwoOffShellCalculator_H */
|