00001 // -*- C++ -*- 00002 // 00003 // LuminosityFunction.h is a part of ThePEG - Toolkit for HEP Event Generation 00004 // Copyright (C) 1999-2007 Leif Lonnblad 00005 // 00006 // ThePEG is licenced under version 2 of the GPL, see COPYING for details. 00007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 00008 // 00009 #ifndef ThePEG_LuminosityFunction_H 00010 #define ThePEG_LuminosityFunction_H 00011 // This is the declaration of the LuminosityFunction class. 00012 00013 #include "ThePEG/Handlers/HandlerBase.h" 00014 #include "ThePEG/Handlers/LastXCombInfo.h" 00015 #include "ThePEG/Vectors/LorentzRotation.fh" 00016 #include "ThePEG/Utilities/Interval.h" 00017 00018 namespace ThePEG { 00019 00039 class LuminosityFunction: public HandlerBase, public LastXCombInfo<> { 00040 00042 friend class EventHandler; 00043 00044 public: 00045 00052 LuminosityFunction(Energy a = 45.6*GeV, Energy b = 45.6*GeV); 00054 00061 virtual bool canHandle(const cPDPair &) const; 00062 00066 virtual Energy maximumCMEnergy() const; 00067 00073 virtual LorentzRotation getBoost() const; 00074 00080 virtual double Y() const; 00081 00087 virtual int nDim(const cPDPair &) const; 00088 00094 virtual double value(const cPDPair &, double l1, double l2) const; 00095 00103 virtual pair<double,double> 00104 generateLL(const double * r, double & jacobian) const; 00106 00107 public: 00108 00114 Energy beamEMaxA() const { return theBeamEMaxA; } 00115 00119 Energy beamEMaxB() const { return theBeamEMaxB; } 00121 00122 protected: 00123 00127 void beamEMaxA(Energy x) { theBeamEMaxA = x; } 00128 00132 void beamEMaxB(Energy x) { theBeamEMaxB = x; } 00133 00134 public: 00135 00142 void persistentOutput(PersistentOStream & os) const; 00143 00149 void persistentInput(PersistentIStream & is, int version); 00151 00155 static void Init(); 00156 00160 void select(tXCombPtr); 00161 00162 protected: 00163 00170 virtual IBPtr clone() const; 00171 00176 virtual IBPtr fullclone() const; 00178 00179 private: 00180 00184 Energy theBeamEMaxA; 00185 00189 Energy theBeamEMaxB; 00190 00191 private: 00192 00196 static ClassDescription<LuminosityFunction> initLuminosityFunction; 00197 00201 LuminosityFunction & operator=(const LuminosityFunction &); 00202 00203 }; 00204 00211 template <> 00212 struct BaseClassTrait<LuminosityFunction,1>: public ClassTraitsType { 00214 typedef HandlerBase NthBase; 00215 }; 00216 00221 template <> 00222 struct ClassTraits<LuminosityFunction>: 00223 public ClassTraitsBase<LuminosityFunction> { 00225 static string className() { return "ThePEG::LuminosityFunction"; } 00226 }; 00227 00230 } 00231 00232 #endif /* ThePEG_LuminosityFunction_H */