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 EVT_MASSAMP_HH
0022 #define EVT_MASSAMP_HH
0023 
0024 #include "EvtGenBase/EvtAmplitude.hh"
0025 #include "EvtGenBase/EvtPoint1D.hh"
0026 #include "EvtGenBase/EvtPropBreitWignerRel.hh"
0027 #include "EvtGenBase/EvtTwoBodyVertex.hh"
0028 
0029 // Relativistic lineshape for a two-body decay of a resonance to two
0030 // pseudoscalars. The mass dependence of the width and the vertex factors
0031 // are included in the calculation.
0032 
0033 class EvtMassAmp : public EvtAmplitude<EvtPoint1D> {
0034   public:
0035     EvtMassAmp( const EvtPropBreitWignerRel& prop, const EvtTwoBodyVertex& vd );
0036     EvtMassAmp( const EvtMassAmp& other );
0037     EvtMassAmp& operator=( const EvtMassAmp& other );
0038 
0039     EvtComplex amplitude( const EvtPoint1D& p ) const override;
0040 
0041     EvtAmplitude<EvtPoint1D>* clone() const override
0042     {
0043         return new EvtMassAmp( *this );
0044     }
0045 
0046     void setBirthVtx( const EvtTwoBodyVertex& vb )
0047     {
0048         _vb = std::make_unique<EvtTwoBodyVertex>( vb );
0049     }
0050 
0051     void addBirthFact() { _useBirthFact = true; }
0052     void addDeathFact() { _useDeathFact = true; }
0053     void addBirthFactFF() { _useBirthFactFF = true; }
0054     void addDeathFactFF() { _useDeathFactFF = true; }
0055 
0056   private:
0057     EvtPropBreitWignerRel _prop;
0058     EvtTwoBodyVertex _vd;
0059     std::unique_ptr<EvtTwoBodyVertex> _vb;
0060 
0061     bool _useBirthFact;
0062     bool _useDeathFact;
0063     bool _useBirthFactFF;
0064     bool _useDeathFactFF;
0065 };
0066 
0067 #endif