10 const char *name,
const char *title,
31 ZZ4fOrdering(other.ZZ4fOrdering)
36 const Double_t Pi = TMath::Pi();
37 Double_t dHel = (Double_t)helicity;
40 if ((i1==0 && j1==0) || (i1==-1 && j1==1) || (i1==1 && j1==-1)) result = 4./3.;
41 else if (i1==1 && j1==1) result = 8./3.;
42 else if (i1==-1 && j1==-1) result = 8./3.;
43 else if ((i1==0 && j1==1) || (i1==1 && j1==0)) result = Pi*dHel/2.;
44 else if ((i1==0 && j1==-1) || (i1==-1 && j1==0)) result = Pi*dHel/2.;
47 if ((i1==0 && j1==0) || (i1==-1 && j1==1) || (i1==1 && j1==-1)) result = 1.-pow(
h1, 2);
48 else if (i1==1 && j1==1) result = 1.+pow(
h1, 2)-2.*
h1*dHel;
49 else if (i1==-1 && j1==-1) result = 1.+pow(
h1, 2)+2.*
h1*dHel;
50 else if ((i1==0 && j1==1) || (i1==1 && j1==0)) result = sqrt(fabs(1.-pow(
h1, 2)))*(dHel-
h1);
51 else if ((i1==0 && j1==-1) || (i1==-1 && j1==0)) result = sqrt(fabs(1.-pow(
h1, 2)))*(dHel+
h1);
56 const Double_t Pi = TMath::Pi();
57 Double_t dHel = (Double_t)helicity;
60 if ((i2==0 && j2==0) || (i2==-1 && j2==1) || (i2==1 && j2==-1)) result = 4./3.;
61 else if (i2==1 && j2==1) result = 8./3.;
62 else if (i2==-1 && j2==-1) result = 8./3.;
63 else if ((i2==0 && j2==1) || (i2==1 && j2==0)) result = Pi*dHel/2.;
64 else if ((i2==0 && j2==-1) || (i2==-1 && j2==0)) result = Pi*dHel/2.;
67 if ((i2==0 && j2==0) || (i2==-1 && j2==1) || (i2==1 && j2==-1)) result = 1.-pow(
h2, 2);
68 else if (i2==1 && j2==1) result = 1.+pow(
h2, 2)-2.*
h2*dHel;
69 else if (i2==-1 && j2==-1) result = 1.+pow(
h2, 2)+2.*
h2*dHel;
70 else if ((i2==0 && j2==1) || (i2==1 && j2==0)) result = sqrt(fabs(1.-pow(
h2, 2)))*(dHel-
h2);
71 else if ((i2==0 && j2==-1) || (i2==-1 && j2==0)) result = sqrt(fabs(1.-pow(
h2, 2)))*(dHel+
h2);
77 if (f_spinz0<0.) f_spinz0=0;
78 Double_t hsneg = -
hs;
if (fabs(hsneg)>1.) hsneg *= 1./fabs(hsneg);
106 AF202 = ((1. - pow(hsneg, 2))*((2.*f_spinz0 -
f_spinz2) - (6.*f_spinz0 - 4.*
f_spinz1 +
f_spinz2)*pow(hsneg, 2)))*(-sqrt(3./2.)/8.);
111 AF212 = (hsneg*sqrt(1 - pow(hsneg, 2))*((6.*f_spinz0 - 3.*
f_spinz2) - (6.*f_spinz0 - 4.*
f_spinz1 +
f_spinz2)*pow(hsneg, 2)))/(-8.);
112 AF2m12 = ((6*f_spinz0 - 4*
f_spinz1 +
f_spinz2)*hsneg*pow(1. - pow(hsneg, 2), 1.5))/(-8.);
115 AF2m22 = ((6*f_spinz0 - 4*
f_spinz1 +
f_spinz2)*pow(1. - pow(hsneg, 2), 2))/16.;
119 if (di==0 && dj==0) result = AF200;
120 else if ((di==1 && dj==1) || (di==-1 && dj==-1)) result = AF211;
121 else if ((di==2 && dj==2) || (di==-2 && dj==-2)) result = AF222;
123 else if ((di==1 && dj==0) || (di==0 && dj==1)) result = AF201;
124 else if ((di==-1 && dj==0) || (di==0 && dj==-1)) result = -AF201;
125 else if ((di==1 && dj==2) || (di==2 && dj==1)) result = AF212;
126 else if ((di==-1 && dj==-2) || (di==-2 && dj==-1)) result = -AF212;
128 else if ((di==2 && dj==0) || (di==0 && dj==2) || (di==-2 && dj==0) || (di==0 && dj==-2)) result = AF202;
129 else if ((di==1 && dj==-1) || (di==-1 && dj==1)) result = AF2m11;
131 else if ((di==-1 && dj==2) || (di==2 && dj==-1)) result = AF2m12;
132 else if ((di==-2 && dj==1) || (di==1 && dj==-2)) result = -AF2m12;
134 else if ((di==-2 && dj==2) || (di==2 && dj==-2)) result = AF2m22;
138 const Double_t Pi = TMath::Pi();
142 Double_t phasePhi = 0;
143 Double_t phasePhi1 = 0;
154 if (i1==j1 && i2==j2) result = 4.*pow(Pi, 2);
158 if (i1==j1 && i2==j2) result = 2.*Pi;
159 else if (phasePhi==0.){
160 phase =
Phi1*phasePhi1+extraPhase1-extraPhase2;
161 result = cos(phase)*2.*Pi;
165 if (i1==j1 && i2==j2) result = 2.*Pi;
166 else if (phasePhi1==0.){
167 phase =
Phi*phasePhi+extraPhase1-extraPhase2;
168 result = cos(phase)*2.*Pi;
172 phase =
Phi1*phasePhi1+
Phi*phasePhi+extraPhase1-extraPhase2;
179 Double_t R1Val, R2Val;
185 A0pRe, A0pIm, Ap0Re, Ap0Im,
186 AmmRe, AmmIm, A0mRe, A0mIm, Am0Re, Am0Im,
187 ApmRe, ApmIm, AmpRe, AmpIm;
192 A0pRe, A0pIm, Ap0Re, Ap0Im,
193 AmmRe, AmmIm, A0mRe, A0mIm, Am0Re, Am0Im,
194 ApmRe, ApmIm, AmpRe, AmpIm,
198 std::vector<Double_t> ARexy, AImxy;
199 std::vector<Int_t> index_x,index_y;
200 ARexy.push_back(AmmRe);
201 ARexy.push_back(Am0Re);
202 ARexy.push_back(AmpRe);
203 ARexy.push_back(A0mRe);
204 ARexy.push_back(A00Re);
205 ARexy.push_back(A0pRe);
206 ARexy.push_back(ApmRe);
207 ARexy.push_back(Ap0Re);
208 ARexy.push_back(AppRe);
209 AImxy.push_back(AmmIm);
210 AImxy.push_back(Am0Im);
211 AImxy.push_back(AmpIm);
212 AImxy.push_back(A0mIm);
213 AImxy.push_back(A00Im);
214 AImxy.push_back(A0pIm);
215 AImxy.push_back(ApmIm);
216 AImxy.push_back(Ap0Im);
217 AImxy.push_back(AppIm);
218 index_x.push_back(-1);
219 index_x.push_back(-1);
220 index_x.push_back(-1);
221 index_x.push_back(0);
222 index_x.push_back(0);
223 index_x.push_back(0);
224 index_x.push_back(1);
225 index_x.push_back(1);
226 index_x.push_back(1);
227 index_y.push_back(-1);
228 index_y.push_back(0);
229 index_y.push_back(1);
230 index_y.push_back(-1);
231 index_y.push_back(0);
232 index_y.push_back(1);
233 index_y.push_back(-1);
234 index_y.push_back(0);
235 index_y.push_back(1);
237 for (
unsigned int ii=0; ii<index_x.size(); ii++){
238 Int_t i1 = index_x.at(ii);
239 Int_t i2 = index_y.at(ii);
241 Double_t ARexyi = ARexy.at(ii);
242 Double_t AImxyi = AImxy.at(ii);
244 Double_t Axyi = sqrt(ARexyi*ARexyi + AImxyi*AImxyi);
245 Double_t phixyi = atan2(AImxyi, ARexyi);
247 for (
unsigned int jj=ii; jj<index_x.size(); jj++){
248 Int_t j1 = index_x.at(jj);
249 Int_t j2 = index_y.at(jj);
251 Double_t ARexyj = ARexy.at(jj);
252 Double_t AImxyj = AImxy.at(jj);
254 Double_t Axyj = sqrt(ARexyj*ARexyj + AImxyj*AImxyj);
255 Double_t phixyj = atan2(AImxyj, ARexyj);
257 Double_t globalFactor = 1;
258 if (ii!=jj) globalFactor = 2;
260 if (phifactor==0)
continue;
261 Double_t h1h2factor[4]={ 0 };
269 Double_t fraction = (1.+((Double_t)hh1)*R1Val+((Double_t)hh2)*R2Val+((Double_t)hh1)*R1Val*((Double_t)hh2)*R2Val)/4.;
270 h1h2factor[2*
ih1+
ih2] = fraction*h1factor*h2factor;
275 globalFactor *= Axyi*Axyj*phifactor*hsfactor;
278 for (
int ih2=0;
ih2<2;
ih2++) result += globalFactor*h1h2factor[2*
ih1+
ih2];
280 if (result!=0.) Axxyyterm.push_back(result);
289 bool isZZ = (mV >= 90.);
290 Double_t epsilon=1e-15;
308 Double_t betaValSq = (1.-(pow(m1_-m2_, 2)/pow(
m12, 2)))*(1.-(pow(m1_+m2_, 2)/pow(
m12, 2)));
309 if (betaValSq<=0.)
return epsilon;
310 Double_t betaVal = sqrt(betaValSq);
312 Double_t term1Coeff = 1;
313 Double_t term2Coeff = 1;
317 std::vector<Double_t> Axxyyterm;
320 for (
unsigned int s=0; s<Axxyyterm.size(); s++)
value += Axxyyterm.at(s);
321 value *= term1Coeff*term2Coeff*betaVal;
344 bool isZZ = (mV >= 90.);
345 Double_t epsilon=1e-10;
355 Double_t betaValSq = (1.-(pow(m1_-m2_, 2)/pow(
m12, 2)))*(1.-(pow(m1_+m2_, 2)/pow(
m12, 2)));
356 if (betaValSq<=0.)
return epsilon;
357 Double_t betaVal = sqrt(betaValSq);
359 Double_t term1Coeff = 1;
360 Double_t term2Coeff = 1;
364 std::vector<Double_t> Axxyyterm;
367 for (
unsigned int s=0; s<Axxyyterm.size(); s++)
value += Axxyyterm.at(s);
368 value *= term1Coeff*term2Coeff*betaVal;
372 <<
"h1=" <<
h1 <<
'\t'
373 <<
"h2=" <<
h2 <<
'\t'
374 <<
"hs=" <<
hs <<
'\t'
375 <<
"Phi1=" <<
Phi1 <<
'\t'
376 <<
"Phi=" <<
Phi <<
'\t'
377 <<
"m1=" << m1_ <<
'\t'
378 <<
"m2=" << m2_ <<
'\t'
379 <<
"m12=" <<
m12 <<
'\t'
381 MELAout <<
"Possible sources:\n"
382 <<
"betaVal=" << betaVal <<
'\t'
383 <<
"term1Coeff=" << term1Coeff <<
'\t'
384 <<
"term2Coeff=" << term2Coeff <<
'\t'