Back to home page

EIC code displayed by LXR

 
 

    


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

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 EVTFOURBODYPHSP_HH
0022 #define EVTFOURBODYPHSP_HH
0023 
0024 #include <vector>
0025 #include <array>
0026 #include <utility>
0027 
0028 #include "EvtGenBase/EvtDecayProb.hh"
0029 
0030 class EvtParticle;
0031 
0032 class EvtFourBodyPhsp : public EvtDecayProb {
0033   public:
0034     enum Shape
0035     {
0036         rectangle = 1,
0037         trapezoid = 2,
0038         pentagon = 3,
0039         variable = 4
0040     };
0041 
0042     std::string getName() override;
0043     EvtDecayBase* clone() override;
0044 
0045     void init() override;
0046     void initProbMax() override;
0047 
0048     void decay( EvtParticle* parent ) override;
0049 
0050   private:
0051     std::array<double, 4> phspFactor( const double mM, const double m12,
0052                                       const double m34,
0053                                       std::array<double, 4>& daughters ) const;
0054     Shape determineBoundaryShape( const double m12Min, const double m12Max,
0055                                   const double m34Max,
0056                                   const double mMother ) const;
0057 
0058     std::pair<double, double> generatePairMasses(
0059         const double m12Min, const double m12Max, const double m34Min,
0060         const double m34Max, const double mMother,
0061         const EvtFourBodyPhsp::Shape shape ) const;
0062     std::pair<double, double> generateRectangle( const double m12Min,
0063                                                  const double m12Max,
0064                                                  const double m34Min,
0065                                                  const double m34Max ) const;
0066     std::pair<double, double> generateTrapezoid( const double m12Min,
0067                                                  const double m12Max,
0068                                                  const double m34Min,
0069                                                  const double mMother ) const;
0070 
0071     std::array<double, 4> m_daughterMasses{ -1, -1, -1, -1 };
0072 
0073     double m_m12Min;
0074     double m_m12Max;
0075     double m_m34Min;
0076     double m_m34Max;
0077 
0078     double m_trapNorm;
0079     double m_trapCoeff1;
0080     double m_trapCoeff2;
0081 
0082     double m_pentagonSplit;
0083     double m_pentagonFraction;
0084 
0085     Shape m_boundaryShape;
0086 
0087     bool m_stableMother{true};
0088     bool m_stableDaughters{true};
0089     bool m_fixedBoundary{true};
0090 };
0091 
0092 #endif