92 {
93 double amps, SamAmps, rd1;
94
95 if ( nrun == 1 )
96 {
97 int ir, nd;
98 std::cout << "Wait for a moment for calculation of maxiumal amplitude squared"
99 << std::endl;
100 for ( ir = 0; ir <= 200000; ir++ )
101 {
102 loop0:
105 _nd = nd;
106 for (
int i = 0; i <= nd - 1; i++ ) { _p4[i] = p->
getDaug( i )->
getP4Lab(); }
107 for ( int i = 0; i < _nd; i++ )
108 {
109 e[i] = _p4[i].get( 0 );
110 px[i] = _p4[i].get( 1 );
111 py[i] = _p4[i].get( 2 );
112 pz[i] = _p4[i].get( 3 );
113 }
114
116
117 if ( amps < 0 ) goto loop0;
118 if ( amps > max_amps ) max_amps = amps * 1.01;
119 nrun++;
120 }
121 }
122 if ( max_amps == 0.0 )
123 {
125 << "The decay amplitude square should be positive number, but it is " << max_amps
126 << endl;
127 abort();
128 }
129
130
131loop:
133 int i;
136
138 if ( amps < 0 ) goto loop;
139 SamAmps = amps / max_amps;
141 if ( rd1 >= SamAmps ) goto loop;
142 if ( amps > max_amps ) max_amps = amps * 1.01;
143 nrun++;
144}
double fdcevtgen_(double *, double *, double *, double *)
ostream & report(Severity severity, const char *facility)
void setEvtMomentum(EvtVector4R *p4)
EvtParticle * getDaug(int i)
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)