BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtJetSet.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtJetSet.cc
12//
13// Description: Routine to use JetSet for decaying particles.
14//
15// Modification history:
16//
17// RYD July 24, 1997 Module created
18//
19//------------------------------------------------------------------------
20//
21#include "EvtJetSet.hh"
29#include <fstream>
30#include <iomanip>
31#include <iostream>
32#include <stdio.h>
33#include <stdlib.h>
34#include <string.h>
35#include <string>
36#include <unistd.h>
37using std::endl;
38using std::fstream;
39using std::ios;
40using std::ofstream;
41using std::resetiosflags;
42using std::setiosflags;
43using std::setw;
44
45int EvtJetSet::njetsetdecays = 0;
46EvtDecayBasePtr* EvtJetSet::jetsetdecays = 0;
47int EvtJetSet::ntable = 0;
48
49int EvtJetSet::ncommand = 0;
50int EvtJetSet::lcommand = 0;
51std::string* EvtJetSet::commands = 0;
52
53extern "C" {
54extern void evtjetsetinit_( char* fname, int len );
55}
56
57extern "C" {
58extern void jetset1_( int*, double*, int*, int*, int*, double*, double*, double*, double* );
59}
60
61extern "C" {
62extern void lugive_( const char* cnfgstr, int length );
63}
64
65extern "C" {
66extern int lucomp_( int* kf );
67}
68
70
72
73 int i;
74
75 // the deletion of commands is really uggly!
76
77 if ( njetsetdecays == 0 )
78 {
79 delete[] commands;
80 commands = 0;
81 return;
82 }
83
84 for ( i = 0; i < njetsetdecays; i++ )
85 {
86 if ( jetsetdecays[i] == this )
87 {
88 jetsetdecays[i] = jetsetdecays[njetsetdecays - 1];
89 njetsetdecays--;
90 if ( njetsetdecays == 0 )
91 {
92 delete[] commands;
93 commands = 0;
94 }
95 return;
96 }
97 }
98
99 report( ERROR, "EvtGen" ) << "Error in destroying JetSet model!" << endl;
100}
101
102void EvtJetSet::getName( std::string& model_name ) { model_name = "JETSET"; }
103
105
107
109
110 checkNArg( 1 );
111
112 if ( getParentId().isAlias() )
113 {
114
115 report( ERROR, "EvtGen" ) << "EvtJetSet finds that you are decaying the" << endl
116 << " aliased particle " << EvtPDL::name( getParentId() ).c_str()
117 << " with the JetSet model" << endl
118 << " this does not work, please modify decay table." << endl;
119 report( ERROR, "EvtGen" ) << "Will terminate execution!" << endl;
120 ::abort();
121 }
122
123 store( this );
124}
125
126std::string EvtJetSet::commandName() { return std::string( "JetSetPar" ); }
127
128void EvtJetSet::command( std::string cmd ) {
129
130 if ( ncommand == lcommand )
131 {
132
133 lcommand = 10 + 2 * lcommand;
134
135 std::string* newcommands = new std::string[lcommand];
136
137 int i;
138
139 for ( i = 0; i < ncommand; i++ ) { newcommands[i] = commands[i]; }
140
141 delete[] commands;
142
143 commands = newcommands;
144 }
145
146 commands[ncommand] = cmd;
147
148 ncommand++;
149}
150
152
153 // added by Lange Jan4,2000
154 static EvtId STRNG = EvtPDL::getId( "string" );
155
156 int istdheppar = EvtPDL::getStdHep( p->getId() );
157
158 if ( lucomp_( &istdheppar ) == 0 )
159 {
160 report( ERROR, "EvtGen" ) << "Jetset can not decay:" << EvtPDL::name( p->getId() ).c_str()
161 << endl;
162 return;
163 }
164
165 double mp = p->mass();
166
167 EvtVector4R p4[20];
168
169 int i, more;
170 int ip = EvtPDL::getStdHep( p->getId() );
171 int ndaugjs;
172 int kf[100];
173 EvtId evtnumstable[100], evtnumparton[100];
174 int stableindex[100], partonindex[100];
175 int numstable;
176 int numparton;
177 int km[100];
179
180 jetSetInit();
181
182 double px[100], py[100], pz[100], e[100];
183
184 if ( p->getNDaug() != 0 ) { p->deleteDaughters( true ); }
185
186 int count = 0;
187
188 do {
189 // report(INFO,"EvtGen") << "calling jetset " << ip<< " " << mp <<endl;
190 jetset1_( &ip, &mp, &ndaugjs, kf, km, px, py, pz, e );
191
192 numstable = 0;
193 numparton = 0;
194 // report(INFO,"EvtGen") << "found some daughters " << ndaugjs << endl;
195 for ( i = 0; i < ndaugjs; i++ )
196 {
197
198 if ( EvtPDL::evtIdFromStdHep( kf[i] ) == EvtId( -1, -1 ) )
199 {
200 report( ERROR, "EvtGen" ) << "JetSet returned particle:" << kf[i] << endl;
201 report( ERROR, "EvtGen" ) << "This can not be translated to evt number" << endl;
202 report( ERROR, "EvtGen" ) << "and the decay will be rejected!" << endl;
203 report( ERROR, "EvtGen" ) << "The decay was of particle:" << ip << endl;
204 }
205
206 // sort out the partons
207 if ( abs( kf[i] ) <= 6 || kf[i] == 21 )
208 {
209 partonindex[numparton] = i;
210 evtnumparton[numparton] = EvtPDL::evtIdFromStdHep( kf[i] );
211 numparton++;
212 }
213 else
214 {
215 stableindex[numstable] = i;
216 evtnumstable[numstable] = EvtPDL::evtIdFromStdHep( kf[i] );
217 numstable++;
218 }
219
220 // have to protect against negative mass^2 for massless particles
221 // i.e. neutrinos and photons.
222 // this is uggly but I need to fix it right now....
223
224 if ( px[i] * px[i] + py[i] * py[i] + pz[i] * pz[i] >= e[i] * e[i] )
225 { e[i] = sqrt( px[i] * px[i] + py[i] * py[i] + pz[i] * pz[i] ) + 0.0000000000001; }
226
227 p4[i].set( e[i], px[i], py[i], pz[i] );
228 }
229
230 int channel = EvtDecayTable::inChannelList( p->getId(), numstable, evtnumstable );
231
232 more = ( channel != -1 );
233
234 count++;
235
236 } while ( more && ( count < 10000 ) );
237
238 if ( count > 9999 )
239 {
240 report( INFO, "EvtGen" ) << "Too many loops in EvtJetSet!!!" << endl;
241 report( INFO, "EvtGen" ) << "Parent:" << EvtPDL::name( getParentId() ).c_str() << endl;
242 for ( i = 0; i < numstable; i++ )
243 {
244 report( INFO, "EvtGen" ) << "Daug(" << i << ")"
245 << EvtPDL::name( evtnumstable[i] ).c_str() << endl;
246 }
247 }
248
249 if ( numparton == 0 )
250 {
251
252 p->makeDaughters( numstable, evtnumstable );
253 int ndaugFound = 0;
254 for ( i = 0; i < numstable; i++ )
255 {
256 p->getDaug( i )->init( evtnumstable[i], p4[stableindex[i]] );
257 ndaugFound++;
258 }
259 if ( ndaugFound == 0 )
260 {
261 report( ERROR, "EvtGen" ) << "Jetset has failed to do a decay ";
262 report( ERROR, "EvtGen" ) << EvtPDL::name( p->getId() ).c_str() << " " << p->mass()
263 << endl;
264 assert( 0 );
265 }
266
267 fixPolarizations( p );
268
269 return;
270 }
271 else
272 {
273
274 // have partons in JETSET
275
276 EvtVector4R p4string( 0.0, 0.0, 0.0, 0.0 );
277
278 for ( i = 0; i < numparton; i++ ) { p4string += p4[partonindex[i]]; }
279
280 int nprimary = 1;
281 type[0] = STRNG;
282 for ( i = 0; i < numstable; i++ )
283 {
284 if ( km[stableindex[i]] == 0 ) { type[nprimary++] = evtnumstable[i]; }
285 }
286
287 p->makeDaughters( nprimary, type );
288
289 p->getDaug( 0 )->init( STRNG, p4string );
290
291 EvtVector4R p4partons[10];
292
293 for ( i = 0; i < numparton; i++ ) { p4partons[i] = p4[partonindex[i]]; }
294
295 ( (EvtStringParticle*)p->getDaug( 0 ) )->initPartons( numparton, p4partons, evtnumparton );
296
297 nprimary = 1;
298
299 for ( i = 0; i < numstable; i++ )
300 {
301
302 if ( km[stableindex[i]] == 0 )
303 { p->getDaug( nprimary++ )->init( evtnumstable[i], p4[stableindex[i]] ); }
304 }
305
306 int nsecond = 0;
307 for ( i = 0; i < numstable; i++ )
308 {
309 if ( km[stableindex[i]] != 0 ) { type[nsecond++] = evtnumstable[i]; }
310 }
311
312 p->getDaug( 0 )->makeDaughters( nsecond, type );
313
314 EvtVector4R p4stringboost( p4string.get( 0 ), -p4string.get( 1 ), -p4string.get( 2 ),
315 -p4string.get( 3 ) );
316
317 nsecond = 0;
318 for ( i = 0; i < numstable; i++ )
319 {
320 if ( km[stableindex[i]] != 0 )
321 {
322 p4[stableindex[i]] = boostTo( p4[stableindex[i]], p4stringboost );
323 p->getDaug( 0 )->getDaug( nsecond )->init( evtnumstable[i], p4[stableindex[i]] );
324 p->getDaug( 0 )->getDaug( nsecond )->setDiagonalSpinDensity();
325 p->getDaug( 0 )->getDaug( nsecond )->decay();
326 nsecond++;
327 }
328 }
329
330 if ( nsecond == 0 )
331 {
332 report( ERROR, "EvtGen" ) << "Jetset has failed to do a decay ";
333 report( ERROR, "EvtGen" ) << EvtPDL::name( p->getId() ).c_str() << " " << p->mass()
334 << endl;
335 assert( 0 );
336 }
337
338 fixPolarizations( p );
339
340 return;
341 }
342}
343
344void EvtJetSet::fixPolarizations( EvtParticle* p ) {
345
346 // special case for now to handle the J/psi polarization
347
348 int ndaug = p->getNDaug();
349
350 int i;
351
352 static EvtId Jpsi = EvtPDL::getId( "J/psi" );
353
354 for ( i = 0; i < ndaug; i++ )
355 {
356 if ( p->getDaug( i )->getId() == Jpsi )
357 {
358
359 EvtSpinDensity rho;
360
361 rho.SetDim( 3 );
362 rho.Set( 0, 0, 0.5 );
363 rho.Set( 0, 1, 0.0 );
364 rho.Set( 0, 2, 0.0 );
365
366 rho.Set( 1, 0, 0.0 );
367 rho.Set( 1, 1, 1.0 );
368 rho.Set( 1, 2, 0.0 );
369
370 rho.Set( 2, 0, 0.0 );
371 rho.Set( 2, 1, 0.0 );
372 rho.Set( 2, 2, 0.5 );
373
374 EvtVector4R p4Psi = p->getDaug( i )->getP4();
375
376 double alpha = atan2( p4Psi.get( 2 ), p4Psi.get( 1 ) );
377 double beta = acos( p4Psi.get( 3 ) / p4Psi.d3mag() );
378
379 p->getDaug( i )->setSpinDensityForwardHelicityBasis( rho, alpha, beta, 0.0 );
381 }
382 }
383}
384
385void EvtJetSet::store( EvtDecayBase* jsdecay ) {
386
387 if ( njetsetdecays == ntable )
388 {
389
390 EvtDecayBasePtr* newjetsetdecays = new EvtDecayBasePtr[2 * ntable + 10];
391 int i;
392 for ( i = 0; i < ntable; i++ ) { newjetsetdecays[i] = jetsetdecays[i]; }
393 ntable = 2 * ntable + 10;
394 delete[] jetsetdecays;
395 jetsetdecays = newjetsetdecays;
396 }
397
398 jetsetdecays[njetsetdecays++] = jsdecay;
399}
400
401void EvtJetSet::WriteJetSetEntryHeader( ofstream& outdec, int lundkc, EvtId evtnum,
402 std::string name, int chg, int cchg, int spin2,
403 double mass, double width, double maxwidth,
404 double ctau, int stable, double rawbrfrsum ) {
405
406 char sname[100];
407
408 int namelength = 8;
409
410 int i, j;
411 int temp;
412 temp = spin2;
413
414 if ( ctau > 1000000.0 ) ctau = 0.0;
415
416 strcpy( sname, name.c_str() );
417
418 i = 0;
419
420 while ( sname[i] != 0 ) { i++; }
421
422 // strip up to two + or -
423
424 if ( evtnum.getId() >= 0 )
425 {
426 if ( sname[i - 1] == '+' || sname[i - 1] == '-' )
427 {
428 sname[i - 1] = 0;
429 i--;
430 }
431 if ( sname[i - 1] == '+' || sname[i - 1] == '-' )
432 {
433 sname[i - 1] = 0;
434 i--;
435 }
436 // strip 0 except for _0 and chi...0
437 if ( sname[i - 1] == '0' && sname[i - 2] != '_' &&
438 !( sname[0] == 'c' && sname[1] == 'h' ) )
439 {
440 sname[i - 1] = 0;
441 i--;
442 }
443 }
444
445 if ( i > namelength )
446 {
447 for ( j = 1; j < namelength; j++ ) { sname[j] = sname[j + i - namelength]; }
448 sname[namelength] = 0;
449 }
450
451 cchg = 0;
452
453 if ( evtnum.getId() >= 0 )
454 {
455 if ( abs( EvtPDL::getStdHep( evtnum ) ) == 21 ) cchg = 2;
456 if ( abs( EvtPDL::getStdHep( evtnum ) ) == 90 ) cchg = -1;
457 if ( ( abs( EvtPDL::getStdHep( evtnum ) ) <= 8 ) &&
458 ( abs( EvtPDL::getStdHep( evtnum ) ) != 0 ) )
459 cchg = 1;
460 }
461
462 outdec << setw( 5 ) << lundkc << " ";
463 outdec.width( namelength );
464 outdec << setiosflags( ios::left ) << sname << resetiosflags( ios::left );
465 outdec << setw( 3 ) << chg;
466 outdec << setw( 3 ) << cchg;
467 outdec.width( 3 );
468 if ( evtnum.getId() >= 0 )
469 {
470 if ( EvtPDL::chargeConj( evtnum ) == evtnum ) { outdec << 0; }
471 else { outdec << 1; }
472 }
473 else { outdec << 0; }
474 outdec.setf( ios::fixed );
475 outdec.precision( 5 );
476 outdec << setw( 12 ) << mass;
477 outdec << setw( 12 ) << width;
478 outdec.width( 12 );
479 if ( fabs( width ) < 0.0000000001 ) { outdec << 0.0; }
480 else { outdec << maxwidth; }
481 outdec << setw( 14 ) << ctau;
482 outdec.width( 3 );
483 if ( evtnum.getId() >= 0 )
484 {
485 if ( ctau > 1.0 || rawbrfrsum < 0.000001 ) { stable = 0; }
486 }
487 outdec << stable;
488 outdec << endl;
489 outdec.width( 0 );
490}
491
492void EvtJetSet::WriteJetSetParticle( ofstream& outdec, EvtId ipar, EvtId iparname,
493 int& first ) {
494
495 int ijetset;
496
497 double br_sum = 0.0;
498
499 for ( ijetset = 0; ijetset < njetsetdecays; ijetset++ )
500 {
501
502 if ( jetsetdecays[ijetset]->getParentId() == ipar )
503 { br_sum += jetsetdecays[ijetset]->getBranchingFraction(); }
504 if ( jetsetdecays[ijetset]->getParentId() !=
505 EvtPDL::chargeConj( jetsetdecays[ijetset]->getParentId() ) &&
506 EvtPDL::chargeConj( jetsetdecays[ijetset]->getParentId() ) == ipar )
507 { br_sum += jetsetdecays[ijetset]->getBranchingFraction(); }
508 }
509
510 double br_sum_true = br_sum;
511
512 if ( br_sum < 0.000001 ) br_sum = 1.0;
513
514 for ( ijetset = 0; ijetset < njetsetdecays; ijetset++ )
515 {
516 if ( jetsetdecays[ijetset]->getParentId() == ipar )
517 {
518
519 double br = jetsetdecays[ijetset]->getBranchingFraction();
520
521 int i, daugs[5];
522 EvtId cdaugs[5];
523
524 for ( i = 0; i < 5; i++ )
525 {
526
527 if ( i < jetsetdecays[ijetset]->getNDaug() )
528 {
529 daugs[i] = EvtPDL::getStdHep( jetsetdecays[ijetset]->getDaugs()[i] );
530 cdaugs[i] = EvtPDL::chargeConj( jetsetdecays[ijetset]->getDaugs()[i] );
531 }
532 else { daugs[i] = 0; }
533 }
534
535 int channel;
536
538 EvtPDL::chargeConj( ipar ), jetsetdecays[ijetset]->getModelName(),
539 jetsetdecays[ijetset]->getNDaug(), cdaugs, jetsetdecays[ijetset]->getNArg(),
540 jetsetdecays[ijetset]->getArgsStr() );
541
542 if ( jetsetdecays[ijetset]->getModelName() == "JETSET" )
543 {
544
545 if ( first )
546 {
547 first = 0;
548 WriteJetSetEntryHeader( outdec, EvtPDL::getLundKC( iparname ), iparname,
549 EvtPDL::name( iparname ), EvtPDL::chg3( iparname ), 0, 0,
550 EvtPDL::getMeanMass( ipar ), EvtPDL::getWidth( ipar ),
551 EvtPDL::getMeanMass( ipar ) - EvtPDL::getMinMass( ipar ),
552 EvtPDL::getctau( ipar ), 1, br_sum_true );
553 }
554
555 int dflag = 2;
556
557 if ( EvtPDL::getStdHep( ipar ) < 0 )
558 {
559 dflag = 3;
560 for ( i = 0; i < jetsetdecays[ijetset]->getNDaug(); i++ )
561 { daugs[i] = EvtPDL::getStdHep( cdaugs[i] ); }
562 }
563
564 // now lets check to make sure that jetset, lucomp, knows
565 // about all particles!
566 int unknown = 0;
567 for ( i = 0; i < jetsetdecays[ijetset]->getNDaug(); i++ )
568 {
569 if ( lucomp_( &daugs[i] ) == 0 )
570 {
571 unknown = 1;
572 report( ERROR, "EvtGen" )
573 << "JetSet (lucomp) does not "
574 << "know the particle:"
575 << EvtPDL::name( jetsetdecays[ijetset]->getDaugs()[i] ).c_str() << endl;
576 }
577 }
578
579 int istdheppar = EvtPDL::getStdHep( ipar );
580
581 if ( lucomp_( &istdheppar ) == 0 )
582 {
583 unknown = 1;
584 report( ERROR, "EvtGen" )
585 << "JetSet (lucomp) does not "
586 << "know the particle:" << EvtPDL::name( ipar ).c_str() << endl;
587 }
588
589 if ( unknown )
590 {
591 report( ERROR, "EvtGen" ) << "Therfore the decay:" << endl;
592 report( ERROR, "EvtGen" )
593 << EvtPDL::name( jetsetdecays[ijetset]->getParentId() ).c_str() << " -> ";
594 for ( i = 0; i < jetsetdecays[ijetset]->getNDaug(); i++ )
595 {
596 report( ERROR, "" ) << EvtPDL::name( jetsetdecays[ijetset]->getDaugs()[i] ).c_str()
597 << " ";
598 }
599 report( ERROR, "" ) << endl;
600 report( ERROR, "EvtGen" ) << "Will not be generated." << endl;
601 return;
602 }
603
604 if ( EvtPDL::chargeConj( ipar ) == ipar )
605 {
606 dflag = 1;
607 // report(INFO,"EvtGen") << EvtPDL::name(iparname) << " dflag=1 because
608 // C(ipar)=ipar!"<<endl;
609 }
610
611 // if (channel>=0) {
612 // dflag=1;
613 // report(INFO,"EvtGen") << EvtPDL::name(iparname) << " dflag=1 because
614 // channel>=0"<<endl;
615 //}
616
617 // if (!(EvtPDL::getStdHep(ipar)<0&&channel>=0)){
618 if ( 1 )
619 {
620
621 outdec.width( 10 );
622 outdec << dflag;
623 outdec.width( 5 );
624 outdec << (int)jetsetdecays[ijetset]->getArgs()[0];
625 outdec.width( 12 );
626 if ( fabs( br ) < 0.000000001 ) { outdec << "0.00000"; }
627 else { outdec << br / br_sum; }
628 outdec.width( 8 );
629 outdec << daugs[0];
630 outdec.width( 8 );
631 outdec << daugs[1];
632 outdec.width( 8 );
633 outdec << daugs[2];
634 outdec.width( 8 );
635 outdec << daugs[3];
636 outdec.width( 8 );
637 outdec << daugs[4];
638 outdec << endl;
639 outdec.width( 0 );
640 }
641 }
642 }
643 }
644}
645
646void EvtJetSet::MakeJetSetFile( char* fname ) {
647
648 EvtId ipar;
649 int lundkc;
650
651 // int part_list[MAX_PART];
652
653 ofstream outdec;
654
655 outdec.open( fname );
656
657 // outdec << ";"<<endl;
658 // outdec << ";This decayfile has been automatically created by"<<endl;
659 // outdec << ";EvtGen from the DECAY.DEC file"<<endl;
660 // outdec << ";"<<endl;
661
662 int nokcentry;
663
664 for ( lundkc = 1; lundkc <= 500; lundkc++ )
665 {
666
667 nokcentry = 1;
668
669 int iipar;
670
671 for ( iipar = 0; iipar < EvtPDL::entries(); iipar++ )
672 {
673
674 ipar = EvtId( iipar, iipar );
675 // no aliased particles!
676 std::string tempStr = EvtPDL::name( ipar );
677 EvtId realId = EvtPDL::getId( tempStr );
678 if ( realId.isAlias() != 0 ) continue;
679 if ( lundkc == EvtPDL::getLundKC( ipar ) )
680 {
681
682 nokcentry = 0;
683
684 int first = 1;
685
686 WriteJetSetParticle( outdec, ipar, ipar, first );
687
688 EvtId ipar2 = EvtPDL::chargeConj( ipar );
689
690 if ( ipar2 != ipar ) { WriteJetSetParticle( outdec, ipar2, ipar, first ); }
691
692 if ( first )
693 {
694 WriteJetSetEntryHeader( outdec, EvtPDL::getLundKC( ipar ), ipar,
695 EvtPDL::name( ipar ), EvtPDL::chg3( ipar ), 0, 0,
696 EvtPDL::getMeanMass( ipar ), EvtPDL::getWidth( ipar ),
697 EvtPDL::getMeanMass( ipar ) - EvtPDL::getMinMass( ipar ),
698 EvtPDL::getctau( ipar ), 0, 0.0 );
699 }
700 }
701 }
702 if ( nokcentry )
703 {
704
705 WriteJetSetEntryHeader( outdec, lundkc, EvtId( -1, -1 ), " ", 0, 0, 0,
706 EvtPDL::getMeanMass( ipar ), 0.0, 0.0, EvtPDL::getctau( ipar ),
707 0, 0.0 );
708 }
709 }
710 outdec.close();
711}
712
714
715 static int first = 1;
716
717 if ( first )
718 {
719
720 first = 0;
721
722 report( INFO, "EvtGen" ) << "Will initialize JetSet." << endl;
723
724 char fname[200];
725
726 char hostBuffer[100];
727
728 if ( gethostname( hostBuffer, 100 ) != 0 )
729 {
730 report( ERROR, "EvtGen" ) << " couldn't get hostname." << endl;
731 strncpy( hostBuffer, "hostnameNotFound", 100 );
732 }
733
734 char pid[100];
735
736 int thePid = getpid();
737
738 if ( sprintf( pid, "%d", thePid ) == 0 )
739 {
740 report( ERROR, "EvtGen" ) << " couldn't get process ID." << endl;
741 strncpy( pid, "666", 100 );
742 }
743
744 strcpy( fname, "jet.d-" );
745 strcat( fname, hostBuffer );
746 strcat( fname, "-" );
747 strcat( fname, pid );
748
749 MakeJetSetFile( fname );
750 evtjetsetinit_( fname, strlen( fname ) );
751
752 if ( 0 == getenv( "EVTSAVEJETD" ) )
753 {
754 char delcmd[300];
755 strcpy( delcmd, "rm -f " );
756 strcat( delcmd, fname );
757 system( delcmd );
758 }
759
760 int i;
761
762 for ( i = 0; i < ncommand; i++ )
763 { lugive_( commands[i].c_str(), strlen( commands[i].c_str() ) ); }
764
765 report( INFO, "EvtGen" ) << "Done initializing JetSet." << endl;
766 }
767}
double mass
sprintf(cut, "kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_" "pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)
EvtDecayBase * EvtDecayBasePtr
EvtDiracSpinor boostTo(const EvtDiracSpinor &sp, const EvtVector4R p4)
void lugive_(const char *cnfgstr, int length)
int lucomp_(int *kf)
void evtjetsetinit_(char *fname, int len)
void jetset1_(int *, double *, int *, int *, int *, double *, double *, double *, double *)
EvtDecayBase * EvtDecayBasePtr
Definition EvtJetSet.hh:28
const int MAX_DAUG
DOUBLE_PRECISION count[3]
double alpha
double mp
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
@ INFO
Definition EvtReport.hh:52
std::string * getArgsStr()
std::string getModelName()
EvtId getParentId()
double * getArgs()
EvtId * getDaugs()
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
void setDaughterSpinDensity(int daughter)
static int findChannel(EvtId parent, std::string model, int ndaug, EvtId *daugs, int narg, std::string *args)
static int inChannelList(EvtId parent, int ndaug, EvtId *daugs)
Definition EvtId.hh:27
int getId() const
Definition EvtId.hh:40
int isAlias() const
Definition EvtId.hh:44
virtual ~EvtJetSet()
Definition EvtJetSet.cc:71
void command(std::string cmd)
Definition EvtJetSet.cc:128
static void jetSetInit()
Definition EvtJetSet.cc:713
EvtDecayBase * clone()
Definition EvtJetSet.cc:104
void initProbMax()
Definition EvtJetSet.cc:106
void decay(EvtParticle *p)
Definition EvtJetSet.cc:151
void init()
Definition EvtJetSet.cc:108
void getName(std::string &name)
Definition EvtJetSet.cc:102
std::string commandName()
Definition EvtJetSet.cc:126
static double getWidth(EvtId i)
Definition EvtPDL.hh:59
static int getStdHep(EvtId id)
Definition EvtPDL.hh:61
static double getMeanMass(EvtId i)
Definition EvtPDL.hh:43
static int entries()
Definition EvtPDL.hh:73
static EvtId evtIdFromStdHep(int stdhep)
Definition EvtPDL.cc:232
static std::string name(EvtId i)
Definition EvtPDL.hh:70
static EvtId chargeConj(EvtId id)
Definition EvtPDL.cc:193
static double getMinMass(EvtId i)
Definition EvtPDL.hh:56
static int chg3(EvtId i)
Definition EvtPDL.hh:65
static int getLundKC(EvtId id)
Definition EvtPDL.hh:62
static EvtId getId(const std::string &name)
Definition EvtPDL.cc:272
static double getctau(EvtId i)
Definition EvtPDL.hh:60
void setSpinDensityForwardHelicityBasis(const EvtSpinDensity &rho)
void makeDaughters(int ndaug, EvtId *id)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtId getId() const
void setDiagonalSpinDensity()
const EvtVector4R & getP4() const
int getNDaug() const
EvtParticle * getDaug(int i)
void deleteDaughters(bool keepChannel=false)
double mass() const
void Set(int i, int j, const EvtComplex &rhoij)
void SetDim(int n)
double get(int i) const
double d3mag() const
void set(int i, double d)
Index first(Pair i)