Changeset View
Changeset View
Standalone View
Standalone View
src/EvtGenBase/EvtDiracParticle.cpp
Show All 40 Lines | void EvtDiracParticle::init( EvtId part_n, const EvtVector4R& p4 ) | ||||
if ( EvtPDL::getStdHep( part_n ) == 0 ) { | if ( EvtPDL::getStdHep( part_n ) == 0 ) { | ||||
EvtGenReport( EVTGEN_ERROR, "EvtGen" ) | EvtGenReport( EVTGEN_ERROR, "EvtGen" ) | ||||
<< "Error in EvtDiracParticle::init, part_n=" << part_n.getId() | << "Error in EvtDiracParticle::init, part_n=" << part_n.getId() | ||||
<< endl; | << endl; | ||||
::abort(); | ::abort(); | ||||
} | } | ||||
double px = p4.get( 1 ), py = p4.get( 2 ), pz = p4.get( 3 ), e = p4.get( 0 ); | |||||
double p2 = px * px + py * py + pz * pz, m2 = e * e - p2, m = sqrt( m2 ), | |||||
em = e + m; | |||||
double t = sqrt( em ), q = 1 / t; | |||||
double ux = px * q, uy = py * q, uz = pz * q; | |||||
double lm = sqrt( 2.0 * m ); | |||||
EvtComplex o( 0.0, 0.0 ), l( lm, 0.0 ); | |||||
EvtComplex uxy( ux, uy ), cxy = conj( uxy ); | |||||
if ( EvtPDL::getStdHep( part_n ) > 0 ) { | if ( EvtPDL::getStdHep( part_n ) > 0 ) { | ||||
_spinorRest[0].set( EvtComplex( sqrt( 2.0 * mass() ), 0.0 ), | _spinorRest[0].set( l, o, o, o ); | ||||
EvtComplex( 0.0, 0.0 ), EvtComplex( 0.0, 0.0 ), | _spinorRest[1].set( o, l, o, o ); | ||||
EvtComplex( 0.0, 0.0 ) ); | _spinorParent[0].set( t, 0, uz, uxy ); | ||||
_spinorRest[1].set( EvtComplex( 0.0, 0.0 ), | _spinorParent[1].set( 0, t, cxy, -uz ); | ||||
EvtComplex( sqrt( 2.0 * mass() ), 0.0 ), | |||||
EvtComplex( 0.0, 0.0 ), EvtComplex( 0.0, 0.0 ) ); | |||||
_spinorParent[0] = boostTo( _spinorRest[0], p4 ); | |||||
_spinorParent[1] = boostTo( _spinorRest[1], p4 ); | |||||
} else { | } else { | ||||
_spinorRest[0].set( EvtComplex( 0.0, 0.0 ), EvtComplex( 0.0, 0.0 ), | _spinorRest[0].set( o, o, l, o ); | ||||
EvtComplex( sqrt( 2.0 * mass() ), 0.0 ), | _spinorRest[1].set( o, o, o, l ); | ||||
EvtComplex( 0.0, 0.0 ) ); | _spinorParent[0].set( uz, uxy, t, 0 ); | ||||
_spinorRest[1].set( EvtComplex( 0.0, 0.0 ), EvtComplex( 0.0, 0.0 ), | _spinorParent[1].set( cxy, -uz, 0, t ); | ||||
EvtComplex( 0.0, 0.0 ), | |||||
EvtComplex( sqrt( 2.0 * mass() ), 0.0 ) ); | |||||
_spinorParent[0] = boostTo( _spinorRest[0], p4 ); | |||||
_spinorParent[1] = boostTo( _spinorRest[1], p4 ); | |||||
} | } | ||||
// EvtDiracSpinor s0 = boostTo( _spinorRest[0], p4 ); | |||||
// EvtDiracSpinor s1 = boostTo( _spinorRest[1], p4 ); | |||||
// std::cout<< EvtPDL::getStdHep( part_n )<<" "<<_spinorParent[0] - s0<<" "<<_spinorParent[1] - s1 <<std::endl; | |||||
setLifetime(); | setLifetime(); | ||||
} | } | ||||
void EvtDiracParticle::init( EvtId part_n, const EvtVector4R& p4, | void EvtDiracParticle::init( EvtId part_n, const EvtVector4R& p4, | ||||
const EvtDiracSpinor& prod1, | const EvtDiracSpinor& prod1, | ||||
const EvtDiracSpinor& prod2, | const EvtDiracSpinor& prod2, | ||||
const EvtDiracSpinor& rest1, | const EvtDiracSpinor& rest1, | ||||
const EvtDiracSpinor& rest2 ) | const EvtDiracSpinor& rest2 ) | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |