|
|
|||
File indexing completed on 2026-08-06 09:38:22
0001 // -*- C++ -*- 0002 // 0003 // LuminosityFunction.h is a part of ThePEG - Toolkit for HEP Event Generation 0004 // Copyright (C) 1999-2019 Leif Lonnblad 0005 // 0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details. 0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 0008 // 0009 #ifndef ThePEG_LuminosityFunction_H 0010 #define ThePEG_LuminosityFunction_H 0011 // This is the declaration of the LuminosityFunction class. 0012 0013 #include "ThePEG/Handlers/HandlerBase.h" 0014 #include "ThePEG/Handlers/LastXCombInfo.h" 0015 #include "ThePEG/Vectors/LorentzRotation.fh" 0016 #include "ThePEG/Utilities/Interval.h" 0017 0018 namespace ThePEG { 0019 0020 /** 0021 * The LuminosityFunction describes the momentum distribution of the 0022 * incoming beams in an experiment. This is used by a EventHandler to 0023 * generate collisions in their CM system. The LuminosityFunction will 0024 * be asked to produce a LorentzRotation giving the transformation to 0025 * the laboratory system. 0026 * 0027 * The LuminosityFunction inherits from the LastXCombInfo class to 0028 * give easy access to the information of the generated primary 0029 * sub-process in the selected XComb. 0030 * 0031 * This base class implements simple fixed momentum beams with 0032 * energies given by the BeamEMaxA and BeamEMaxB interfaces. 0033 * 0034 * @see \ref LuminosityFunctionInterfaces "The interfaces" 0035 * defined for LuminosityFunction. 0036 * @see XComb 0037 * 0038 */ 0039 class LuminosityFunction: public HandlerBase, public LastXCombInfo<> { 0040 0041 /** EventHandler is a friend. */ 0042 friend class EventHandler; 0043 0044 public: 0045 0046 /** @name Standard constructors and destructors. */ 0047 //@{ 0048 /** 0049 * Default constructor. Optionally the maximum energy of beam \a a 0050 * and \a b can be given. 0051 */ 0052 LuminosityFunction(Energy a = 45.6*GeV, Energy b = 45.6*GeV); 0053 //@} 0054 0055 /** @name Virtual functions to be overridden by sub-classes. */ 0056 //@{ 0057 /** 0058 * Return true if this luminosity function can actually handle a 0059 * given pair of incoming particles. 0060 */ 0061 virtual bool canHandle(const cPDPair &) const; 0062 0063 /** 0064 * Return the maximum possible center of mass energy for an event. 0065 */ 0066 virtual Energy maximumCMEnergy() const; 0067 0068 /** 0069 * Return the rotation needed to transform from the collision cm 0070 * system to the labotatory system. This default version returns the 0071 * unit transformation. 0072 */ 0073 virtual LorentzRotation getBoost() const; 0074 0075 /** 0076 * Return the rapidity of the colliding particles (at the maximum 0077 * energy) in the laboratory system. This default version assumes 0078 * the CM system is the same as the lab system and returns zero. 0079 */ 0080 virtual double Y() const; 0081 0082 /** 0083 * How many random numbers are needed to generate a phase space 0084 * point? Default is zero in which means the energy of the incoming 0085 * particles is fixed. The only other reasonable values are 1 and 2. 0086 */ 0087 virtual int nDim(const cPDPair &) const; 0088 0089 /** 0090 * The value of the luminosity function for the given particle types 0091 * for the given energy fractions l1 and l2 (\f$l=\log(1/x)\f$). The 0092 * default version returns 1 if l1 and l2 are zero otherwize zero. 0093 */ 0094 virtual double value(const cPDPair &, double l1, double l2) const; 0095 0096 /** 0097 * Generate energy fractions l1 and l2 (\f$l=\log(1/x)\f$) given 0098 * 'nDim()' random numbers in the range ]0,1[ given by the 0099 * iterators. The jacobian argument must be multiplied by the 0100 * jacobian of the variable transformation to l1 and l2. The default 0101 * version is just a delta function with a jacobian of 1. 0102 */ 0103 virtual pair<double,double> 0104 generateLL(const double * r, double & jacobian) const; 0105 //@} 0106 0107 public: 0108 0109 /** @name Simple access functions */ 0110 //@{ 0111 /** 0112 * The maximum energy of the beam entering along the positive z-axis. 0113 */ 0114 Energy beamEMaxA() const { return theBeamEMaxA; } 0115 0116 /** 0117 * The maximum energy of the beam entering along the negative z-axis. 0118 */ 0119 Energy beamEMaxB() const { return theBeamEMaxB; } 0120 //@} 0121 0122 protected: 0123 0124 /** 0125 * The maximum energy of the beam entering along the positive z-axis. 0126 */ 0127 void beamEMaxA(Energy x) { theBeamEMaxA = x; } 0128 0129 /** 0130 * The maximum energy of the beam entering along the negative z-axis. 0131 */ 0132 void beamEMaxB(Energy x) { theBeamEMaxB = x; } 0133 0134 public: 0135 0136 /** @name Functions used by the persistent I/O system. */ 0137 //@{ 0138 /** 0139 * Function used to write out object persistently. 0140 * @param os the persistent output stream written to. 0141 */ 0142 void persistentOutput(PersistentOStream & os) const; 0143 0144 /** 0145 * Function used to read in object persistently. 0146 * @param is the persistent input stream read from. 0147 * @param version the version number of the object when written. 0148 */ 0149 void persistentInput(PersistentIStream & is, int version); 0150 //@} 0151 0152 /** 0153 * Standard Init function used to initialize the interface. 0154 */ 0155 static void Init(); 0156 0157 /** 0158 * Set information about the selected XComb. 0159 */ 0160 void select(tXCombPtr); 0161 0162 protected: 0163 0164 /** @name Clone Methods. */ 0165 //@{ 0166 /** 0167 * Make a simple clone of this object. 0168 * @return a pointer to the new object. 0169 */ 0170 virtual IBPtr clone() const; 0171 0172 /** Make a clone of this object, possibly modifying the cloned object 0173 * to make it sane. 0174 * @return a pointer to the new object. 0175 */ 0176 virtual IBPtr fullclone() const; 0177 //@} 0178 0179 private: 0180 0181 /** 0182 * The maximum energy of the beam entering along the positive z-axis. 0183 */ 0184 Energy theBeamEMaxA; 0185 0186 /** 0187 * The maximum energy of the beam entering along the negative z-axis. 0188 */ 0189 Energy theBeamEMaxB; 0190 0191 private: 0192 0193 /** 0194 * Describe an abstract class with persistent data. 0195 */ 0196 static ClassDescription<LuminosityFunction> initLuminosityFunction; 0197 0198 /** 0199 * Private and non-existent assignment operator. 0200 */ 0201 LuminosityFunction & operator=(const LuminosityFunction &) = delete; 0202 0203 }; 0204 0205 /** @cond TRAITSPECIALIZATIONS */ 0206 0207 /** 0208 * This template specialization informs ThePEG about the 0209 * base class of LuminosityFunction. 0210 */ 0211 template <> 0212 struct BaseClassTrait<LuminosityFunction,1>: public ClassTraitsType { 0213 /** Typedef of the base class of LuminosityFunction. */ 0214 typedef HandlerBase NthBase; 0215 }; 0216 0217 /** 0218 * This template specialization informs ThePEG about the name of the 0219 * LuminosityFunction class. 0220 */ 0221 template <> 0222 struct ClassTraits<LuminosityFunction>: 0223 public ClassTraitsBase<LuminosityFunction> { 0224 /** Return the class name. */ 0225 static string className() { return "ThePEG::LuminosityFunction"; } 0226 }; 0227 0228 /** @endcond */ 0229 0230 } 0231 0232 #endif /* ThePEG_LuminosityFunction_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|