48 for(ib=0;ib<_nB;ib++){
55 for(ia=0;ia<_nA;ia++){
60 for(ib=0;ib<_nB;ib++){
65 for(ic=0;ic<_nC;ic++){
71 for(ia=0;ia<_nA;ia++){
72 for(ib=0;ib<_nB;ib++){
73 delete [] _amp[ia][ib];
74 delete [] _amp1[ia][ib];
75 delete [] _amp3[ia][ib];
106 _lambdaA2=
new int[_nA];
107 _lambdaB2=
new int[_nB];
108 _lambdaC2=
new int[_nC];
112 for(ib=0;ib<_nB;ib++){
118 for(ia=0;ia<_nA;ia++){
122 for(ib=0;ib<_nB;ib++){
126 for(ic=0;ic<_nC;ic++){
133 for(ia=0;ia<_nA;ia++){
137 for(ib=0;ib<_nB;ib++){
146 fillHelicity(_lambdaA2,_nA,_JA2);
147 fillHelicity(_lambdaB2,_nB,_JB2);
148 fillHelicity(_lambdaC2,_nC,_JC2);
150 for(ib=0;ib<_nB;ib++){
151 for(ic=0;ic<_nC;ic++){
152 _HBC[ib][ic]=HBC[ib][ic];
174 for(itheta=-10;itheta<=10;itheta++){
175 theta=acos(0.099999*itheta);
176 for(ia=0;ia<_nA;ia++){
178 for(ib=0;ib<_nB;ib++){
179 for(ic=0;ic<_nC;ic++){
180 _amp[ia][ib][ic]=0.0;
181 if (
abs(_lambdaB2[ib]-_lambdaC2[ic])<=_JA2) {
182 _amp[ia][ib][ic]=c*_HBC[ib][ic]*
184 _lambdaB2[ib]-_lambdaC2[ic],theta);
185 prob+=
real(_amp[ia][ib][ic]*
conj(_amp[ia][ib][ic]));
192 if (prob>maxprob) maxprob=prob;
222 for(ia=0;ia<_nA;ia++){
223 for(ib=0;ib<_nB;ib++){
224 for(ic=0;ic<_nC;ic++){
225 _amp[ia][ib][ic]=0.0;
226 if (
abs(_lambdaB2[ib]-_lambdaC2[ic])<=_JA2) {
228 _lambdaB2[ib]-_lambdaC2[ic],theta);
230 _amp[ia][ib][ic]=c*_HBC[ib][ic]*
232 _lambdaC2[ic])))*dfun;
234 prob1+=
real(_amp[ia][ib][ic]*
conj(_amp[ia][ib][ic]));
239 setUpRotationMatrices(p,theta,phi);
241 applyRotationMatrices();
245 for(ia=0;ia<_nA;ia++){
246 for(ib=0;ib<_nB;ib++){
247 for(ic=0;ic<_nC;ic++){
248 prob2+=
real(_amp[ia][ib][ic]*
conj(_amp[ia][ib][ic]));
252 amp.
vertex(_amp[ia][ib][ic]);
255 amp.
vertex(ic,_amp[ia][ib][ic]);
260 amp.
vertex(ib,_amp[ia][ib][ic]);
263 amp.
vertex(ib,ic,_amp[ia][ib][ic]);
270 amp.
vertex(ia,_amp[ia][ib][ic]);
273 amp.
vertex(ia,ic,_amp[ia][ib][ic]);
278 amp.
vertex(ia,ib,_amp[ia][ib][ic]);
281 amp.
vertex(ia,ib,ic,_amp[ia][ib][ic]);
289 if (fabs(prob1-prob2)>0.000001*prob1){
290 report(
INFO,
"EvtGen") <<
"prob1,prob2:"<<prob1<<
" "<<prob2<<endl;
299void EvtEvalHelAmp::fillHelicity(
int* lambda2,
int n,
int J2){
321void EvtEvalHelAmp::setUpRotationMatrices(
EvtParticle* p,
double theta,
double phi){
325 case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
341 _RA[i][j]=
R.Get(i,j);
350 report(
ERROR,
"EvtGen") <<
"Spin2(_JA2)="<<_JA2<<
" not supported!"<<endl;
358 case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
374 _RB[i][j]=
conj(
R.Get(i,j));
383 report(
ERROR,
"EvtGen") <<
"Spin2(_JB2)="<<_JB2<<
" not supported!"<<endl;
389 case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
405 _RC[i][j]=
conj(
R.Get(i,j));
414 report(
ERROR,
"EvtGen") <<
"Spin2(_JC2)="<<_JC2<<
" not supported!"<<endl;
423void EvtEvalHelAmp::applyRotationMatrices(){
431 for(ia=0;ia<_nA;ia++){
432 for(ib=0;ib<_nB;ib++){
433 for(ic=0;ic<_nC;ic++){
436 temp+=_RC[i][ic]*_amp[ia][ib][i];
438 _amp1[ia][ib][ic]=temp;
445 for(ia=0;ia<_nA;ia++){
446 for(ic=0;ic<_nC;ic++){
447 for(ib=0;ib<_nB;ib++){
450 temp+=_RB[i][ib]*_amp1[ia][i][ic];
452 _amp3[ia][ib][ic]=temp;
459 for(ib=0;ib<_nB;ib++){
460 for(ic=0;ic<_nC;ic++){
461 for(ia=0;ia<_nA;ia++){
464 temp+=_RA[i][ia]*_amp3[i][ib][ic];
466 _amp[ia][ib][ic]=temp;
Evt3Rank3C conj(const Evt3Rank3C &t2)
EvtComplex exp(const EvtComplex &c)
ostream & report(Severity severity, const char *facility)
void vertex(const EvtComplex &)
EvtEvalHelAmp(EvtSpinType::spintype A, EvtSpinType::spintype B, EvtSpinType::spintype C, EvtComplexPtrPtr HBC)
void evalAmp(EvtParticle *p, EvtAmp &)
const EvtVector4R & getP4() const
virtual EvtSpinDensity rotateToHelicityBasis() const =0
EvtParticle * getDaug(int i)
static int getSpin2(spintype stype)
static int getSpinStates(spintype stype)
static double d(int j, int m1, int m2, double theta)
complex_t R(double Q2, double M2, double G, double Mp2, double Mm2)