Changeset View
Changeset View
Standalone View
Standalone View
src/EvtGenBase/EvtParticleFactory.cpp
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | EvtGenReport( EVTGEN_ERROR, "EvtGen" ) | ||||
<< "Error in EvtParticleFactory::particleFactory" << endl; | << "Error in EvtParticleFactory::particleFactory" << endl; | ||||
EvtGenReport( EVTGEN_ERROR, "EvtGen" ) | EvtGenReport( EVTGEN_ERROR, "EvtGen" ) | ||||
<< "Tried to create non-existing particle" | << "Tried to create non-existing particle" | ||||
<< " with spin type:" << spinType << endl; | << " with spin type:" << spinType << endl; | ||||
EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Will terminate execution" << endl; | EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Will terminate execution" << endl; | ||||
::abort(); | ::abort(); | ||||
return 0; | return nullptr; | ||||
} | } | ||||
EvtParticle* EvtParticleFactory::particleFactory( EvtId id, EvtVector4R p4, | EvtParticle* EvtParticleFactory::particleFactory( EvtId id, EvtVector4R p4, | ||||
EvtSpinDensity rho ) | EvtSpinDensity rho ) | ||||
{ | { | ||||
EvtSpinType::spintype thisSpin = EvtPDL::getSpinType( id ); | EvtSpinType::spintype thisSpin = EvtPDL::getSpinType( id ); | ||||
if ( thisSpin == EvtSpinType::SCALAR ) { | if ( thisSpin == EvtSpinType::SCALAR ) { | ||||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | EvtParticle* EvtParticleFactory::particleFactory( EvtId id, EvtVector4R p4, | ||||
EvtGenReport( EVTGEN_ERROR, "EvtGen" ) | EvtGenReport( EVTGEN_ERROR, "EvtGen" ) | ||||
<< "Tried to create non-existing particle" | << "Tried to create non-existing particle" | ||||
<< " with spin type:" << thisSpin | << " with spin type:" << thisSpin | ||||
<< " and name:" << EvtPDL::name( id ).c_str() << endl; | << " and name:" << EvtPDL::name( id ).c_str() << endl; | ||||
EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Will terminate execution" << endl; | EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "Will terminate execution" << endl; | ||||
::abort(); | ::abort(); | ||||
return 0; | return nullptr; | ||||
} | } | ||||
EvtParticle* EvtParticleFactory::particleFactory( EvtId id, EvtVector4R p4 ) | EvtParticle* EvtParticleFactory::particleFactory( EvtId id, EvtVector4R p4 ) | ||||
{ | { | ||||
EvtSpinDensity rho; | EvtSpinDensity rho; | ||||
rho.setDiag( EvtSpinType::getSpinStates( EvtPDL::getSpinType( id ) ) ); | rho.setDiag( EvtSpinType::getSpinStates( EvtPDL::getSpinType( id ) ) ); | ||||
return particleFactory( id, p4, rho ); | return particleFactory( id, p4, rho ); | ||||
} | } |