23 ContractionNumber=cNum;
25 cPsI=cPsiInt; cPsC=cPsiChi;
26 cCP=cChiPhi; cPsP=cPsiPhi;
27 cPO=cPhiOme; cCO=cChiOme;
28 cPE=cPhiEps; cCE=cChiEps;
30 Int_t totalR=RankS1+RankS2+RankL+RankJ;
31 Int_t contractions=2*(cPsiInt+cPsiChi+cChiPhi+cPsiPhi);
32 Int_t even_contraction=1;
33 if ( totalR % 2 ) even_contraction=0;
35 if ( ( even_contraction==1 && contractions != totalR ) ||
36 ( even_contraction==0 && contractions != totalR-3 ) ) {
37 cerr <<
"Invalid contraction occurred" << endl;
42 cout <<
"LSAmpl: "<<RankS1<<
" "<<RankS2<<
" L="
43 <<RankL<<
" "<<RankJ<<
" d="<<delta<<
" S="<<S_L<<
" c: "
44 <<cPsiInt<<
" "<<cPsiChi<<
" "<<cChiPhi<<
" "<<cPsiPhi <<
" s: "
45 <<cPhiOme<<
" "<<cChiOme<<
" "<<cPhiEps<<
" "<<cChiEps;
46 if (even_contraction) cout << endl;
47 else cout<<
" (iw)" << endl;
59 if (
debugLSAmpl) cout <<
"Inner contraction is zero." << endl;
72 if (
debugLSAmpl) cout <<
"LS contraction is zero." << endl;
85 if (
debugLSAmpl) cout <<
"JS contraction is zero." << endl;
96 Nterms=TSScalar->GetNterms();
99 if (
debugLSAmpl) cout <<
"LJ contraction is zero." << endl;
105 TSScalar->Print(
's');
117 termg1pot =
new Int_t[Nterms];
118 termg2pot =
new Int_t[Nterms];
122 if (particle_exchange) {
141 Bool_t sign_reversal=
false;
142 if (delta<0 && (L+S-J)%2 ) sign_reversal=
true;
146 termg1pot =
new Int_t[Nterms];
147 termg2pot =
new Int_t[Nterms];
150 if (
debugLSContrib) cout <<
"("<<J<<
")"<<L<<S<<
"["<<delta<<
"]"<<endl;
157 <<
" L"<<L<<
"S"<<S<<
"J"<<J<<
"Ampldelta"<<A->
Getdelta()
158 <<
" delta"<<delta<<
", sigrev "<<sign_reversal;
161 if (sign_reversal==
true) termFracNum[
i].
FlipSign();
168 if (sum) { NormFactor = *sum; }
170 cerr <<
"TLSContrib: Normalisation not root-fractional,"
171 <<
" *** results will be wrong *** " << endl;
179 << NormFactor.FracStringSqrt() << endl;
183 PureRelativistic=
true;
187 PureRelativistic=
false;
193 termFracNum[
i]=termFracNum[
i]*NormInv;
200 if (J!=b->
J || L!=b->
L || S!=b->
S) {
201 cerr <<
"TLSContrib::Add : Something is wrong, trying to add different"
202 <<
" (J;L,S): ("<<J<<
";"<<L<<
","<<S<<
") != ("
203 <<b->
J<<
";"<<b->
L<<
","<<b->
S<<
")"<<endl;
219 if ( !term_summed && cNum == b->
cNum &&
220 ( (particle_exchange==
true &&
223 (particle_exchange==
false &&
232 if (sum) { termFracNum[
i] = *sum; }
234 cerr <<
"TLSContrib: Normalisation not root-fractional,"
235 <<
" *** results will be wrong *** " << endl;
245 new_termFracNum[
i]=termFracNum[
i];
246 new_termg1pot[
i]=termg1pot[
i];
247 new_termg2pot[
i]=termg2pot[
i];
249 new_termFracNum[Nterms-1] =
256 if (J%2) new_termFracNum[Nterms-1].
FlipSign();
257 if ( particle_exchange ) {
258 new_termg1pot[Nterms-1] = b->
termg2pot[ib];
259 new_termg2pot[Nterms-1] = b->
termg1pot[ib];
262 new_termg1pot[Nterms-1] = b->
termg1pot[ib];
263 new_termg2pot[Nterms-1] = b->
termg2pot[ib];
265 termFracNum=new_termFracNum;
266 termg1pot=new_termg1pot;
267 termg2pot=new_termg2pot;
290 new_termFracNum[j]=termFracNum[
i];
291 new_termg1pot[j]=termg1pot[
i];
292 new_termg2pot[j]=termg2pot[
i];
296 termFracNum=new_termFracNum;
297 termg1pot=new_termg1pot;
298 termg2pot=new_termg2pot;
307 if (sum) { NormFactor = *sum; }
309 cerr <<
"TLSContrib: Normalisation not root-fractional,"
310 <<
" *** results will be wrong *** " << endl;
318 PureRelativistic=
true;
322 PureRelativistic=
false;
326 termFracNum[
i]=termFracNum[
i]*NormInv;
334 if (cNum==1) cout <<
"g"<<
"["<<cNum<<
"] (";
335 if (cNum==2) cout <<
"f"<<
"["<<cNum<<
"] (";
336 if (cNum>=3) cout <<
"h"<<
"["<<cNum<<
"] (";
337 cout <<J<<
")"<<L<<S<<
"( ";
338 if (!PureRelativistic) {
339 cout << NormFactor.FracStringSqrt() <<
" ) ( ";
341 for (
Int_t iT=0; iT<Nterms; iT++){
342 cout << termFracNum[iT].FracStringSqrt()<<
" ";
344 if (termg1pot[iT]==1) cout <<
" gs";
345 else cout <<
" gs^" << termg1pot[iT];
348 if (termg2pot[iT]==1) cout <<
" gsig";
349 else cout <<
" gsig^" << termg2pot[iT];
358 cout << NormFactor.FracStringSqrt();
359 if (cNum==1) cout <<
"*g";
360 if (cNum==2) cout <<
"*f";
361 if (cNum==3) cout <<
"*h";
367 cout << (NormFactor * m).FracStringSqrt();
368 if (cNum==1) cout <<
"*g";
369 if (cNum==2) cout <<
"*f";
370 if (cNum==3) cout <<
"*h";
396 if ( ! CheckJLS(C) ) {
397 cout <<
"TLSNonRel::Add not appropriate, skipping (check code)!!!" << endl;
403 newRelLS[
i]=RelLS[
i];
405 newRelLS[Nterms-1]=C;
411 cout <<
" [ " << GnrPrefac.FracStringSqrt() <<
" G_"<< L << S <<
" ] ";
420 cout <<
" [ G_"<< L << S <<
" ] ";
424 RelLS[
i]->PrintNRG(GnrInv);