144 static int iniflag = 0;
164 EvtId evtnumstable[20], evtnumparton[20];
165 int stableindex[20], partonindex[20];
171 static double px[20], py[20], pz[20], e[20];
175 if ( iniflag == 0 )
dectes_( &iniflag, &idtau, &ndaugjs, kf, km, px, py, pz, e );
183 iniflag = iniflag + 1;
184 dectes_( &iniflag, &idtau, &ndaugjs, kf, km, px, py, pz, e );
189 for ( i = 0; i < ndaugjs; i++ )
196 report(
ERROR,
"EvtGen" ) <<
"Tauola returned particle:" << kf[i] << endl;
197 report(
ERROR,
"EvtGen" ) <<
"This can not be translated to evt number" << endl;
198 report(
ERROR,
"EvtGen" ) <<
"and the decay will be rejected!" << endl;
199 report(
ERROR,
"EvtGen" ) <<
"The decay was of particle:" << idtau << endl;
203 if (
abs( kf[i] ) <= 6 || kf[i] == 21 )
205 partonindex[numparton] = i;
211 stableindex[numstable] = i;
220 if ( px[i] * px[i] + py[i] * py[i] + pz[i] * pz[i] >= e[i] * e[i] )
221 { e[i] = sqrt( px[i] * px[i] + py[i] * py[i] + pz[i] * pz[i] ) + 0.0000000001; }
223 p4[i].
set( e[i], px[i], py[i], pz[i] );
228 more = ( channel != -1 );
232 }
while ( more && (
count < 10000 ) );
236 report(
INFO,
"EvtGen" ) <<
"Too many loops in EvtTauola!!!" << endl;
238 for ( i = 0; i < numstable; i++ )
240 report(
INFO,
"EvtGen" ) <<
"Daug(" << i <<
")"
245 if ( numparton == 0 )
250 for ( i = 0; i < numstable; i++ )
252 p->
getDaug( i )->
init( evtnumstable[i], p4[stableindex[i]] );
255 if ( ndaugFound == 0 )
257 report(
ERROR,
"EvtGen" ) <<
"Tauola has failed to do a decay ";
263 fixPolarizations( p );
274 for ( i = 0; i < numparton; i++ ) { p4string += p4[partonindex[i]]; }
278 for ( i = 0; i < numstable; i++ )
280 if ( km[stableindex[i]] == 0 ) {
type[nprimary++] = evtnumstable[i]; }
289 for ( i = 0; i < numparton; i++ ) { p4partons[i] = p4[partonindex[i]]; }
295 for ( i = 0; i < numstable; i++ )
298 if ( km[stableindex[i]] == 0 )
299 { p->
getDaug( nprimary++ )->
init( evtnumstable[i], p4[stableindex[i]] ); }
303 for ( i = 0; i < numstable; i++ )
305 if ( km[stableindex[i]] != 0 ) {
type[nsecond++] = evtnumstable[i]; }
311 -p4string.
get( 3 ) );
314 for ( i = 0; i < numstable; i++ )
316 if ( km[stableindex[i]] != 0 )
318 p4[stableindex[i]] =
boostTo( p4[stableindex[i]], p4stringboost );
328 report(
ERROR,
"EvtGen" ) <<
"Jetset has failed to do a decay ";
334 fixPolarizations( p );
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)