#include <EvtMHelAmp.hh>
Inheritance diagram for EvtMHelAmp:
Public Member Functions | |
EvtSpinAmp | amplitude (const vector< EvtVector4R > &product) const |
EvtMNode * | duplicate () const |
EvtMHelAmp (const EvtId &id, EvtMLineShape *, const vector< EvtMNode * > &, const vector< EvtComplex > &) | |
EvtVector4R | get4vector (const vector< EvtVector4R > &product) const |
EvtId | getid () const |
int | getnchild () const |
EvtMNode * | getparent () const |
const vector< int > & | getresonance () const |
int | getspin () const |
EvtSpinType::spintype | getspintype () const |
virtual EvtComplex | line (const vector< EvtVector4R > &product) const |
void | setparent (EvtMNode *parent) |
virtual | ~EvtMHelAmp () |
Protected Attributes | |
EvtSpinAmp | _amp |
vector< EvtMNode * > | _children |
EvtId | _id |
EvtMLineShape * | _lineshape |
EvtMNode * | _parent |
vector< int > | _resonance |
int | _twospin |
Private Attributes | |
vector< EvtComplex > | _elem |
|
00009 { 00010 _id = id; 00011 _twospin = EvtSpinType::getSpin2( EvtPDL::getSpinType( id ) ); 00012 _parent = NULL; 00013 _lineshape = lineshape; 00014 00015 _elem = elem; 00016 00017 vector<EvtSpinType::spintype> type; 00018 for( int i=0; i<children.size(); ++i ) { 00019 _children.push_back( children[i] ); 00020 type.push_back( children[i]->getspintype() ); 00021 const vector<int> &res = children[i]->getresonance(); 00022 for( int j=0; j<res.size(); ++j ) 00023 _resonance.push_back( res[j] ); 00024 children[i]->setparent( this ); 00025 } 00026 00027 // XXX New code - bugs could appear here XXX 00028 _amp = EvtSpinAmp( type ); 00029 vector<int> index = _amp.iterinit(); 00030 int i = 0; 00031 do { 00032 if( !_amp.allowed(index) ) 00033 _amp( index ) = 0.0; 00034 else if( abs(index[0] - index[1]) > _twospin ) 00035 _amp( index ) = 0.0; 00036 else { 00037 _amp( index ) = elem[i]; 00038 ++i; 00039 } 00040 } while( _amp.iterate( index ) ); 00041 if(elem.size() != i) { 00042 report(ERROR,"EvtGen") 00043 <<"Wrong number of elements input in helicity amplitude."<<endl; 00044 ::abort(); 00045 } 00046 00047 if( children.size() > 2 ) { 00048 report(ERROR,"EvtGen") 00049 <<"Helicity amplitude formalism can only handle two body resonances" 00050 <<endl; 00051 ::abort(); 00052 } 00053 }
|
|
00012 {};
|
|
Implements EvtMNode. 00057 { 00058 EvtVector4R d = _children[0]->get4vector(product); 00059 double phi, theta; 00060 00061 if( _parent == NULL ) { 00062 00063 // This means that we're calculating the first level and we need to just 00064 // calculate the polar and azymuthal angles daughters in rest frame of 00065 // this (root) particle (this is automatic). 00066 phi = atan2( d.get(1), d.get(2) ); 00067 theta = acos( d.get(3)/d.d3mag() ); 00068 00069 } else { 00070 00071 // We have parents therefore calculate things in correct coordinate 00072 // system 00073 EvtVector4R p = _parent->get4vector(product); 00074 EvtVector4R q = get4vector(product); 00075 00076 // See if we have a grandparent - if no then the z-axis is defined by 00077 // the z-axis of the root particle 00078 EvtVector4R g = _parent->getparent()==NULL ? 00079 EvtVector4R(0.0, 0.0, 0.0, 1.0) : 00080 _parent->getparent()->get4vector(product); 00081 00082 theta = acos(EvtDecayAngle(p, q, d)); 00083 phi = EvtDecayAnglePhi( g, p, q, d ); 00084 00085 } 00086 00087 vector<EvtSpinType::spintype> types( 3 ); 00088 types[0] = getspintype(); 00089 types[1] = _children[0]->getspintype(); 00090 types[2] = _children[1]->getspintype(); 00091 EvtSpinAmp amp( types, EvtComplex(0.0, 0.0) ); 00092 vector<int> index = amp.iterallowedinit(); 00093 00094 do { 00095 if( abs(index[1]-index[2]) > _twospin ) continue; 00096 amp(index) += 00097 conj(wignerD(_twospin,index[0],index[1]-index[2],phi,theta,0.0)) * 00098 _amp(index[1],index[2]); 00099 } while(amp.iterateallowed(index)); 00100 00101 EvtSpinAmp amp0 = _children[0]->amplitude(product); 00102 EvtSpinAmp amp1 = _children[1]->amplitude(product); 00103 00104 amp.extcont( amp0, 1, 0 ); 00105 amp.extcont( amp1, 1, 0 ); 00106 00107 amp *= sqrt( ( _twospin + 1 ) / ( 2 * EvtConst::twoPi ) ) * 00108 _children[0]->line(product) * _children[1]->line(product); 00109 00110 return amp; 00111 }
|
|
Implements EvtMNode. 00114 { 00115 vector<EvtMNode *> children; 00116 00117 for( int i=0; i<_children.size(); ++i ) { 00118 children.push_back( _children[i]->duplicate() ); 00119 } 00120 00121 EvtMLineShape * lineshape = _lineshape->duplicate(); 00122 EvtMHelAmp * ret = new EvtMHelAmp( _id, lineshape, children, _elem ); 00123 lineshape->setres( ret ); 00124 00125 return ret; 00126 }
|
|
00006 { 00007 00008 EvtVector4R res(0.0, 0.0, 0.0, 0.0); 00009 vector<int>::const_iterator iter; 00010 00011 for( iter = _resonance.begin(); iter != _resonance.end(); ++iter ) 00012 res += product[ *iter ]; 00013 00014 return res; 00015 00016 }
|
|
00038 { return _id; }
|
|
Implements EvtMNode. 00031 { return _children.size(); }
|
|
00044 { return _parent; }
|
|
00041 { return _resonance; }
|
|
00034 { return _twospin; }
|
|
00035 { return EvtPDL::getSpinType( _id ); }
|
|
Implements EvtMNode. 00034 { return _lineshape->shape( product ); }
|
|
00043 { _parent = parent; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|