Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:14:58

0001 // lAger: General Purpose l/A-event Generator
0002 // Copyright (C) 2016-2021 Sylvester Joosten <sjoosten@anl.gov>
0003 //
0004 // This file is part of lAger.
0005 //
0006 // lAger is free software: you can redistribute it and/or modify
0007 // it under the terms of the GNU General Public License as published by
0008 // the Free Shoftware Foundation, either version 3 of the License, or
0009 // (at your option) any later version.
0010 //
0011 // lAger is distributed in the hope that it will be useful,
0012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
0013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014 // GNU General Public License for more details.
0015 //
0016 // You should have received a copy of the GNU General Public License
0017 // along with lAger.  If not, see <https://www.gnu.org/licenses/>.
0018 //
0019 
0020 #ifndef LAGER_GEN_LA_PHI_CLAS12_LOADED
0021 #define LAGER_GEN_LA_PHI_CLAS12_LOADED
0022 
0023 #include <lager/core/generator.hh>
0024 #include <lager/core/particle.hh>
0025 #include <lager/gen/lA/generator.hh>
0026 #include <lager/gen/lA_event.hh>
0027 
0028 namespace lager {
0029 namespace lA {
0030 
0031 // =============================================================================
0032 // lA::phi_clas12
0033 //
0034 // gamma/gamma* + p -> VM + X process
0035 //
0036 // Uses the following expressions (cf. lager/physics/vm.hh)
0037 //  * sigma_T, including dipole-like Q2 dependence:
0038 //        sigmaT_phi_clas
0039 //  * (sigma_L/sigma_T):
0040 //        R_phi_clas
0041 //  * t-dependent dependence (normalized):
0042 //        exp_ff_normalized or dipole_ff_normalized (configurable)
0043 // =============================================================================
0044 class phi_clas12 : public lA::generator {
0045 public:
0046   using base_type = lA::generator;
0047 
0048   phi_clas12(const configuration& cf, const string_path& path,
0049              std::shared_ptr<TRandom> r);
0050   virtual lA_event generate(const lA_data&);
0051   virtual double max_cross_section() const { return max_; }
0052   virtual double phase_space() const { return max_t_range_.width(); }
0053 
0054 private:
0055   double calc_max_xsec(const configuration& cf) const;
0056   interval<double> calc_max_t_range(const configuration& cf, const string_path& path) const;
0057 
0058   // FIXME this should be a general utility function
0059   // threshold squared for these particular particles (correctly handels the
0060   // case of particles with non-zero width)
0061   double threshold2(const particle& vm, const particle& recoil) const;
0062 
0063   // utility function
0064   lA_event make_event(const lA_data& initial, const double t, particle vm1,
0065                       particle X1, const double xs, const double R);
0066 
0067   // recoil and vm particle info
0068   const particle recoil_;
0069   const particle vm_;
0070 
0071   // total cross section settings
0072   const double alpha_1_;
0073   const double alpha_2_;
0074   const double alpha_3_;
0075   const double nu_T_;
0076   // R settings
0077   const double c_R_;
0078   // FF function
0079   std::function<double(double /*Q2*/, double /*W*/, double /*t*/,
0080                        double /*Mt*/)>
0081       ff_func_;
0082 
0083   // t-range and cross setion maxima
0084   const interval<double> max_t_range_;
0085   const double max_;
0086 };
0087 
0088 } // namespace lA
0089 } // namespace lager
0090 
0091 #endif