Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:10:17

0001 #ifndef YFS_Main_Generate_Photon_H
0002 #define YFS_Main_Generate_Photon_H
0003 
0004 #include "ATOOLS/Phys/Particle.H"
0005 #include "BEAM/Main/Beam_Base.H"
0006 #include "ATOOLS/Math/Histogram.H"
0007 
0008 #include "YFS/Main/YFS_Base.H"
0009 #include "YFS/Tools/Dipole.H"
0010 
0011 using namespace ATOOLS;
0012 namespace BEAM   { class Beam_Base;      }
0013 // #define YFS_DEBUG
0014 
0015 namespace YFS {
0016 
0017 #ifdef YFS_DEBUG
0018 typedef std::map<std::string, ATOOLS::Histogram *> histograms;
0019 static histograms m_histograms;
0020 #endif
0021 class ISR : public YFS_Base {
0022 public:
0023   double  m_b1;
0024   double  m_b2;
0025   double  m_theta, m_angleWeight;
0026   double  m_phi;
0027   double  m_c, m_F, m_sin;
0028   double  m_w, m_f, m_fbar;
0029   double  m_delta, m_betaf;
0030   double  m_jacW, m_Jac, m_Jac0, m_lam, m_lam0, m_diljac, m_diljac0;
0031   double  A;
0032   int m_n, m_cut;
0033   double m_beta, m_betap, m_form, m_formF, m_weight, m_Kmax, m_Kmin, m_betak;
0034   double  m_L, m_am2, m_mass, m_mass2, m_x;
0035   double m_massW;
0036   double m_W, m_W0; // for beta1
0037   bool m_setmass;
0038   double m_nsuccess, m_nfail, m_ntotal;
0039   // ATOOLS::Particle *p_photon;
0040   std::vector<double> m_yini, m_AA, m_K2, m_PTK, m_del1, m_del2;
0041   std::vector<double> m_zini, m_cos, m_jacvec, m_scale;
0042   Vec4D m_pvec1, m_pvec2, m_qvec1, m_qvec2, m_photon, m_photonSum;
0043   Vec4D_Vector m_photons;
0044   void GeneratePhotonAngleMassless();
0045   BEAM::Beam_Base **p_beam;
0046   YFS::Dipole *p_dipole;
0047 
0048 
0049 public:
0050   ISR();
0051   ~ISR();
0052   void GeneratePhotonMomentum();
0053   double Jacobian( double x);
0054   double GenerateV();
0055   void SetIncoming(YFS::Dipole *p_dipole);
0056   double CalculateBeta(const ATOOLS::Vec4D &p);
0057   void GenerateAngles();
0058   void Weight();
0059   void WeightFSR();
0060   double EikonalWeight(const Vec4D_Vector, const Vec4D_Vector, double a);
0061   double Eikonal(Vec4D);
0062   double Eikonal(const Vec4D &k, const Vec4D &p1, const Vec4D &p2);
0063   double EikonalMassless(const Vec4D &k, const Vec4D &p1, const Vec4D &p2);
0064   void NPhotons();
0065   void MakeYFS();
0066   void Beta1();
0067   void D2(Vec4D, double, double, double);
0068   void MapPhotonMomentun();
0069   void MapMomenta(Vec4D_Vector p, Vec4D_Vector q, Vec4D_Vector k);
0070   void Sort(Vec4D_Vector &p);
0071   void Sort(std::vector<double> &p);
0072   void GenerateAnglesForMassless();
0073   double Flux();
0074   void Clean();
0075 
0076   inline double GetWeight() { return m_weight; }
0077   inline ATOOLS::Vec4D GetPhotonSum() { return m_photonSum; }
0078   inline ATOOLS::Vec4D_Vector GetPhotons() { return m_photons; }
0079   inline double  GetTheta() { return m_theta; }
0080   inline double  GetPhi() { return m_phi; }
0081   inline double  GetN() { return m_n; }
0082   inline void  SetV(double v) { m_v = v; }
0083   inline void  Setmass(bool setmass) { m_setmass = setmass; }
0084   inline double  GetGamma() { return m_g; }
0085   inline double  GetGammaPrime() { return m_gp; }
0086   inline int  GetCut() { return m_cut; }
0087   inline std::vector<double>  GetSudakovY() { return m_yini; }
0088   inline std::vector<double>  GetSudakovZ() { return m_zini; }
0089   void SetMinimalPhotonAngle(const double&);
0090 
0091 
0092 };
0093 
0094 
0095 
0096 }
0097 
0098 #endif