177 static int iniflag=0;
198 EvtId evtnumstable[20],evtnumparton[20];
199 int stableindex[20],partonindex[20];
205 static double px[20],py[20],pz[20],e[20];
208 if (iniflag==0)
dectes_(&iniflag,&idtau,&ndaugjs,kf,km,px,py,pz,e);
217 dectes_(&iniflag,&idtau,&ndaugjs,kf,km,px,py,pz,e);
222 for(i=0;i<ndaugjs;i++){
226 report(
ERROR,
"EvtGen") <<
"Tauola returned particle:"<<kf[i]<<endl;
227 report(
ERROR,
"EvtGen") <<
"This can not be translated to evt number"<<endl;
228 report(
ERROR,
"EvtGen") <<
"and the decay will be rejected!"<<endl;
229 report(
ERROR,
"EvtGen") <<
"The decay was of particle:"<<idtau<<endl;
234 if (
abs(kf[i])<=6||kf[i]==21){
235 partonindex[numparton]=i;
240 stableindex[numstable]=i;
250 if (px[i]*px[i]+py[i]*py[i]+pz[i]*pz[i]>=e[i]*e[i]){
252 e[i]=sqrt(px[i]*px[i]+py[i]*py[i]+pz[i]*pz[i])+0.0000000001;
256 p4[i].set(e[i],px[i],py[i],pz[i]);
269 }
while( more && (
count<10000) );
272 report(
INFO,
"EvtGen") <<
"Too many loops in EvtTauola!!!"<<endl;
274 for(i=0;i<numstable;i++){
286 for(i=0;i<numstable;i++){
290 if ( ndaugFound == 0 ) {
291 report(
ERROR,
"EvtGen") <<
"Tauola has failed to do a decay ";
307 for(i=0;i<numparton;i++){
308 p4string+=
p4[partonindex[i]];
313 for(i=0;i<numstable;i++){
314 if (km[stableindex[i]]==0){
315 type[nprimary++]=evtnumstable[i];
325 for(i=0;i<numparton;i++){
326 p4partons[i]=
p4[partonindex[i]];
335 for(i=0;i<numstable;i++){
337 if (km[stableindex[i]]==0){
338 p->
getDaug(nprimary++)->
init(evtnumstable[i],
p4[stableindex[i]]);
344 for(i=0;i<numstable;i++){
345 if (km[stableindex[i]]!=0){
346 type[nsecond++]=evtnumstable[i];
354 -p4string.
get(2),-p4string.
get(3));
357 for(i=0;i<numstable;i++){
358 if (km[stableindex[i]]!=0){
359 p4[stableindex[i]]=
boostTo(
p4[stableindex[i]],p4stringboost);
367 if ( nsecond == 0 ) {
368 report(
ERROR,
"EvtGen") <<
"Jetset has failed to do a decay ";
void dectes_(int *, int *, 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)