185 static int iniflag=0;
202 if(istdheppar != 443 && istdheppar != 100443 && istdheppar != 10441 &&istdheppar != 20443 &&istdheppar != 445 &&istdheppar != 10443 &&istdheppar != 441 &&istdheppar!= 30443){
203 std::cout<<
"EvtGen: EvtLundCharm cann't not decay the particle pid= "<<istdheppar<<endl;
218 EvtId evtnumstable[100],evtnumparton[100];
219 int stableindex[100],partonindex[100];
225 static double px[100],py[100],pz[100],e[100];
227 if (iniflag==0)
lundcrm_(&iniflag,&istdheppar,&xmp,&ndaugjs,kf,km,px,py,pz,e, &myflag);
238 lundcrm_(&iniflag,&istdheppar,&xmp,&ndaugjs,kf,km,px,py,pz,e, &myflag);
248 for(i=0;i<ndaugjs;i++){
255 report(
ERROR,
"EvtGen") <<
"LundCharm returned particle:"<<kf[i]<<endl;
256 report(
ERROR,
"EvtGen") <<
"This can not be translated to evt number"<<endl;
257 report(
ERROR,
"EvtGen") <<
"and the decay will be rejected!"<<endl;
258 report(
ERROR,
"EvtGen") <<
"The decay was of particle:"<<ip<<endl;
263 if (
abs(kf[i])<=6||kf[i]==21){
264 partonindex[numparton]=i;
269 stableindex[numstable]=i;
279 if (px[i]*px[i]+py[i]*py[i]+pz[i]*pz[i]>=e[i]*e[i]){
281 e[i]=sqrt(px[i]*px[i]+py[i]*py[i]+pz[i]*pz[i])+0.0000000001;
285 p4[i].
set(e[i],px[i],py[i],pz[i]);
302 if(parityi!=0 && parityf!=0){
303 pflag=(parityi!=parityf);
306 bool eck = fabs(xmp-totEn)>0.01;
308 more=(channel!=-1 || pflag ==1 || eck);
318 }
while( more && (count<10000) );
328 report(
INFO,
"EvtGen") <<
"Too many loops in EvtLundCharm!!!"<<endl;
330 for(i=0;i<numstable;i++){
342 for(i=0;i<numstable;i++){
343 p->
getDaug(i)->
init(evtnumstable[i],p4[stableindex[i]]);
346 if ( ndaugFound == 0 ) {
347 report(
ERROR,
"EvtGen") <<
"Lundcharm has failed to do a decay ";
363 for(i=0;i<numparton;i++){
364 p4string+=p4[partonindex[i]];
369 for(i=0;i<numstable;i++){
370 if (km[stableindex[i]]==0){
371 type[nprimary++]=evtnumstable[i];
381 for(i=0;i<numparton;i++){
382 p4partons[i]=p4[partonindex[i]];
391 for(i=0;i<numstable;i++){
393 if (km[stableindex[i]]==0){
394 p->
getDaug(nprimary++)->
init(evtnumstable[i],p4[stableindex[i]]);
400 for(i=0;i<numstable;i++){
401 if (km[stableindex[i]]!=0){
402 type[nsecond++]=evtnumstable[i];
410 -p4string.
get(2),-p4string.
get(3));
413 for(i=0;i<numstable;i++){
414 if (km[stableindex[i]]!=0){
415 p4[stableindex[i]]=
boostTo(p4[stableindex[i]],p4stringboost);
423 if ( nsecond == 0 ) {
424 report(
ERROR,
"EvtGen") <<
"Jetset has failed to do a decay ";
void lundcrm_(int *, int *, float *, int *, int *, int *, double *, double *, double *, double *, int *)
void setSpinDensityForwardHelicityBasis(const EvtSpinDensity &rho)
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
void setGeneratorFlag(int flag)
void setDiagonalSpinDensity()
const EvtVector4R & getP4() const
EvtParticle * getDaug(int i)
void deleteDaughters(bool keepChannel=false)