thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
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 
17 namespace ThePEG {
18 
32 class ME2to2Base: public MEBase {
33 
34 public:
35 
43  theLastPhi(0.0) {}
44 
48  virtual ~ME2to2Base();
50 
51 public:
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 
102 public:
103 
109  Energy2 tHat() const { return theLastTHat; }
110 
114  Energy2 uHat() const { return theLastUHat; }
115 
119  double phi() const { return theLastPhi; }
121 
122 public:
123 
130  void persistentOutput(PersistentOStream & os) const;
131 
137  void persistentInput(PersistentIStream & is, int version);
139 
143  static void Init();
144 
145 protected:
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 
165 protected:
166 
172 
173 private:
174 
179 
184 
189 
193  double theLastPhi;
194 
195 
196 private:
197 
202 
206  ME2to2Base & operator=(const ME2to2Base &) = delete;
207 
208 };
209 
210 }
211 
212 
213 namespace ThePEG {
214 
221 template <>
222 struct BaseClassTrait<ME2to2Base,1>: public ClassTraitsType {
224  typedef MEBase NthBase;
225 };
226 
231 template <>
232 struct ClassTraits<ME2to2Base>: public ClassTraitsBase<ME2to2Base> {
234  static string className() { return "ThePEG::ME2to2Base"; }
235 };
236 
239 }
240 
241 #endif /* ThePEG_ME2to2Base_H */
double theLastPhi
The azimuth angle of the last set phase space point.
Definition: ME2to2Base.h:193
PersistentIStream is used to read persistent objects from a stream where they were previously written...
virtual double getCosTheta(double cthmin, double cthmax, const double *r)
Used internally by generateKinematics, after calculating the limits on cos(theta).
ME2to2Base & operator=(const ME2to2Base &)=delete
Private and non-existent assignment operator.
virtual Energy2 scale() const
Return the scale associated with the last set phase space point.
virtual void setKinematics()
Set the typed and momenta of the incoming and outgoing partons to be used in subsequent calls to me()...
The Switch class and its base class SwitchBase defines an interface to a class derived from the Inter...
Definition: Switch.h:273
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
virtual CrossSection dSigHatDR() const
Return the matrix element for the kinematical configuation previously provided by the last call to se...
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data...
double phi() const
Return the azimuth angle of the last set phase space point.
Definition: ME2to2Base.h:119
void phi(double phi)
Set the azimuth angle of the last set phase space point.
Definition: ME2to2Base.h:162
virtual int nDim() const
The number of internal degreed of freedom used in the matrix element.
Definition: ME2to2Base.h:59
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
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.
virtual ~ME2to2Base()
Destructor.
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
void uHat(Energy2 e2)
Set the of the last set phase space point.
Definition: ME2to2Base.h:157
Energy2 uHat() const
Return the of the last set phase space point.
Definition: ME2to2Base.h:114
void tHat(Energy2 e2)
Set the of the last set phase space point.
Definition: ME2to2Base.h:152
ME2to2Base()
Default constructor.
Definition: ME2to2Base.h:41
int theScaleChoice
The option indicating how to calculate the scale of an interaction.
Definition: ME2to2Base.h:178
virtual bool generateKinematics(const double *r)
Generate internal degrees of freedom given &#39;nDim()&#39; uniform random numbers in the interval ]0...
Energy2 tHat() const
Return the of the last set phase space point.
Definition: ME2to2Base.h:109
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
The MEBase class is the base class of all objects representing hard matrix elements in ThePEG...
Definition: MEBase.h:72
static AbstractClassDescription< ME2to2Base > initME2to2Base
Describe an abstract base class with persistent data.
Definition: ME2to2Base.h:201
ME2to2Base can be used as a base class for any matrix element class implementing 2 2 processes...
Definition: ME2to2Base.h:32
Energy2 theLastTHat
The of the last set phase space point.
Definition: ME2to2Base.h:183
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
constexpr ZeroUnit ZERO
ZERO can be used as zero for any unitful quantity.
Definition: PhysicalQty.h:35
static Switch< ME2to2Base, int > & interfaceScaleChoice()
Access to the acutal Switch object used to determine the choice of scale.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52
Energy2 theLastUHat
The of the last set phase space point.
Definition: ME2to2Base.h:188