60 <<
"nA,nB,nC:" << nA <<
"," << nB <<
"," << nC << endl;
70 <<
"JA2,JB2,JC2:" << JA2 <<
"," << JB2 <<
"," << JC2 << endl;
74 int* lambdaA2 =
new int[nA];
75 int* lambdaB2 =
new int[nB];
76 int* lambdaC2 =
new int[nC];
79 for (
int ib = 0; ib < nB; ib++ ) {
91 <<
"Helicity states of particle A:" << endl;
92 for (
int i = 0; i < nA; i++ ) {
97 <<
"Helicity states of particle B:" << endl;
98 for (
int i = 0; i < nB; i++ ) {
103 <<
"Helicity states of particle C:" << endl;
104 for (
int i = 0; i < nC; i++ ) {
109 <<
"Will now figure out the valid (M_LS) states:" << endl;
112 int Lmin = std::max( JA2 - JB2 - JC2,
113 std::max( JB2 - JA2 - JC2, JC2 - JA2 - JB2 ) );
116 int Lmax = JA2 + JB2 + JC2;
118 int nPartialWaveAmp = 0;
123 for (
int L = Lmin; L <= Lmax; L += 2 ) {
124 int Smin =
abs( L - JA2 );
125 if ( Smin <
abs( JB2 - JC2 ) )
126 Smin =
abs( JB2 - JC2 );
128 if ( Smax >
abs( JB2 + JC2 ) )
129 Smax =
abs( JB2 + JC2 );
130 for (
int S = Smin; S <= Smax; S += 2 ) {
131 nL[nPartialWaveAmp] = L;
132 nS[nPartialWaveAmp] = S;
137 <<
"M[" << L <<
"][" << S <<
"]" << endl;
148 double partampsqtot = 0.0;
150 for (
int i = 0; i < nPartialWaveAmp; i++ ) {
151 M[i] =
getArg( argcounter ) *
154 partampsqtot +=
abs2( M[i] );
157 <<
"M[" << nL[i] <<
"][" << nS[i] <<
"]=" << M[i] << endl;
163 double helampsqtot = 0.0;
165 for (
int ib = 0; ib < nB; ib++ ) {
166 for (
int ic = 0; ic < nC; ic++ ) {
168 if (
abs( lambdaB2[ib] - lambdaC2[ic] ) <= JA2 ) {
169 for (
int i = 0; i < nPartialWaveAmp; i++ ) {
172 int lambda2 = lambdaB2[ib];
173 int lambda3 = lambdaC2[ic];
177 int m1 = lambda2 - lambda3;
183 <<
"s2,lambda2:" << s2 <<
" " << lambda2 << endl;
186 double fkwTmp = ( L + 1.0 ) / ( s1 + 1.0 );
188 if ( S >=
abs( m1 ) ) {
190 c1.
coef( S, m1, s2, s3, lambda2,
192 c2.
coef( s1, m1, L, S, 0, m1 ) * M[i];
198 <<
"HBC[" << ib <<
"][" << ic <<
"]=" << HBC[ib][ic]
202 helampsqtot +=
abs2( HBC[ib][ic] );
206 if ( fabs( helampsqtot - partampsqtot ) / ( helampsqtot + partampsqtot ) >
213 for (
int i = 0; i * 2 <
getNArg(); i++ ) {
215 <<
"M(" << nL[i] <<
"," << nS[i]
218 << M[i] << std::endl;
221 <<
"The total probability in the partwave basis is: " << partampsqtot
224 <<
"The total probability in the helamp basis is: " << helampsqtot
227 <<
"Most likely this is because the specified partwave amplitudes "
230 <<
"project onto unphysical helicities of photons or neutrinos. "
233 <<
"Seriously consider if your specified amplitudes are correct. "
247 <<
"Calculated probmax" << maxprob << endl;
266 if ( n == 2 && J2 == 2 ) {
272 assert( n == J2 + 1 );
274 for (
int i = 0; i < n; i++ ) {
275 lambda2[i] = n - i * 2 - 1;
double abs2(const EvtComplex &c)
EvtComplex exp(const EvtComplex &c)
EvtComplex * EvtComplexPtr
double abs(const EvtComplex &c)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
double coef(int J, int M, int j1, int j2, int m1, int m2)
double getArg(unsigned int j)
void setProbMax(double prbmx)
EvtId getParentId() const
EvtId getDaug(int i) const
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
const EvtId * getDaugs() const
static EvtSpinType::spintype getSpinType(EvtId i)
static std::string name(EvtId i)
void fillHelicity(int *lambda2, int n, int J2)
EvtDecayBase * clone() const override
std::unique_ptr< EvtEvalHelAmp > m_evalHelAmp
void decay(EvtParticle *p) override
std::string getName() const override
void initProbMax() override
double initializePhaseSpace(size_t numdaughter, const EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
static int getSpin2(spintype stype)
static int getSpinStates(spintype stype)