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 EVTDALITZTABLE_HPP
0022 #define EVTDALITZTABLE_HPP
0023 
0024 #include "EvtGenBase/EvtCyclic3.hh"
0025 #include "EvtGenBase/EvtDalitzPlot.hh"
0026 #include "EvtGenBase/EvtDalitzReso.hh"
0027 #include "EvtGenBase/EvtId.hh"
0028 #include "EvtGenBase/EvtSpinType.hh"
0029 
0030 #include "EvtGenModels/EvtDalitzDecayInfo.hh"
0031 
0032 #include <map>
0033 #include <string>
0034 #include <vector>
0035 
0036 // Description: Model to describe a generic dalitz decay
0037 
0038 class EvtDalitzTable {
0039   public:
0040     static EvtDalitzTable* getInstance( const std::string dec_name = "",
0041                                         bool verbose = true );
0042 
0043     bool fileHasBeenRead( const std::string dec_name );
0044     void readXMLDecayFile( const std::string dec_name, bool verbose = true );
0045     void checkParticle( std::string particle );
0046 
0047     void addDecay( EvtId parent, const EvtDalitzDecayInfo& dec );
0048     void copyDecay( EvtId parent, EvtId* daughters, EvtId copy, EvtId* copyd );
0049 
0050     std::vector<EvtDalitzDecayInfo> getDalitzTable( const EvtId& parent );
0051 
0052   protected:
0053     EvtDalitzTable();
0054     ~EvtDalitzTable();
0055 
0056   private:
0057     EvtDalitzReso getResonance( std::string shape, EvtDalitzPlot dp,
0058                                 EvtCyclic3::Pair angPair,
0059                                 EvtCyclic3::Pair resPair,
0060                                 EvtSpinType::spintype spinType, double mass,
0061                                 double width, double FFp, double FFr,
0062                                 double alpha, double aLass, double rLass,
0063                                 double BLass, double phiBLass, double RLass,
0064                                 double phiRLass, double cutoffLass );
0065     int getDaughterPairs(
0066         EvtId* resDaughter, EvtId* daughter,
0067         std::vector<std::pair<EvtCyclic3::Pair, EvtCyclic3::Pair>>& angAndResPairs );
0068 
0069     std::map<EvtId, std::vector<EvtDalitzDecayInfo>> _dalitztable;
0070     std::vector<std::string> _readFiles;
0071 
0072     EvtDalitzTable( const EvtDalitzTable& );
0073     EvtDalitzTable& operator=( const EvtDalitzTable& );
0074 
0075     //to calculate probMax
0076     double calcProbMax( EvtDalitzPlot dp, EvtDalitzDecayInfo* model );
0077     double calcProb( EvtDalitzPoint point, EvtDalitzDecayInfo* model );
0078 };
0079 
0080 #endif