00001 #include "EvtGenBase/EvtPatches.hh" 00002 #include "EvtGenBase/EvtMParticle.hh" 00003 #include "EvtGenBase/EvtSpinType.hh" 00004 00005 EvtMParticle::EvtMParticle( int label, const EvtId& id ) 00006 { 00007 _id = id; 00008 _twospin = EvtSpinType::getSpin2( EvtPDL::getSpinType( id ) ); 00009 _resonance.push_back( label ); 00010 } 00011 00012 EvtSpinAmp EvtMParticle::amplitude( const vector<EvtVector4R> &product) const 00013 { 00014 vector<EvtSpinType::spintype> types( 2, getspintype() ); 00015 EvtSpinAmp amp( types, EvtComplex( 0.0, 0.0 ) ); 00016 00017 for( int i=-_twospin; i<=_twospin; i+=2 ) 00018 amp(i, i) = EvtComplex( 1.0, 0.0 ); 00019 00020 return amp; 00021 } 00022 00023 EvtMNode * EvtMParticle::duplicate() const 00024 { 00025 return new EvtMParticle( _resonance[0], _id ); 00026 }