File indexing completed on 2026-08-06 09:20:02
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #ifndef EVT_MULTI_CHANNEL_PARSER
0022 #define EVT_MULTI_CHANNEL_PARSER
0023
0024 #include "EvtGenBase/EvtComplex.hh"
0025
0026 #include <string>
0027 #include <vector>
0028
0029
0030
0031 class EvtDecayMode;
0032
0033 enum
0034 {
0035 POLAR_RAD,
0036 POLAR_DEG,
0037 CARTESIAN
0038 };
0039
0040 class EvtMultiChannelParser {
0041 public:
0042 EvtMultiChannelParser() : _pdfMax( -1. ), _nScan( 0 ), _dm( 0. ) {}
0043 ~EvtMultiChannelParser() {}
0044
0045 static EvtDecayMode getDecayMode( const char* file );
0046
0047 void parse( const char* file, const char* model );
0048 void parse( const std::vector<std::string>& v );
0049
0050 static void parseComplexCoef( size_t& i, const std::vector<std::string>& v,
0051 EvtComplex& c, int& format );
0052 static double parseRealCoef( int& i, const std::vector<std::string>& v );
0053 static bool isKeyword( const std::string& s );
0054
0055 inline double pdfMax() const { return _pdfMax; }
0056 inline int nScan() const { return _nScan; }
0057 inline double dm() const { return _dm; }
0058 inline double mixPhase() const { return _mixPhase; }
0059 inline double mixAmpli() const { return _mixAmpli; }
0060
0061 inline std::vector<std::string> amp( int i ) const { return _amp[i]; }
0062 inline std::vector<std::string> ampConj( int i ) const
0063 {
0064 return _ampConj[i];
0065 }
0066 inline EvtComplex ampCoef( int i ) const { return _ampCoef[i]; }
0067 inline EvtComplex ampConjCoef( int i ) const { return _ampConjCoef[i]; }
0068
0069 inline int coefFormat( int i ) const { return _coefFormat[i]; }
0070 inline int coefConjFormat( int i ) const { return _coefConjFormat[i]; }
0071
0072 inline int getNAmp() const { return _amp.size(); }
0073 inline int getNAmpConj() const { return _ampConj.size(); }
0074
0075 private:
0076 double _pdfMax;
0077 int _nScan;
0078 double _dm;
0079 double _mixPhase;
0080 double _mixAmpli;
0081
0082 std::vector<std::vector<std::string>> _amp;
0083 std::vector<std::vector<std::string>> _ampConj;
0084 std::vector<EvtComplex> _ampCoef;
0085 std::vector<int> _coefFormat;
0086 std::vector<EvtComplex> _ampConjCoef;
0087 std::vector<int> _coefConjFormat;
0088 };
0089
0090 #endif