thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
LuminosityFunction.h
1 // -*- C++ -*-
2 //
3 // LuminosityFunction.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_LuminosityFunction_H
10 #define ThePEG_LuminosityFunction_H
11 // This is the declaration of the LuminosityFunction class.
12 
13 #include "ThePEG/Handlers/HandlerBase.h"
14 #include "ThePEG/Handlers/LastXCombInfo.h"
15 #include "ThePEG/Vectors/LorentzRotation.fh"
16 #include "ThePEG/Utilities/Interval.h"
17 
18 namespace ThePEG {
19 
39 class LuminosityFunction: public HandlerBase, public LastXCombInfo<> {
40 
42  friend class EventHandler;
43 
44 public:
45 
52  LuminosityFunction(Energy a = 45.6*GeV, Energy b = 45.6*GeV);
54 
61  virtual bool canHandle(const cPDPair &) const;
62 
66  virtual Energy maximumCMEnergy() const;
67 
73  virtual LorentzRotation getBoost() const;
74 
80  virtual double Y() const;
81 
87  virtual int nDim(const cPDPair &) const;
88 
94  virtual double value(const cPDPair &, double l1, double l2) const;
95 
103  virtual pair<double,double>
104  generateLL(const double * r, double & jacobian) const;
106 
107 public:
108 
114  Energy beamEMaxA() const { return theBeamEMaxA; }
115 
119  Energy beamEMaxB() const { return theBeamEMaxB; }
121 
122 protected:
123 
127  void beamEMaxA(Energy x) { theBeamEMaxA = x; }
128 
132  void beamEMaxB(Energy x) { theBeamEMaxB = x; }
133 
134 public:
135 
142  void persistentOutput(PersistentOStream & os) const;
143 
149  void persistentInput(PersistentIStream & is, int version);
151 
155  static void Init();
156 
160  void select(tXCombPtr);
161 
162 protected:
163 
170  virtual IBPtr clone() const;
171 
176  virtual IBPtr fullclone() const;
178 
179 private:
180 
185 
190 
191 private:
192 
197 
201  LuminosityFunction & operator=(const LuminosityFunction &) = delete;
202 
203 };
204 
211 template <>
214  typedef HandlerBase NthBase;
215 };
216 
221 template <>
222 struct ClassTraits<LuminosityFunction>:
223  public ClassTraitsBase<LuminosityFunction> {
225  static string className() { return "ThePEG::LuminosityFunction"; }
226 };
227 
230 }
231 
232 #endif /* ThePEG_LuminosityFunction_H */
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Energy beamEMaxA() const
The maximum energy of the beam entering along the positive z-axis.
virtual LorentzRotation getBoost() const
Return the rotation needed to transform from the collision cm system to the labotatory system...
virtual pair< double, double > generateLL(const double *r, double &jacobian) const
Generate energy fractions l1 and l2 ( ) given &#39;nDim()&#39; random numbers in the range ]0...
virtual bool canHandle(const cPDPair &) const
Return true if this luminosity function can actually handle a given pair of incoming particles...
The EventHandler is the base class used to implement event handlers in ThePEG.
Definition: EventHandler.h:63
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ClassTraitsType is an empty, non-polymorphic, base class.
Definition: ClassTraits.h:30
The LuminosityFunction describes the momentum distribution of the incoming beams in an experiment...
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
LastXCombInfo is a templated class giving easy access to the information in an XComb object...
Definition: LastXCombInfo.h:32
void select(tXCombPtr)
Set information about the selected XComb.
The LorentzRotation class combine a SpinOneLorentzRotation and a spin SpinHalfLorentzRotation to prov...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Definition: RCPtr.h:519
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
virtual Energy maximumCMEnergy() const
Return the maximum possible center of mass energy for an event.
static ClassDescription< LuminosityFunction > initLuminosityFunction
Describe an abstract class with persistent data.
virtual double value(const cPDPair &, double l1, double l2) const
The value of the luminosity function for the given particle types for the given energy fractions l1 a...
double jacobian() const
Get the last jacobian obtained when generating the kinematics for the call to dSigHatDR.
static void Init()
Standard Init function used to initialize the interface.
LuminosityFunction & operator=(const LuminosityFunction &)=delete
Private and non-existent assignment operator.
RCPtr is a reference counted (smart) pointer.
Definition: RCPtr.h:60
Energy theBeamEMaxB
The maximum energy of the beam entering along the negative z-axis.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
HandlerBase is an abstract base class derived from the Interfaced class via the HandlerBaseT class ad...
Definition: HandlerBase.h:151
virtual double Y() const
Return the rapidity of the colliding particles (at the maximum energy) in the laboratory system...
void beamEMaxB(Energy x)
The maximum energy of the beam entering along the negative z-axis.
The default concrete implementation of ClassTraitsBase.
Definition: ClassTraits.h:134
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
void beamEMaxA(Energy x)
The maximum energy of the beam entering along the positive z-axis.
pair< cPDPtr, cPDPtr > cPDPair
A pair of pointers to const ParticleData objects.
Definition: Containers.h:118
LuminosityFunction(Energy a=45.6 *GeV, Energy b=45.6 *GeV)
Default constructor.
Energy theBeamEMaxA
The maximum energy of the beam entering along the positive z-axis.
Energy beamEMaxB() const
The maximum energy of the beam entering along the negative z-axis.
virtual IBPtr clone() const
Make a simple clone of this object.
virtual int nDim(const cPDPair &) const
How many random numbers are needed to generate a phase space point? Default is zero in which means th...
BaseClassTraits describes the base classes of the templated class.
Definition: ClassTraits.h:156
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...
Definition: ClassTraits.h:52