Changeset View
Changeset View
Standalone View
Standalone View
src/EvtGenBase/EvtParticle.cpp
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | |||||
void EvtParticle::setLifetime( double tau ) | void EvtParticle::setLifetime( double tau ) | ||||
{ | { | ||||
_t = tau; | _t = tau; | ||||
} | } | ||||
void EvtParticle::setLifetime() | void EvtParticle::setLifetime() | ||||
{ | { | ||||
if ( _genlifetime ) { | if ( _genlifetime ) { | ||||
_t = -log( EvtRandom::Flat() ) * EvtPDL::getctau( getId() ); | _t = EvtPDL::getctau( getId() ); | ||||
if ( _t > 0 ) | |||||
_t *= -log( EvtRandom::Flat() ); | |||||
} | } | ||||
} | } | ||||
double EvtParticle::getLifetime() const | double EvtParticle::getLifetime() const | ||||
{ | { | ||||
return _t; | return _t; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,202 Lines • Show Last 20 Lines |