Back to home page

EIC code displayed by LXR

 
 

    


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

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 EVT_DALITZ_PLOT_HH
0022 #define EVT_DALITZ_PLOT_HH
0023 
0024 #include "EvtGenBase/EvtCyclic3.hh"
0025 #include "EvtGenBase/EvtDecayMode.hh"
0026 #include "EvtGenBase/EvtTwoBodyVertex.hh"
0027 
0028 #include <assert.h>
0029 
0030 class EvtDalitzPlot {
0031   public:
0032     EvtDalitzPlot();
0033     EvtDalitzPlot( double mA, double mB, double mC, double bigM,
0034                    double ldel = 0., double rdel = 0. );
0035     EvtDalitzPlot( const EvtDecayMode& mode, double ldel = 0., double rdel = 0. );
0036     bool operator==( const EvtDalitzPlot& other ) const;
0037     const EvtDalitzPlot* clone() const;
0038 
0039     // Absolute limits for masses squared in the Dalitz plot
0040     // e.g. qAbsMin(0) is the lowest possible value
0041     // for m2 of particles {12}
0042 
0043     double qAbsMin( EvtCyclic3::Pair i ) const;
0044     double qAbsMax( EvtCyclic3::Pair i ) const;
0045     double mAbsMin( EvtCyclic3::Pair i ) const;
0046     double mAbsMax( EvtCyclic3::Pair i ) const;
0047 
0048     // Absolute limits for Zemach coordinate qres and qhel (approximate)
0049     // qHelAbsMin(BC,CA) means absolute minimum for (qCA-qAB)/2.
0050 
0051     double qResAbsMin( EvtCyclic3::Pair i ) const;
0052     double qResAbsMax( EvtCyclic3::Pair i ) const;
0053     double qHelAbsMin( EvtCyclic3::Pair i ) const;
0054     double qHelAbsMax( EvtCyclic3::Pair i ) const;
0055     inline double qSumMin() const { return sum() + _ldel; }
0056     inline double qSumMax() const { return sum() + _rdel; }
0057     inline bool fuzzy() const { return ( _rdel - _ldel != 0. ); }
0058 
0059     // Find the area of the Dalitz plot by numeric integration. (N bins for variable q(i) are used).
0060     // Very large numbers of N can result in a very long calculation. It should not
0061     // matter which two pairs f variables are used. The integral should eventually
0062     // converge to the same number
0063 
0064     double getArea( int N = 1000, EvtCyclic3::Pair i = EvtCyclic3::AB,
0065                     EvtCyclic3::Pair j = EvtCyclic3::BC ) const;
0066 
0067     // Limits for masses squared when one mass squared is known
0068 
0069     double qMin( EvtCyclic3::Pair i, EvtCyclic3::Pair j, double q ) const;
0070     double qMax( EvtCyclic3::Pair i, EvtCyclic3::Pair j, double q ) const;
0071 
0072     // Coordinate transformations
0073 
0074     double cosTh( EvtCyclic3::Pair i1, double q1, EvtCyclic3::Pair i2,
0075                   double q2 ) const;
0076     double e( EvtCyclic3::Index i, EvtCyclic3::Pair j, double q ) const;
0077     double p( EvtCyclic3::Index i, EvtCyclic3::Pair j, double q ) const;
0078 
0079     double q( EvtCyclic3::Pair i1, double cosTh, EvtCyclic3::Pair i2,
0080               double q2 ) const;
0081 
0082     // |J| of transformation of qi to cosTh in the rest-frame of j
0083 
0084     double jacobian( EvtCyclic3::Pair i, double q ) const;
0085 
0086     // Given resonance index and mass returns decay
0087     // and birth vertices
0088 
0089     EvtTwoBodyVertex vD( EvtCyclic3::Pair iRes, double m0, int L ) const;
0090     EvtTwoBodyVertex vB( EvtCyclic3::Pair iRes, double m0, int L ) const;
0091 
0092     // Accessors
0093 
0094     double sum() const;
0095     inline double bigM() const { return _bigM; }
0096     inline double mA() const { return _mA; }
0097     inline double mB() const { return _mB; }
0098     inline double mC() const { return _mC; }
0099     double m( EvtCyclic3::Index i ) const;
0100 
0101     void print() const;
0102 
0103     void sanityCheck() const;
0104 
0105   protected:
0106     // Defines two dimensional dalitz plot
0107 
0108     double _mA;
0109     double _mB;
0110     double _mC;
0111     double _bigM;
0112 
0113     // Defines third dimension, or fuzziness. M^2 + ldel < M^2 < M^2 + rdel
0114 
0115     double _ldel;
0116     double _rdel;
0117 };
0118 
0119 #endif