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 __EVTMTREE_HH__
0022 #define __EVTMTREE_HH__
0023
0024 #include "EvtGenBase/EvtComplex.hh"
0025 #include "EvtGenBase/EvtMNode.hh"
0026 #include "EvtGenBase/EvtMParticle.hh"
0027 #include "EvtGenBase/EvtMRes.hh"
0028 #include "EvtGenBase/EvtPDL.hh"
0029 #include "EvtGenBase/EvtSpinAmp.hh"
0030 #include "EvtGenBase/EvtVector4R.hh"
0031
0032 #include <vector>
0033 using std::vector;
0034
0035 #include <string>
0036 using std::string;
0037
0038 typedef string::const_iterator ptype;
0039
0040 class EvtParticle;
0041
0042 class EvtMTree {
0043 public:
0044 EvtMTree( const EvtId*, unsigned int );
0045 ~EvtMTree();
0046
0047
0048 EvtSpinAmp amplitude( EvtParticle* ) const;
0049
0050
0051 void addtree( const string& );
0052
0053 private:
0054 vector<EvtMNode*> _root;
0055 vector<string> _lbltbl;
0056 double _norm;
0057
0058 bool parsecheck( char, const string& );
0059 void parseerror( bool, ptype&, ptype&, ptype& );
0060
0061 string parseId( ptype&, ptype&, ptype& );
0062 string parseKey( ptype&, ptype&, ptype& );
0063 vector<string> parseArg( ptype&, ptype&, ptype& );
0064 vector<EvtComplex> parseAmps( ptype&, ptype&, ptype& );
0065 vector<EvtMNode*> duplicate( const vector<EvtMNode*>& ) const;
0066 vector<vector<EvtMNode*>> unionChildren( const string&,
0067 vector<vector<EvtMNode*>>& );
0068 vector<vector<EvtMNode*>> parseChildren( ptype&, ptype&, ptype& );
0069 vector<EvtMNode*> parsenode( const string&, bool );
0070 bool validTree( const EvtMNode* ) const;
0071
0072 vector<EvtMNode*> makeparticles( const string& );
0073 EvtMRes* makeresonance( const EvtId&, const string&, const vector<string>&,
0074 const string&, const vector<EvtComplex>&,
0075 const vector<EvtMNode*>& );
0076
0077 EvtSpinAmp getrotation( EvtParticle* ) const;
0078 };
0079
0080 #endif