201 static int iniflag=0;
233 EvtId evtnumstable[100],evtnumparton[100];
234 int stableindex[100],partonindex[100];
243 static double px[100],py[100],pz[100],e[100];
244 if (iniflag==0)
lundar_(&isr,&iniflag,&xmp,&ndaugjs,kf,km,px,py,pz,e);
253 lundar_(&isr,&iniflag,&xmp,&ndaugjs,kf,km,px,py,pz,e);
258 for(i=0;i<ndaugjs;i++){
262 report(
ERROR,
"EvtGen") <<
"Lunda returned particle:"<<kf[i]<<endl;
263 report(
ERROR,
"EvtGen") <<
"This can not be translated to evt number"<<endl;
264 report(
ERROR,
"EvtGen") <<
"and the decay will be rejected!"<<endl;
265 report(
ERROR,
"EvtGen") <<
"The decay was of particle:"<<ip<<endl;
270 if (
abs(kf[i])<=6||kf[i]==21){
271 partonindex[numparton]=i;
276 stableindex[numstable]=i;
286 if (px[i]*px[i]+py[i]*py[i]+pz[i]*pz[i]>=e[i]*e[i]){
288 e[i]=sqrt(px[i]*px[i]+py[i]*py[i]+pz[i]*pz[i])+0.0000000001;
292 p4[i].
set(e[i],px[i],py[i],pz[i]);
316 }
while( more && (count<10000) );
319 report(
INFO,
"EvtGen") <<
"Too many loops in EvtLunda!!!"<<endl;
321 for(i=0;i<numstable;i++){
333 for(i=0;i<numstable;i++){
334 p->
getDaug(i)->
init(evtnumstable[i],p4[stableindex[i]]);
337 if ( ndaugFound == 0 ) {
338 report(
ERROR,
"EvtGen") <<
"Lunda has failed to do a decay ";
354 for(i=0;i<numparton;i++){
355 p4string+=p4[partonindex[i]];
360 for(i=0;i<numstable;i++){
361 if (km[stableindex[i]]==0){
362 type[nprimary++]=evtnumstable[i];
372 for(i=0;i<numparton;i++){
373 p4partons[i]=p4[partonindex[i]];
382 for(i=0;i<numstable;i++){
384 if (km[stableindex[i]]==0){
385 p->
getDaug(nprimary++)->
init(evtnumstable[i],p4[stableindex[i]]);
391 for(i=0;i<numstable;i++){
392 if (km[stableindex[i]]!=0){
393 type[nsecond++]=evtnumstable[i];
401 -p4string.
get(2),-p4string.
get(3));
404 for(i=0;i<numstable;i++){
405 if (km[stableindex[i]]!=0){
406 p4[stableindex[i]]=
boostTo(p4[stableindex[i]],p4stringboost);
414 if ( nsecond == 0 ) {
415 report(
ERROR,
"EvtGen") <<
"Jetset has failed to do a decay ";
void lundar_(int *, int *, float *, int *, int *, int *, double *, double *, double *, double *)
void setSpinDensityForwardHelicityBasis(const EvtSpinDensity &rho)
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
void setDiagonalSpinDensity()
const EvtVector4R & getP4() const
EvtParticle * getDaug(int i)
void deleteDaughters(bool keepChannel=false)