00001 #ifndef __EVTMNODE_HH__ 00002 #define __EVTMNODE_HH__ 00003 00004 #include "EvtGenBase/EvtVector4R.hh" 00005 #include "EvtGenBase/EvtComplex.hh" 00006 #include "EvtGenBase/EvtPDL.hh" 00007 00008 #include "EvtGenBase/EvtSymTable.hh" 00009 #include "EvtGenBase/EvtSpinAmp.hh" 00010 00011 #include <vector> 00012 using std::vector; 00013 00014 #include <string> 00015 using std::string; 00016 00017 class EvtMNode { 00018 00019 public: 00020 00021 EvtMNode() {} 00022 virtual ~EvtMNode() {}; 00023 00024 // calculate the amplitude associated event this->children return a 00025 // vector of the form A_{\lambda this} and sum over allowed angular 00026 // momenta of the children 00027 virtual EvtSpinAmp amplitude( const vector<EvtVector4R> 00028 &product ) const = 0; 00029 00030 // get the 4 vector associated with this node 00031 EvtVector4R get4vector( const vector<EvtVector4R> &product ) const; 00032 00033 // get twice the spin of the particle 00034 int getspin() const { return _twospin; } 00035 EvtSpinType::spintype getspintype() const { return EvtPDL::getSpinType( _id ); } 00036 00037 // get the id of this node 00038 EvtId getid() const { return _id; } 00039 00040 // return which particles this is a combination of 00041 const vector<int> & getresonance() const { return _resonance; } 00042 00043 void setparent( EvtMNode * parent ) { _parent = parent; } 00044 EvtMNode * getparent() const { return _parent; } 00045 00046 // get the number of children that this node has 00047 virtual int getnchild() const = 0; 00048 00049 // return the value of the resonance shape 00050 virtual EvtComplex line( const vector<EvtVector4R>& product ) const=0; 00051 00052 // return a pointer node 00053 virtual EvtMNode * duplicate() const=0; 00054 protected: 00055 00056 // store the EvtId of the particle (just in case we need it to access 00057 // further informatoin about it) 00058 EvtId _id; 00059 00060 // store TWICE the spin of this resonance (this is to deal with spin 1/2 00061 int _twospin; 00062 00063 // store the particles that form this resonance, this should match up 00064 // with the child nodes from below, and is calculated internally 00065 vector<int> _resonance; 00066 00067 // store the parent node of this one 00068 EvtMNode * _parent; 00069 00070 }; 00071 00072 #endif