Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef METOOLS_Main_XYZFuncs_H
0002 #define METOOLS_Main_XYZFuncs_H
0003 
0004 #include <vector>
0005 #include "ATOOLS/Math/MyComplex.H"
0006 #include "ATOOLS/Math/Vector.H"
0007 #include "ATOOLS/Phys/Flavour.H"
0008 
0009 namespace METOOLS {
0010   class XYZFunc {
0011   protected:
0012     int                 m_N;
0013     int                 m_k0n;
0014     bool                m_anti;
0015     ATOOLS::Vec4D     * p_mom;
0016     ATOOLS::Flavour   * p_flav;
0017     const int         * p_i;
0018     std::vector<Complex>     m_eta, m_mu;
0019 
0020     void CalcEtaMu();
0021     int MToL(int m);
0022 
0023     Complex S( const int s, const int i, const int j );
0024     Complex S( const int s, const int i, const ATOOLS::Vec4C p, Complex eta );
0025     Complex S( const int s, const ATOOLS::Vec4C p, Complex eta, const int j );
0026 
0027     Complex Z( const int t1, const int t2, const int t3, const int t4,
0028                const int hel_comb,
0029            const Complex cR1, const Complex cL1,
0030            const Complex cR2, const Complex cL2 );
0031     Complex Y( const int t1, const int t2, const int hel_comb, 
0032                const Complex cR, const Complex cL );
0033     Complex X( const int t1, const ATOOLS::Vec4C p2, const int t3,
0034            const int hel_comb, const Complex cR, const Complex cL );
0035     ATOOLS::Vec4C L( const int t1, const int t2,
0036               const int hel_comb, const Complex cR, const Complex cL );
0037 
0038   public:
0039     XYZFunc( const ATOOLS::Vec4D_Vector& p,
0040              const ATOOLS::Flavour_Vector& fl,
0041              bool anti,
0042              const std::vector<int>& indices=std::vector<int>());
0043     XYZFunc( int n, const ATOOLS::Vec4D* p, const ATOOLS::Flavour *fl,
0044              bool anti=false, const int *indices=NULL );
0045     XYZFunc( const ATOOLS::Flavour_Vector& fl,
0046              const std::vector<int>& indices=std::vector<int>() );
0047     ~XYZFunc();
0048 
0049     void Prepare( const ATOOLS::Vec4D_Vector& p, const bool anti=false );
0050 
0051     Complex Z(
0052           const int t1, const int l1,
0053           const int t2, const int l2,
0054           const int t3, const int l3,
0055           const int t4, const int l4,
0056           const Complex cR1, const Complex cL1,
0057           const Complex cR2, const Complex cL2 );
0058     Complex Y(
0059           const int t1, const int l1,
0060           const int t2, const int l2,
0061           const Complex cR, const Complex cL );
0062     Complex X(
0063           const int t1, const int l1,
0064           const ATOOLS::Vec4C p2,
0065           const int t3, const int l3,
0066           const Complex cR, const Complex cL );
0067     Complex G(
0068           const int t1, const int l1,
0069           const ATOOLS::Vec4C p2,
0070           const int t3, const int l3 );
0071     ATOOLS::Vec4C L(
0072           const int t1, const int l1,
0073           const int t2, const int l2,
0074           const Complex cR, const Complex cL );
0075 
0076     ATOOLS::Vec4C Y31(const int t1, const int l1,
0077                        const int t2, const int l2,
0078                        Complex cR, Complex cL );
0079 
0080     ATOOLS::Vec4C Y13(const int t1, const int l1,
0081                        const int t2, const int l2,
0082                        Complex cR, Complex cL );
0083 
0084     ATOOLS::Vec4C X31(const int t1, const int l1,
0085                        const ATOOLS::Vec4C p2,
0086                        const int t3, const int l3,
0087                        Complex cR, Complex cL );
0088 
0089     ATOOLS::Vec4C X13(const int t1, const int l1,
0090                        const ATOOLS::Vec4C p2,
0091                        const int t3, const int l3,
0092                        Complex cR, Complex cL );
0093 
0094     ATOOLS::Vec4C L31(const int t1, const int l1,
0095                        const ATOOLS::Vec4C p,
0096                        const int t2, const int l2,
0097                        Complex cR, Complex cL );
0098 
0099     ATOOLS::Vec4C L13(const int t1, const int l1,
0100                        const ATOOLS::Vec4C p,
0101                        const int t2, const int l2,
0102                        Complex cR, Complex cL );
0103   };
0104 
0105 
0106   /*!
0107     \file XYZFuncs.H
0108     \brief Declares the class ATOOLS::XYZFunc
0109 
0110     This file can be found in the directory \c Helicities.
0111   */
0112 
0113   /*!
0114     \class XYZFunc
0115     \brief Tools to calculate X, Y, and Z functions
0116 
0117     This class contains everything that is necessery to calculate the value
0118     of an X, Y, or Z function, which can be used to calculate a decay matrix
0119     element.
0120     <b>Note!</b> Helicity combinations are coded in like a binary number such that
0121     - \f$++++ \equiv 0\f$
0122     - \f$+++- \equiv 1\f$
0123     - \f$++-+ \equiv 2\f$
0124     - ...
0125     - \f$---- \equiv 15\f$
0126     .
0127   */
0128 
0129   /*!
0130     \fn XYZFunc::XYZFunc( int n, const ATOOLS::Vec4D* p, const ATOOLS::Flavour *fl, bool anti=false, const int *indices=NULL )
0131     \brief Constructor to set up the calculation
0132 
0133     This method saves the momenta and flavours so that they are available throughout the class. Furthermore, it
0134     calls XYZFunc::CalcEtaMu which is tasked with the calculation of \f$\eta_i\f$ and \f$\mu_i\f$ for each
0135     particle.
0136   */
0137   /*!
0138     \fn XYZFunc::CalcEtaMu()
0139     \brief Calculates \f$\eta_i\f$ and \f$\mu_i\f$ for each particle
0140 
0141     Eta's and Mu's are calcuted and stored in private attributes. For Eta's \f$k_0\f$ is set to
0142     \f$k_0=(1,0,\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}})\f$ if XYZFunc::m_k0n is 1 (default).
0143   */
0144 
0145   /*!
0146     \var XYZFunc::p_mom
0147     Pointer on involved 4-momenta.
0148   */
0149 
0150   /*!
0151     \var XYZFunc::p_flav
0152     Pointer on involved flavours.
0153   */
0154 
0155   /*!
0156     \var XYZFunc::m_N
0157     Number of involved particles (in- and out-particles)
0158   */
0159   /*!
0160     \var XYZFunc::m_k0n
0161     It is either 0, 1 or 2. The used vector \f$k_0\f$ is then either 
0162     \f$k_0=(1,\frac{1}{\sqrt{2}},0,\frac{1}{\sqrt{2}})\f$,
0163     \f$k_0=(1,0,\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}})\f$ or
0164     \f$k_0=(1,\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}},0)\f$, respectively.
0165   */
0166 }
0167 
0168 #endif
0169