Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:20:02

0001 
0002 /***********************************************************************
0003 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors       *
0004 *                                                                      *
0005 * This file is part of EvtGen.                                         *
0006 *                                                                      *
0007 * EvtGen is free software: you can redistribute it and/or modify       *
0008 * it under the terms of the GNU General Public License as published by *
0009 * the Free Software Foundation, either version 3 of the License, or    *
0010 * (at your option) any later version.                                  *
0011 *                                                                      *
0012 * EvtGen is distributed in the hope that it will be useful,            *
0013 * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
0014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
0015 * GNU General Public License for more details.                         *
0016 *                                                                      *
0017 * You should have received a copy of the GNU General Public License    *
0018 * along with EvtGen.  If not, see <https://www.gnu.org/licenses/>.     *
0019 ***********************************************************************/
0020 
0021 #ifndef __EVTDALITZRESO_HH__
0022 #define __EVTDALITZRESO_HH__
0023 
0024 #include "EvtGenBase/EvtBlattWeisskopf.hh"
0025 #include "EvtGenBase/EvtComplex.hh"
0026 #include "EvtGenBase/EvtCyclic3.hh"
0027 #include "EvtGenBase/EvtDalitzPoint.hh"
0028 #include "EvtGenBase/EvtDecayAmp.hh"
0029 #include "EvtGenBase/EvtFlatte.hh"
0030 #include "EvtGenBase/EvtSpinType.hh"
0031 #include "EvtGenBase/EvtTwoBodyVertex.hh"
0032 
0033 #include <map>
0034 #include <string>
0035 #include <vector>
0036 
0037 using std::map;
0038 using std::vector;
0039 
0040 class EvtBlattWeisskopf;
0041 
0042 class EvtDalitzReso final {
0043   public:
0044     // Numerator type
0045     enum NumType
0046     {
0047         NBW = 0,
0048         RBW_ZEMACH = 1,
0049         RBW_KUEHN = 2,
0050         RBW_CLEO = 3,
0051         RBW_ZEMACH2 = 4,
0052         GS_CLEO = 5,
0053         K_MATRIX = 6,
0054         RBW_CLEO_ZEMACH = 7,
0055         GS_CLEO_ZEMACH = 8,
0056         LASS = 9,
0057         K_MATRIX_I = 10,
0058         K_MATRIX_II = 11,
0059         GAUSS_CLEO = 12,
0060         GAUSS_CLEO_ZEMACH = 13,
0061         FLATTE = 14,
0062         NON_RES = 15,
0063         NON_RES_LIN = 16,
0064         NON_RES_EXP = 17
0065     };
0066 
0067     // Coupling type
0068     //  ChgPion : pi+ pi-
0069     //  NeuPion : pi0 pi0
0070     //  Pion    : 0.5*[(pi+ pi-) + (pi0 pi0)]
0071     //  ChgKaon : K+ K-
0072     //  NeuKaon : K0 K0
0073     //  Kaon    : 0.5*[(K+ K-) + (K0 K0)]
0074     //  EtaPion : eta pi0
0075     enum CouplingType
0076     {
0077         Undefined = 0,
0078         PicPic = 1,
0079         PizPiz,
0080         PiPi,
0081         KcKc,
0082         KzKz,
0083         KK,
0084         EtaPic,
0085         EtaPiz,
0086         PicPicKK,
0087         WA76
0088     };
0089 
0090     EvtDalitzReso() : m_typeN( NON_RES ){};
0091 
0092     EvtDalitzReso( const EvtDalitzPlot& dp, EvtCyclic3::Pair pairRes,
0093                    NumType typeN, double alpha = 0.0 ) :
0094         m_dp( dp ), m_pairRes( pairRes ), m_typeN( typeN ), m_alpha( alpha ){};
0095 
0096     EvtDalitzReso( const EvtDalitzPlot& dp, EvtCyclic3::Pair pairAng,
0097                    EvtCyclic3::Pair pairRes, EvtSpinType::spintype spin,
0098                    double m0, double g0, NumType typeN, double f_b = 0.0,
0099                    double f_d = 1.5 );
0100 
0101     EvtDalitzReso( const EvtDalitzPlot& dp, EvtCyclic3::Pair pairAng,
0102                    EvtCyclic3::Pair pairRes, EvtSpinType::spintype spin,
0103                    double m0, double g0, NumType typeN, double m0_mix,
0104                    double g0_mix, double delta_mix, EvtComplex amp_mix );
0105 
0106     EvtDalitzReso( const EvtDalitzPlot& dp, EvtCyclic3::Pair pairAng,
0107                    EvtCyclic3::Pair pairRes, EvtSpinType::spintype spin,
0108                    double m0, NumType typeN, double g1, double g2,
0109                    CouplingType coupling2 );
0110 
0111     // K-matrix
0112     EvtDalitzReso( const EvtDalitzPlot& dp, EvtCyclic3::Pair pairRes,
0113                    std::string nameIndex, NumType typeN, EvtComplex fr12prod,
0114                    EvtComplex fr13prod, EvtComplex fr14prod,
0115                    EvtComplex fr15prod, double s0prod );
0116 
0117     // LASS
0118     EvtDalitzReso( const EvtDalitzPlot& dp, EvtCyclic3::Pair pairRes, double m0,
0119                    double g0, double a, double r, double B, double phiB, double R,
0120                    double phiR, double cutoff = -1, bool scaleByMOverQ = false );
0121 
0122     //Flatte
0123     EvtDalitzReso( const EvtDalitzPlot& dp, EvtCyclic3::Pair pairRes, double m0 );
0124 
0125     EvtDalitzReso* clone() const { return new EvtDalitzReso( *this ); }
0126 
0127     EvtComplex evaluate( const EvtDalitzPoint& p ) const;
0128 
0129     void addFlatteParam( const EvtFlatteParam& param )
0130     {
0131         m_flatteParams.push_back( param );
0132     }
0133 
0134   private:
0135     EvtComplex psFactor( const double ma, const double mb, const double m ) const;
0136     EvtComplex psFactor( const double ma1, const double mb1, const double ma2,
0137                          const double mb2, const double m ) const;
0138     EvtComplex propGauss( const double m0, const double s0, const double m ) const;
0139     EvtComplex propBreitWigner( const double m0, const double g0,
0140                                 const double m ) const;
0141     EvtComplex propBreitWignerRel( const double m0, const double g0,
0142                                    const double m ) const;
0143     EvtComplex propBreitWignerRel( const double m0, const EvtComplex& g0,
0144                                    const double m ) const;
0145     EvtComplex propBreitWignerRelCoupled( const double m0, const EvtComplex& g1,
0146                                           const EvtComplex& g2,
0147                                           const double m ) const;
0148     EvtComplex propGounarisSakurai( const double m0, const double g0,
0149                                     const double k0, const double m,
0150                                     const double g, const double k ) const;
0151     inline double GS_f( const double m0, const double g0, const double k0,
0152                         const double m, const double k ) const;
0153     inline double GS_h( const double m, const double k ) const;
0154     inline double GS_dhods( const double m0, const double k0 ) const;
0155     inline double GS_d( const double m0, const double k0 ) const;
0156 
0157     EvtComplex numerator( const EvtDalitzPoint& p, const EvtTwoBodyVertex& vb,
0158                           const EvtTwoBodyVertex& vd, const EvtTwoBodyKine& kb,
0159                           const EvtTwoBodyKine& kd ) const;
0160     double angDep( const EvtDalitzPoint& p ) const;
0161     EvtComplex mixFactor( const EvtComplex& prop,
0162                           const EvtComplex& prop_mix ) const;
0163     EvtComplex Fvector( const double s, const int index ) const;
0164     EvtComplex lass( const EvtTwoBodyKine& kd, const EvtTwoBodyVertex& vd ) const;
0165     EvtComplex flatte( const double s ) const;
0166 
0167     inline EvtComplex sqrtCplx( const double in ) const
0168     {
0169         return ( in > 0 ) ? EvtComplex( sqrt( in ), 0 )
0170                           : EvtComplex( 0, sqrt( -in ) );
0171     }
0172 
0173     // Dalitz plot
0174     EvtDalitzPlot m_dp;
0175 
0176     // Pairing indices:
0177     EvtCyclic3::Pair m_pairAng;    // angular
0178     EvtCyclic3::Pair m_pairRes;    // resonance
0179 
0180     // Spin
0181     EvtSpinType::spintype m_spin;
0182 
0183     // Numerator type
0184     NumType m_typeN;
0185 
0186     // Nominal mass and width
0187     double m_m0, m_g0;
0188 
0189     // Daughter masses
0190     double m_massFirst, m_massSecond;
0191 
0192     // variables for electromagnetic mass mixing
0193     double m_m0_mix, m_g0_mix, m_delta_mix;
0194     EvtComplex m_amp_mix;
0195 
0196     // variables for coupled Breit-Wigner
0197     double m_g1, m_g2;
0198     CouplingType m_coupling2;
0199 
0200     // variables for Blatt-Weisskopf form factors
0201     double m_f_b, m_f_d;
0202 
0203     // K-matrix
0204     int m_kmatrix_index;
0205     EvtComplex m_fr12prod, m_fr13prod, m_fr14prod, m_fr15prod;
0206     double m_s0prod;
0207 
0208     // LASS
0209     double m_a;
0210     double m_r;
0211     double m_Blass;
0212     double m_phiB;
0213     double m_R;
0214     double m_phiR;
0215     double m_cutoff;
0216     bool m_scaleByMOverQ;
0217 
0218     //Nonresonant
0219     double m_alpha;
0220 
0221     // Flatte
0222     std::vector<EvtFlatteParam> m_flatteParams;
0223 };
0224 
0225 #endif