thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
ME2to2Base.h
1// -*- C++ -*-
2//
3// ME2to2Base.h is a part of ThePEG - Toolkit for HEP Event Generation
4// Copyright (C) 1999-2019 Leif Lonnblad
5//
6// ThePEG 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 ThePEG_ME2to2Base_H
10#define ThePEG_ME2to2Base_H
11// This is the declaration of the ME2to2Base class.
12
13#include "ThePEG/MatrixElement/MEBase.h"
14#include "ThePEG/MatrixElement/Tree2toNDiagram.h"
15#include "ThePEG/Interface/Switch.fh"
16
17namespace ThePEG {
18
32class ME2to2Base: public MEBase {
33
34public:
35
43 theLastPhi(0.0) {}
44
48 virtual ~ME2to2Base();
50
51public:
52
59 virtual int nDim() const { return 1; }
60
68 virtual bool generateKinematics(const double * r);
69
75 virtual CrossSection dSigHatDR() const;
76
80 virtual Energy2 scale() const;
81
87 virtual void setKinematics();
89
94 virtual double getCosTheta(double cthmin, double cthmax, const double * r);
95
100 int scaleChoice() const { return theScaleChoice; }
101
102public:
103
109 Energy2 tHat() const { return theLastTHat; }
110
114 Energy2 uHat() const { return theLastUHat; }
115
119 double phi() const { return theLastPhi; }
121
122public:
123
131
137 void persistentInput(PersistentIStream & is, int version);
139
143 static void Init();
144
145protected:
146
152 void tHat(Energy2 e2) { theLastTHat = e2; }
153
157 void uHat(Energy2 e2) { theLastUHat = e2; }
158
162 void phi(double phi) { theLastPhi = phi; }
164
165protected:
166
172
173private:
174
179
184
189
194
195
196private:
197
202
206 ME2to2Base & operator=(const ME2to2Base &) = delete;
207
208};
209
210}
211
212
213namespace ThePEG {
214
221template <>
222struct BaseClassTrait<ME2to2Base,1>: public ClassTraitsType {
224 typedef MEBase NthBase;
225};
226
231template <>
232struct ClassTraits<ME2to2Base>: public ClassTraitsBase<ME2to2Base> {
234 static string className() { return "ThePEG::ME2to2Base"; }
235};
236
239}
240
241#endif /* ThePEG_ME2to2Base_H */
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data.
ME2to2Base can be used as a base class for any matrix element class implementing 2 2 processes.
Definition: ME2to2Base.h:32
static Switch< ME2to2Base, int > & interfaceScaleChoice()
Access to the acutal Switch object used to determine the choice of scale.
Energy2 theLastTHat
The of the last set phase space point.
Definition: ME2to2Base.h:183
virtual void setKinematics()
Set the typed and momenta of the incoming and outgoing partons to be used in subsequent calls to me()...
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Energy2 tHat() const
Return the of the last set phase space point.
Definition: ME2to2Base.h:109
virtual ~ME2to2Base()
Destructor.
virtual bool generateKinematics(const double *r)
Generate internal degrees of freedom given 'nDim()' uniform random numbers in the interval ]0,...
virtual double getCosTheta(double cthmin, double cthmax, const double *r)
Used internally by generateKinematics, after calculating the limits on cos(theta).
virtual CrossSection dSigHatDR() const
Return the matrix element for the kinematical configuation previously provided by the last call to se...
Energy2 uHat() const
Return the of the last set phase space point.
Definition: ME2to2Base.h:114
void phi(double phi)
Set the azimuth angle of the last set phase space point.
Definition: ME2to2Base.h:162
double phi() const
Return the azimuth angle of the last set phase space point.
Definition: ME2to2Base.h:119
int scaleChoice() const
Give the option corresponding to the way the scale of an interaction is calculated.
Definition: ME2to2Base.h:100
static void Init()
Standard Init function used to initialize the interfaces.
int theScaleChoice
The option indicating how to calculate the scale of an interaction.
Definition: ME2to2Base.h:178
virtual Energy2 scale() const
Return the scale associated with the last set phase space point.
void uHat(Energy2 e2)
Set the of the last set phase space point.
Definition: ME2to2Base.h:157
void tHat(Energy2 e2)
Set the of the last set phase space point.
Definition: ME2to2Base.h:152
Energy2 theLastUHat
The of the last set phase space point.
Definition: ME2to2Base.h:188
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
double theLastPhi
The azimuth angle of the last set phase space point.
Definition: ME2to2Base.h:193
ME2to2Base()
Default constructor.
Definition: ME2to2Base.h:41
ME2to2Base & operator=(const ME2to2Base &)=delete
Private and non-existent assignment operator.
virtual int nDim() const
The number of internal degreed of freedom used in the matrix element.
Definition: ME2to2Base.h:59
static AbstractClassDescription< ME2to2Base > initME2to2Base
Describe an abstract base class with persistent data.
Definition: ME2to2Base.h:201
The MEBase class is the base class of all objects representing hard matrix elements in ThePEG.
Definition: MEBase.h:72
PersistentIStream is used to read persistent objects from a stream where they were previously written...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
The Switch class and its base class SwitchBase defines an interface to a class derived from the Inter...
Definition: Switch.h:273
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
constexpr ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition: PhysicalQty.h:35
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition: ClassTraits.h:161
static string className()
Return the name of class T.
Definition: ClassTraits.h:66