JHUGen MELA  v2.4.1
Matrix element calculations as used in JHUGen. MELA is an important tool that was used for the Higgs boson discovery and for precise measurements of its structure and interactions. Please see the website https://spin.pha.jhu.edu/ and papers cited there for more details, and kindly cite those papers when using this code.
RooSpinTwo.cc
Go to the documentation of this file.
1 #include "RooSpinTwo.h"
2 
3 using namespace std;
4 using namespace MELAStreamHelpers;
5 
6 
9  const char* name, const char* title,
10  modelMeasurables const& _measurables,
11  modelParameters const& _parameters,
12  modelCouplings const& _couplings,
13  RooSpin::VdecayType _Vdecay1, RooSpin::VdecayType _Vdecay2,
14  TVar::VerbosityLevel verbosity_
15 ) : RooSpin(
16  name, title,
17  _measurables, _parameters,
18  _Vdecay1, _Vdecay2,
19  verbosity_
20 ),
21 
22 b1Val("b1Val", "b1Val", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_1][0])),
23 b2Val("b2Val", "b2Val", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_2][0])),
24 b3Val("b3Val", "b3Val", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_3][0])),
25 b4Val("b4Val", "b4Val", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_4][0])),
26 b5Val("b5Val", "b5Val", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_5][0])),
27 b6Val("b6Val", "b6Val", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_6][0])),
28 b7Val("b7Val", "b7Val", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_7][0])),
29 b8Val("b8Val", "b8Val", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_8][0])),
30 b9Val("b9Val", "b9Val", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_9][0])),
31 b10Val("b10Val", "b10Val", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_10][0])),
32 
33 b1ValIm("b1ValIm", "b1ValIm", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_1][1])),
34 b2ValIm("b2ValIm", "b2ValIm", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_2][1])),
35 b3ValIm("b3ValIm", "b3ValIm", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_3][1])),
36 b4ValIm("b4ValIm", "b4ValIm", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_4][1])),
37 b5ValIm("b5ValIm", "b5ValIm", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_5][1])),
38 b6ValIm("b6ValIm", "b6ValIm", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_6][1])),
39 b7ValIm("b7ValIm", "b7ValIm", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_7][1])),
40 b8ValIm("b8ValIm", "b8ValIm", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_8][1])),
41 b9ValIm("b9ValIm", "b9ValIm", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_9][1])),
42 b10ValIm("b10ValIm", "b10ValIm", this, (RooAbsReal&)*(_couplings.bList[gGRAVITON_VV_10][1])),
43 
44 Lambda("Lambda", "Lambda", this, (RooAbsReal&)*(_couplings.Lambda)),
45 
46 f_spinz1("f_spinz1", "f_spinz1", this, (RooAbsReal&)*(_couplings.f_spinz1)),
47 f_spinz2("f_spinz2", "f_spinz2", this, (RooAbsReal&)*(_couplings.f_spinz2))
48 {}
49 
50 RooSpinTwo::RooSpinTwo(const RooSpinTwo& other, const char* name) :
51 RooSpin(other, name),
52 
53 b1Val("b1Val", this, other.b1Val),
54 b2Val("a2Val", this, other.b2Val),
55 b3Val("b3Val", this, other.b3Val),
56 b4Val("b4Val", this, other.b4Val),
57 b5Val("b5Val", this, other.b5Val),
58 b6Val("b6Val", this, other.b6Val),
59 b7Val("b7Val", this, other.b7Val),
60 b8Val("b8Val", this, other.b8Val),
61 b9Val("b9Val", this, other.b9Val),
62 b10Val("b10Val", this, other.b10Val),
63 
64 b1ValIm("b1ValIm", this, other.b1ValIm),
65 b2ValIm("a2ValIm", this, other.b2ValIm),
66 b3ValIm("b3ValIm", this, other.b3ValIm),
67 b4ValIm("b4ValIm", this, other.b4ValIm),
68 b5ValIm("b5ValIm", this, other.b5ValIm),
69 b6ValIm("b6ValIm", this, other.b6ValIm),
70 b7ValIm("b7ValIm", this, other.b7ValIm),
71 b8ValIm("b8ValIm", this, other.b8ValIm),
72 b9ValIm("b9ValIm", this, other.b9ValIm),
73 b10ValIm("b10ValIm", this, other.b10ValIm),
74 
75 Lambda("Lambda", this, other.Lambda),
76 
77 f_spinz1("f_spinz1", this, other.f_spinz1),
78 f_spinz2("f_spinz2", this, other.f_spinz2)
79 {}
80 
81 void RooSpinTwo::calculateCi(std::vector<Double_t>& ciRe, std::vector<Double_t>& ciIm, bool isGammaV1, bool isGammaV2) const{
82  Double_t mV;
83  getMVGamV(&mV);
84 
85  Double_t m1_=m1; if (Vdecay1==RooSpin::kVdecayType_GammaOnshell) m1_=0;
86  Double_t m2_=m2; if (Vdecay2==RooSpin::kVdecayType_GammaOnshell) m2_=0;
87  Double_t m1sq = pow(m1_, 2);
88  Double_t m2sq = pow(m2_, 2);
89  Double_t mVsq = pow(mV, 2);
90  Double_t m12sq = pow(m12, 2);
91 
92  Double_t s = (m12sq-m1sq-m2sq)/2.;
93  if (m1_>m2_+m12 || m2_>m1_+m12) s = -s;
94  Double_t kappa = s/pow(Lambda, 2);
95 
96  if (!isGammaV1 && !isGammaV2 && !(Vdecay1==RooSpin::kVdecayType_GammaOnshell || Vdecay2==RooSpin::kVdecayType_GammaOnshell)){ // ZZ/WW
97  Double_t c1Re = 2.*(b1Val + b2Val*kappa*(1.+m1sq/s)*(1.+m2sq/s) + b5Val*mVsq/s); ciRe.push_back(c1Re);
98  Double_t c2Re = -0.5*b1Val + b3Val*kappa*(1.-(m1sq+m2sq)/(2*s)) + 2.*b4Val*kappa + b7Val*kappa*mVsq/s; ciRe.push_back(c2Re);
99  Double_t c3Re = -(b2Val/2.+b3Val+2.*b4Val)*kappa*m12sq/s; ciRe.push_back(c3Re);
100  Double_t c41Re = -b1Val - b2Val*kappa - (b2Val*m1sq+b3Val*m2sq+2.*b6Val*mVsq)*kappa/s; ciRe.push_back(c41Re);
101  Double_t c42Re = -b1Val - b2Val*kappa - (b2Val*m2sq+b3Val*m1sq+2.*b6Val*mVsq)*kappa/s; ciRe.push_back(c42Re);
102  Double_t c5Re = 2.*b8Val*kappa*(m12sq)/s; ciRe.push_back(c5Re);
103  Double_t c6Re = b9Val*kappa*mVsq/s; ciRe.push_back(c6Re);
104  Double_t c7Re = b10Val*m12sq*mVsq*pow(kappa/s, 2); ciRe.push_back(c7Re);
105 
106  Double_t c1Im = 2.*(b1ValIm + b2ValIm*kappa*(1.+m1sq/s)*(1.+m2sq/s) + b5ValIm*mVsq/s); ciIm.push_back(c1Im);
107  Double_t c2Im = -0.5*b1ValIm + b3ValIm*kappa*(1.-(m1sq+m2sq)/(2*s)) + 2.*b4ValIm*kappa + b7ValIm*kappa*mVsq/s; ciIm.push_back(c2Im);
108  Double_t c3Im = -(b2ValIm/2.+b3ValIm+2.*b4ValIm)*kappa*m12sq/s; ciIm.push_back(c3Im);
109  Double_t c41Im = -b1ValIm - b2ValIm*kappa - (b2ValIm*m1sq+b3ValIm*m2sq+2.*b6ValIm*mVsq)*kappa/s; ciIm.push_back(c41Im);
110  Double_t c42Im = -b1ValIm - b2ValIm*kappa - (b2ValIm*m2sq+b3ValIm*m1sq+2.*b6ValIm*mVsq)*kappa/s; ciIm.push_back(c42Im);
111  Double_t c5Im = 2.*b8ValIm*kappa*(m12sq)/s; ciIm.push_back(c5Im);
112  Double_t c6Im = b9ValIm*kappa*mVsq/s; ciIm.push_back(c6Im);
113  Double_t c7Im = b10ValIm*m12sq*mVsq*pow(kappa/s, 2); ciIm.push_back(c7Im);
114  }
115  //else if ((!isGammaV1 || !isGammaV2) && !(Vdecay1==RooSpin::kVdecayType_GammaOnshell && Vdecay2==RooSpin::kVdecayType_GammaOnshell)){ // ZGs/ZG
116  //???
117  //}
118  //else{ // GG/GGs
119  else{ // Z/G/Gs - G/Gs
120  Double_t c1Re = 2.*(b1Val + b2Val*kappa*(1.+m1sq/s)*(1.+m2sq/s)); ciRe.push_back(c1Re);
121  Double_t c2Re = -0.5*b1Val + b3Val*kappa*(1.-(m1sq+m2sq)/(2*s)) + 2.*b4Val*kappa; ciRe.push_back(c2Re);
122  Double_t c3Re = -(b2Val/2.+b3Val+2.*b4Val)*kappa*m12sq/s; ciRe.push_back(c3Re);
123  Double_t c41Re = -b1Val - b2Val*kappa - (b2Val*m1sq+b3Val*m2sq)*kappa/s; ciRe.push_back(c41Re);
124  Double_t c42Re = -b1Val - b2Val*kappa - (b2Val*m2sq+b3Val*m1sq)*kappa/s; ciRe.push_back(c42Re);
125  Double_t c5Re = 2.*b8Val*kappa*(m12sq)/s; ciRe.push_back(c5Re);
126  Double_t c6Re = 0; ciRe.push_back(c6Re);
127  Double_t c7Re = 0; ciRe.push_back(c7Re);
128 
129  Double_t c1Im = 2.*(b1ValIm + b2ValIm*kappa*(1.+m1sq/s)*(1.+m2sq/s)); ciIm.push_back(c1Im);
130  Double_t c2Im = -0.5*b1ValIm + b3ValIm*kappa*(1.-(m1sq+m2sq)/(2*s)) + 2.*b4ValIm*kappa; ciIm.push_back(c2Im);
131  Double_t c3Im = -(b2ValIm/2.+b3ValIm+2.*b4ValIm)*kappa*m12sq/s; ciIm.push_back(c3Im);
132  Double_t c41Im = -b1ValIm - b2ValIm*kappa - (b2ValIm*m1sq+b3ValIm*m2sq)*kappa/s; ciIm.push_back(c41Im);
133  Double_t c42Im = -b1ValIm - b2ValIm*kappa - (b2ValIm*m2sq+b3ValIm*m1sq)*kappa/s; ciIm.push_back(c42Im);
134  Double_t c5Im = 2.*b8ValIm*kappa*(m12sq)/s; ciIm.push_back(c5Im);
135  Double_t c6Im = 0; ciIm.push_back(c6Im);
136  Double_t c7Im = 0; ciIm.push_back(c7Im);
137  }
138 }
140  Double_t& A00Re, Double_t& A00Im,
141  Double_t& AppRe, Double_t& AppIm, Double_t& A0pRe, Double_t& A0pIm, Double_t& Ap0Re, Double_t& Ap0Im,
142  Double_t& AmmRe, Double_t& AmmIm, Double_t& A0mRe, Double_t& A0mIm, Double_t& Am0Re, Double_t& Am0Im,
143  Double_t& ApmRe, Double_t& ApmIm, Double_t& AmpRe, Double_t& AmpIm,
144  bool isGammaV1, bool isGammaV2
145  )const{
146  Double_t m1_=m1; if (Vdecay1==RooSpin::kVdecayType_GammaOnshell) m1_=0;
147  Double_t m2_=m2; if (Vdecay2==RooSpin::kVdecayType_GammaOnshell) m2_=0;
148 
149  std::vector<Double_t> ciRe;
150  std::vector<Double_t> ciIm;
151  calculateCi(ciRe, ciIm, isGammaV1, isGammaV2);
152 
153  Double_t propV1Re=1, propV2Re=1, propHRe=1;
154  Double_t propV1Im=0, propV2Im=0, propHIm=0;
155  if (Vdecay1!=RooSpin::kVdecayType_GammaOnshell) calculatePropagator(propV1Re, propV1Im, m1_, (isGammaV1 ? 0 : 1));
156  if (Vdecay2!=RooSpin::kVdecayType_GammaOnshell) calculatePropagator(propV2Re, propV2Im, m2_, (isGammaV2 ? 0 : 1));
157  calculatePropagator(propHRe, propHIm, m12, 2);
158 
159  Double_t ampScale = calculateAmplitudeScale((int) isGammaV1, (int) isGammaV2)*pow(GeVunit/Lambda, 2);
160 
161  Double_t c1Re = ciRe.at(0);
162  Double_t c2Re = ciRe.at(1);
163  Double_t c3Re = ciRe.at(2);
164  Double_t c41Re = ciRe.at(3);
165  Double_t c42Re = ciRe.at(4);
166  Double_t c5Re = ciRe.at(5);
167  Double_t c6Re = ciRe.at(6);
168  Double_t c7Re = ciRe.at(7);
169  Double_t c1Im = ciIm.at(0);
170  Double_t c2Im = ciIm.at(1);
171  Double_t c3Im = ciIm.at(2);
172  Double_t c41Im = ciIm.at(3);
173  Double_t c42Im = ciIm.at(4);
174  Double_t c5Im = ciIm.at(5);
175  Double_t c6Im = ciIm.at(6);
176  Double_t c7Im = ciIm.at(7);
177 
178  Double_t eta1 = m1_ / m12;
179  Double_t eta2 = m2_ / m12;
180  Double_t eta1p2 = eta1*eta2;
181 
182  Double_t eta1sq = eta1*eta1;
183  Double_t eta2sq = eta2*eta2;
184  Double_t eta1p2sq = pow(eta1p2, 2);
185 
186  Double_t etas = (1. - eta1sq - eta2sq)/2.;
187  if (pow(eta1+eta2, 2)>1.) etas = -etas;
188  Double_t x = etas;
189  Double_t xsq = x*x;
190  Double_t xxp = (pow(etas, 2)-eta1p2sq);
191  if (xxp<0) xxp=0;
192 
193  Double_t A00Re_tmp=0, A00Im_tmp=0,
194  AppRe_tmp=0, AppIm_tmp=0, A0pRe_tmp=0, A0pIm_tmp=0, Ap0Re_tmp=0, Ap0Im_tmp=0,
195  AmmRe_tmp=0, AmmIm_tmp=0, A0mRe_tmp=0, A0mIm_tmp=0, Am0Re_tmp=0, Am0Im_tmp=0,
196  ApmRe_tmp=0, ApmIm_tmp=0, AmpRe_tmp=0, AmpIm_tmp=0;
197 
199  A00Re_tmp =
200  pow(m12, 4)*sqrt(2./3.)*
201  (
202  c1Re*(
203  eta1p2sq * (xsq - eta1p2sq/4.)
204  - (pow(eta1, 4)+pow(eta2, 4)) * xsq/2.
205  + (pow(eta1, 8)+pow(eta2, 8))/8.
206  + xsq/2.
207  - (pow(eta1, 4)+pow(eta2, 4))/4.
208  + 1.0/8.
209  )
210  + c2Re*2.*xxp*(
211  (pow(eta1, 4) + pow(eta2, 4))
212  - 2.*(eta1p2sq + 2.*xxp)
213  - 1.
214  )
215  -c3Re*8.*pow(xxp, 2)
216  + c41Re*2.*xxp*(1.+eta1sq-eta2sq)
217  + c42Re*2.*xxp*(1.-eta1sq+eta2sq)
218  );
219 
220  A00Im_tmp =
221  pow(m12, 4)*sqrt(2./3.)*
222  (
223  c1Im*(
224  eta1p2sq * (xsq - eta1p2sq/4.)
225  - (pow(eta1, 4)+pow(eta2, 4)) * xsq/2.
226  + (pow(eta1, 8)+pow(eta2, 8))/8.
227  + xsq/2.
228  - (pow(eta1, 4)+pow(eta2, 4))/4.
229  + 1.0/8.
230  )
231  + c2Im*2.*xxp*(
232  (pow(eta1, 4) + pow(eta2, 4))
233  - 2.*(eta1p2sq + 2.*xxp)
234  - 1.
235  )
236  -c3Im*8.*pow(xxp, 2)
237  + c41Im*2.*xxp*(1.+eta1sq-eta2sq)
238  + c42Im*2.*xxp*(1.-eta1sq+eta2sq)
239  );
240  }
241 
242  //-----------------------------------------------------------------------
243  // No m1_/m2_ singularities in A--
244 
245  AmmRe_tmp =
246  pow(m12, 4)/sqrt(6.)*
247  (
248  c1Re/4.*(
249  1. + 4.*xxp - pow(eta1sq-eta2sq, 2)
250  )
251  + c2Re*8.*xxp
252  + c5Im*8.*pow(xxp, 1.5)
253  - c6Im*4.*sqrt(xxp)
254  );
255 
256  AmmIm_tmp =
257  pow(m12, 4)/sqrt(6.)*
258  (
259  c1Im/4.*(
260  1. + 4.*xxp - pow(eta1sq-eta2sq, 2)
261  )
262  + c2Im*8.*xxp
263  - c5Re*8.*pow(xxp, 1.5)
264  + c6Re*4.*sqrt(xxp)
265  );
266 
267  //-----------------------------------------------------------------------
268  // No m1_/m2_ singularities in A++
269 
270  AppRe_tmp =
271  pow(m12, 4)/sqrt(6.)*
272  (
273  c1Re/4.*(
274  1. + 4.*xxp - pow(eta1sq-eta2sq, 2)
275  )
276  + c2Re*8.*xxp
277  - c5Im*8.*pow(xxp, 1.5)
278  + c6Im*4.*sqrt(xxp)
279  );
280 
281  AppIm_tmp =
282  pow(m12, 4)/sqrt(6.)*
283  (
284  c1Im/4.*(
285  1. + 4.*xxp - pow(eta1sq-eta2sq, 2)
286  )
287  + c2Im*8.*xxp
288  + c5Re*8.*pow(xxp, 1.5)
289  - c6Re*4.*sqrt(xxp)
290  );
291 
292  //-----------------------------------------------------------------------
293  // No m1_/m2_ singularities in A+- or A-+
294 
295  AmpRe_tmp = pow(m12, 4)*(c1Re/4.*(1.+4.*xxp-pow(eta1sq-eta2sq, 2)));
296  AmpIm_tmp = pow(m12, 4)*(c1Im/4.*(1.+4.*xxp-pow(eta1sq-eta2sq, 2)));
297  if (Vdecay1!=RooSpin::kVdecayType_GammaOnshell) { AmmIm_tmp *= eta1; AmmRe_tmp *= eta1; AppIm_tmp *= eta1; AppRe_tmp *= eta1; AmpIm_tmp *= eta1; AmpRe_tmp *= eta1; } // Do these multiplications here...
298  if (Vdecay2!=RooSpin::kVdecayType_GammaOnshell) { AmmIm_tmp *= eta2; AmmRe_tmp *= eta2; AppIm_tmp *= eta2; AppRe_tmp *= eta2; AmpIm_tmp *= eta2; AmpRe_tmp *= eta2; }
299  ApmRe_tmp = AmpRe_tmp; // ...for this reason!
300  ApmIm_tmp = AmpIm_tmp;
301 
302  //-----------------------------------------------------------------------
303 
304  Double_t A0m_0p_m0_p0_c4factor = 2.*xxp;
305  Double_t A0m_0p_m0_p0_c7factor = 4.*pow(xxp, 1.5); // x+-i
306 
308  Double_t A0m_0p_c1factor = (
309  -(pow(eta1, 6)-pow(eta2, 6))/8.
310  + (eta1sq-eta2sq)*(3.*eta1p2sq + 4.*xxp)/8.
311  - pow(eta1sq-eta2sq, 2)/8.
312  + xxp/2.
313  + (1. + (eta1sq-eta2sq))/8.
314  );
315  Double_t A0m_0p_c6factor = sqrt(xxp)*(1.+eta1sq-eta2sq); // x+-i
316 
317  A0mRe_tmp =
318  pow(m12, 4)*
319  (
320  c1Re*A0m_0p_c1factor
321  + c42Re*A0m_0p_m0_p0_c4factor
322  - c6Im*A0m_0p_c6factor
323  - c7Im*A0m_0p_m0_p0_c7factor
324  );
325 
326  A0mIm_tmp =
327  pow(m12, 4)*
328  (
329  c1Im*A0m_0p_c1factor
330  + c42Im*A0m_0p_m0_p0_c4factor
331  + c6Re*A0m_0p_c6factor
332  + c7Re*A0m_0p_m0_p0_c7factor
333  );
334 
335  //-----------------------------------------------------------------------
336 
337  A0pRe_tmp =
338  pow(m12, 4)*
339  (
340  c1Re*A0m_0p_c1factor
341  + c42Re*A0m_0p_m0_p0_c4factor
342  + c6Im*A0m_0p_c6factor
343  + c7Im*A0m_0p_m0_p0_c7factor
344  );
345 
346  A0pIm_tmp =
347  pow(m12, 4)*
348  (
349  c1Im*A0m_0p_c1factor
350  + c42Im*A0m_0p_m0_p0_c4factor
351  - c6Re*A0m_0p_c6factor
352  - c7Re*A0m_0p_m0_p0_c7factor
353  );
354 
356  A0mIm_tmp *= eta2; A0mRe_tmp *= eta2;
357  A0pIm_tmp *= eta2; A0pRe_tmp *= eta2;
358  }
359  }
360 
361  //-----------------------------------------------------------------------
362 
364  Double_t Am0_p0_c1factor = (
365  (pow(eta1, 6)-pow(eta2, 6))/8.
366  - (eta1sq-eta2sq)*(3.*eta1p2sq + 4.*xxp)/8.
367  - pow(eta1sq-eta2sq, 2)/8.
368  + xxp/2.
369  + (1. - (eta1sq-eta2sq))/8.
370  );
371  Double_t Am0_p0_c6factor = sqrt(xxp)*(1.-eta1sq+eta2sq); // x+-i
372 
373  Am0Re_tmp =
374  pow(m12, 4)*
375  (
376  c1Re*Am0_p0_c1factor
377  + c41Re*A0m_0p_m0_p0_c4factor
378  - c6Im*Am0_p0_c6factor
379  - c7Im*A0m_0p_m0_p0_c7factor
380  );
381 
382  Am0Im_tmp =
383  pow(m12, 4)*
384  (
385  c1Im*Am0_p0_c1factor
386  + c41Im*A0m_0p_m0_p0_c4factor
387  + c6Re*Am0_p0_c6factor
388  + c7Re*A0m_0p_m0_p0_c7factor
389  );
390 
391  //-----------------------------------------------------------------------
392 
393  Ap0Re_tmp =
394  pow(m12, 4)*
395  (
396  c1Re*Am0_p0_c1factor
397  + c41Re*A0m_0p_m0_p0_c4factor
398  + c6Im*Am0_p0_c6factor
399  + c7Im*A0m_0p_m0_p0_c7factor
400  );
401 
402  Ap0Im_tmp =
403  pow(m12, 4)*
404  (
405  c1Im*Am0_p0_c1factor
406  + c41Im*A0m_0p_m0_p0_c4factor
407  - c6Re*Am0_p0_c6factor
408  - c7Re*A0m_0p_m0_p0_c7factor
409  );
410 
412  Am0Im_tmp *= eta1; Am0Re_tmp *= eta1;
413  Ap0Im_tmp *= eta1; Ap0Re_tmp *= eta1;
414  }
415  }
416 
417  //-----------------------------------------------------------------------
418 
419  A00Re_tmp *= ampScale;
420  AmmRe_tmp *= ampScale;
421  AppRe_tmp *= ampScale;
422  A0mRe_tmp *= ampScale;
423  A0pRe_tmp *= ampScale;
424  Am0Re_tmp *= ampScale;
425  Ap0Re_tmp *= ampScale;
426  AmpRe_tmp *= ampScale;
427  ApmRe_tmp *= ampScale;
428  A00Im_tmp *= ampScale;
429  AmmIm_tmp *= ampScale;
430  AppIm_tmp *= ampScale;
431  A0mIm_tmp *= ampScale;
432  A0pIm_tmp *= ampScale;
433  Am0Im_tmp *= ampScale;
434  Ap0Im_tmp *= ampScale;
435  AmpIm_tmp *= ampScale;
436  ApmIm_tmp *= ampScale;
437 
438  std::vector<Double_t> A00_reals, A00_imags; A00_reals.push_back(A00Re_tmp); A00_imags.push_back(A00Im_tmp); A00_reals.push_back(propV1Re); A00_imags.push_back(propV1Im); A00_reals.push_back(propV2Re); A00_imags.push_back(propV2Im); A00_reals.push_back(propHRe); A00_imags.push_back(propHIm); AnaMelaHelpers::multiplyComplexNumbers(A00_reals, A00_imags, A00Re, A00Im);
439  std::vector<Double_t> Amm_reals, Amm_imags; Amm_reals.push_back(AmmRe_tmp); Amm_imags.push_back(AmmIm_tmp); Amm_reals.push_back(propV1Re); Amm_imags.push_back(propV1Im); Amm_reals.push_back(propV2Re); Amm_imags.push_back(propV2Im); Amm_reals.push_back(propHRe); Amm_imags.push_back(propHIm); AnaMelaHelpers::multiplyComplexNumbers(Amm_reals, Amm_imags, AmmRe, AmmIm);
440  std::vector<Double_t> App_reals, App_imags; App_reals.push_back(AppRe_tmp); App_imags.push_back(AppIm_tmp); App_reals.push_back(propV1Re); App_imags.push_back(propV1Im); App_reals.push_back(propV2Re); App_imags.push_back(propV2Im); App_reals.push_back(propHRe); App_imags.push_back(propHIm); AnaMelaHelpers::multiplyComplexNumbers(App_reals, App_imags, AppRe, AppIm);
441  std::vector<Double_t> A0m_reals, A0m_imags; A0m_reals.push_back(A0mRe_tmp); A0m_imags.push_back(A0mIm_tmp); A0m_reals.push_back(propV1Re); A0m_imags.push_back(propV1Im); A0m_reals.push_back(propV2Re); A0m_imags.push_back(propV2Im); A0m_reals.push_back(propHRe); A0m_imags.push_back(propHIm); AnaMelaHelpers::multiplyComplexNumbers(A0m_reals, A0m_imags, A0mRe, A0mIm);
442  std::vector<Double_t> A0p_reals, A0p_imags; A0p_reals.push_back(A0pRe_tmp); A0p_imags.push_back(A0pIm_tmp); A0p_reals.push_back(propV1Re); A0p_imags.push_back(propV1Im); A0p_reals.push_back(propV2Re); A0p_imags.push_back(propV2Im); A0p_reals.push_back(propHRe); A0p_imags.push_back(propHIm); AnaMelaHelpers::multiplyComplexNumbers(A0p_reals, A0p_imags, A0pRe, A0pIm);
443  std::vector<Double_t> Am0_reals, Am0_imags; Am0_reals.push_back(Am0Re_tmp); Am0_imags.push_back(Am0Im_tmp); Am0_reals.push_back(propV1Re); Am0_imags.push_back(propV1Im); Am0_reals.push_back(propV2Re); Am0_imags.push_back(propV2Im); Am0_reals.push_back(propHRe); Am0_imags.push_back(propHIm); AnaMelaHelpers::multiplyComplexNumbers(Am0_reals, Am0_imags, Am0Re, Am0Im);
444  std::vector<Double_t> Ap0_reals, Ap0_imags; Ap0_reals.push_back(Ap0Re_tmp); Ap0_imags.push_back(Ap0Im_tmp); Ap0_reals.push_back(propV1Re); Ap0_imags.push_back(propV1Im); Ap0_reals.push_back(propV2Re); Ap0_imags.push_back(propV2Im); Ap0_reals.push_back(propHRe); Ap0_imags.push_back(propHIm); AnaMelaHelpers::multiplyComplexNumbers(Ap0_reals, Ap0_imags, Ap0Re, Ap0Im);
445  std::vector<Double_t> Amp_reals, Amp_imags; Amp_reals.push_back(AmpRe_tmp); Amp_imags.push_back(AmpIm_tmp); Amp_reals.push_back(propV1Re); Amp_imags.push_back(propV1Im); Amp_reals.push_back(propV2Re); Amp_imags.push_back(propV2Im); Amp_reals.push_back(propHRe); Amp_imags.push_back(propHIm); AnaMelaHelpers::multiplyComplexNumbers(Amp_reals, Amp_imags, AmpRe, AmpIm);
446  std::vector<Double_t> Apm_reals, Apm_imags; Apm_reals.push_back(ApmRe_tmp); Apm_imags.push_back(ApmIm_tmp); Apm_reals.push_back(propV1Re); Apm_imags.push_back(propV1Im); Apm_reals.push_back(propV2Re); Apm_imags.push_back(propV2Im); Apm_reals.push_back(propHRe); Apm_imags.push_back(propHIm); AnaMelaHelpers::multiplyComplexNumbers(Apm_reals, Apm_imags, ApmRe, ApmIm);
447 
448 
449  if (
450  A00Re!=A00Re || A00Im!=A00Im ||
451  AppRe!=AppRe || AppIm!=AppIm ||
452  AmmRe!=AmmRe || AmmIm!=AmmIm ||
453  A0pRe!=A0pRe || A0pIm!=A0pIm ||
454  A0mRe!=A0mRe || A0mIm!=A0mIm ||
455  Ap0Re!=Ap0Re || Ap0Im!=Ap0Im ||
456  Am0Re!=Am0Re || Am0Im!=Am0Im ||
457  ApmRe!=ApmRe || ApmIm!=ApmIm ||
458  AmpRe!=AmpRe || AmpIm!=AmpIm ||
459  (
460  A00Re==0 && A00Im==0 &&
461  AppRe==0 && AppIm==0 &&
462  AmmRe==0 && AmmIm==0 &&
463  A0pRe==0 && A0pIm==0 &&
464  A0mRe==0 && A0mIm==0 &&
465  Ap0Re==0 && Ap0Im==0 &&
466  Am0Re==0 && Am0Im==0 &&
467  ApmRe==0 && ApmIm==0 &&
468  AmpRe==0 && AmpIm==0
469  )
470  ){
471  MELAerr << "Some of the amplitudes are NaN or all are 0:" << endl;
472  MELAerr << "A00Re=" << A00Re << ", A00Im=" << A00Im << endl;
473  MELAerr << "AppRe=" << AppRe << ", AppIm=" << AppIm << endl;
474  MELAerr << "AmmRe=" << AmmRe << ", AmmIm=" << AmmIm << endl;
475  MELAerr << "A0pRe=" << A0pRe << ", A0pIm=" << A0pIm << endl;
476  MELAerr << "A0mRe=" << A0mRe << ", A0mIm=" << A0mIm << endl;
477  MELAerr << "Ap0Re=" << Ap0Re << ", Ap0Im=" << Ap0Im << endl;
478  MELAerr << "Am0Re=" << Am0Re << ", Am0Im=" << Am0Im << endl;
479  MELAerr << "ApmRe=" << ApmRe << ", ApmIm=" << ApmIm << endl;
480  MELAerr << "AmpRe=" << AmpRe << ", AmpIm=" << AmpIm << endl;
481 
482  MELAerr << "Possible causes are" << endl;
483  MELAerr << "m12=" << m12 << endl;
484  MELAerr << "m1=" << m1_ << endl;
485  MELAerr << "m2=" << m2_ << endl;
486  MELAerr << "x=" << x << endl;
487  MELAerr << "xxp=" << xxp << endl;
488 
489  MELAerr << "c1 = (" << c1Re << ", " << c1Im << ")" << endl;
490  MELAerr << "c2 = (" << c2Re << ", " << c2Im << ")" << endl;
491  MELAerr << "c3 = (" << c3Re << ", " << c3Im << ")" << endl;
492  MELAerr << "c41 = (" << c41Re << ", " << c41Im << ")" << endl;
493  MELAerr << "c42 = (" << c42Re << ", " << c42Im << ")" << endl;
494  MELAerr << "c5 = (" << c5Re << ", " << c5Im << ")" << endl;
495  MELAerr << "c6 = (" << c6Re << ", " << c6Im << ")" << endl;
496  MELAerr << "c7 = (" << c7Re << ", " << c7Im << ")" << endl;
497  }
498 
499  return;
500 }
501 
503  MELAout << "b1: (" << b1Val << ", " << b1ValIm << ")" << endl;
504  MELAout << "b2: (" << b2Val << ", " << b2ValIm << ")" << endl;
505  MELAout << "b3: (" << b3Val << ", " << b3ValIm << ")" << endl;
506  MELAout << "b4: (" << b4Val << ", " << b4ValIm << ")" << endl;
507  MELAout << "b5: (" << b5Val << ", " << b5ValIm << ")" << endl;
508  MELAout << "b6: (" << b6Val << ", " << b6ValIm << ")" << endl;
509  MELAout << "b7: (" << b7Val << ", " << b7ValIm << ")" << endl;
510  MELAout << "b8: (" << b8Val << ", " << b8ValIm << ")" << endl;
511  MELAout << "b9: (" << b9Val << ", " << b9ValIm << ")" << endl;
512  MELAout << "b10: (" << b10Val << ", " << b10ValIm << ")" << endl;
513  MELAout << "Lambda: " << Lambda << endl;
514  MELAout << "f_spinz1: " << f_spinz1 << endl;
515  MELAout << "f_spinz2: " << f_spinz2 << endl;
516 
518 }
RooSpin::calculateAmplitudeScale
virtual Double_t calculateAmplitudeScale(int VGammaVpmode1=0, int VGammaVpmode2=0) const
Definition: RooSpin.cc:366
RooSpin::printParameters
virtual void printParameters() const
Definition: RooSpin.cc:397
RooSpinTwo.h
RooSpinTwo::b5ValIm
RooRealProxy b5ValIm
Definition: RooSpinTwo.h:54
TVar::VerbosityLevel
VerbosityLevel
Definition: TVar.hh:47
gGRAVITON_VV_10
@ gGRAVITON_VV_10
Definition: raw_couplings.txt:144
RooSpinTwo::f_spinz1
RooRealProxy f_spinz1
Definition: RooSpinTwo.h:63
RooSpinTwo::f_spinz2
RooRealProxy f_spinz2
Definition: RooSpinTwo.h:64
RooSpin::m12
RooRealProxy m12
Definition: RooSpin.h:113
RooSpin::calculatePropagator
virtual void calculatePropagator(Double_t &propRe, Double_t &propIm, Double_t mass, Int_t propType=1) const
Definition: RooSpin.cc:133
RooSpinTwo::b7Val
RooRealProxy b7Val
Definition: RooSpinTwo.h:45
RooSpinTwo::b2ValIm
RooRealProxy b2ValIm
Definition: RooSpinTwo.h:51
RooSpinTwo::b4ValIm
RooRealProxy b4ValIm
Definition: RooSpinTwo.h:53
gGRAVITON_VV_1
@ gGRAVITON_VV_1
Definition: raw_couplings.txt:135
RooSpinTwo::calculateAmplitudes
virtual void calculateAmplitudes(Double_t &A00Re, Double_t &A00Im, Double_t &AppRe, Double_t &AppIm, Double_t &A0pRe, Double_t &A0pIm, Double_t &Ap0Re, Double_t &Ap0Im, Double_t &AmmRe, Double_t &AmmIm, Double_t &A0mRe, Double_t &A0mIm, Double_t &Am0Re, Double_t &Am0Im, Double_t &ApmRe, Double_t &ApmIm, Double_t &AmpRe, Double_t &AmpIm, bool isGammaV1=false, bool isGammaV2=false) const
Definition: RooSpinTwo.cc:139
RooSpin::m1
RooRealProxy m1
Definition: RooSpin.h:111
RooSpinTwo::b2Val
RooRealProxy b2Val
Definition: RooSpinTwo.h:40
RooSpinTwo::calculateCi
virtual void calculateCi(std::vector< Double_t > &ciRe, std::vector< Double_t > &ciIm, bool isGammaV1=false, bool isGammaV2=false) const
Definition: RooSpinTwo.cc:81
RooSpinTwo::b10ValIm
RooRealProxy b10ValIm
Definition: RooSpinTwo.h:59
AnaMelaHelpers::multiplyComplexNumbers
void multiplyComplexNumbers(std::vector< Double_t > const &reals, std::vector< Double_t > const &imags, Double_t &resRe, Double_t &resIm)
Definition: RooSpin.cc:7
RooSpinTwo::b4Val
RooRealProxy b4Val
Definition: RooSpinTwo.h:42
gGRAVITON_VV_9
@ gGRAVITON_VV_9
Definition: raw_couplings.txt:143
MELAStreamHelpers::MELAout
MELAOutputStreamer MELAout
RooSpinTwo::b7ValIm
RooRealProxy b7ValIm
Definition: RooSpinTwo.h:56
modparameters::kappa
complex(8), public kappa
Definition: mod_Parameters.F90:882
gGRAVITON_VV_2
@ gGRAVITON_VV_2
Definition: raw_couplings.txt:136
RooSpinTwo::b8ValIm
RooRealProxy b8ValIm
Definition: RooSpinTwo.h:57
RooSpin::Vdecay2
RooSpin::VdecayType Vdecay2
Definition: RooSpin.h:136
RooSpinTwo::b5Val
RooRealProxy b5Val
Definition: RooSpinTwo.h:43
RooSpinTwo::b9ValIm
RooRealProxy b9ValIm
Definition: RooSpinTwo.h:58
RooSpin::kVdecayType_GammaOnshell
@ kVdecayType_GammaOnshell
Definition: RooSpin.h:30
gGRAVITON_VV_4
@ gGRAVITON_VV_4
Definition: raw_couplings.txt:138
gGRAVITON_VV_5
@ gGRAVITON_VV_5
Definition: raw_couplings.txt:139
RooSpinTwo::b6Val
RooRealProxy b6Val
Definition: RooSpinTwo.h:44
RooSpin
Definition: RooSpin.h:25
RooSpinTwo::modelCouplings
Definition: RooSpinTwo.h:10
RooSpinTwo::b3Val
RooRealProxy b3Val
Definition: RooSpinTwo.h:41
RooSpinTwo::b10Val
RooRealProxy b10Val
Definition: RooSpinTwo.h:48
RooSpinTwo::b1ValIm
RooRealProxy b1ValIm
Definition: RooSpinTwo.h:50
RooSpinTwo::Lambda
RooRealProxy Lambda
Definition: RooSpinTwo.h:61
RooSpin::m2
RooRealProxy m2
Definition: RooSpin.h:112
gGRAVITON_VV_3
@ gGRAVITON_VV_3
Definition: raw_couplings.txt:137
RooSpinTwo::b8Val
RooRealProxy b8Val
Definition: RooSpinTwo.h:46
MELAStreamHelpers::MELAerr
MELAOutputStreamer MELAerr
gGRAVITON_VV_8
@ gGRAVITON_VV_8
Definition: raw_couplings.txt:142
gGRAVITON_VV_6
@ gGRAVITON_VV_6
Definition: raw_couplings.txt:140
MELAStreamHelpers
Definition: MELAStreamHelpers.hh:7
RooSpinTwo::b3ValIm
RooRealProxy b3ValIm
Definition: RooSpinTwo.h:52
RooSpinTwo::printParameters
virtual void printParameters() const
Definition: RooSpinTwo.cc:502
RooSpin::GeVunit
static constexpr Double_t GeVunit
Definition: RooSpin.h:141
RooSpin::getMVGamV
virtual void getMVGamV(Double_t *mV=0, Double_t *gamV=0) const
Definition: RooSpin.cc:305
RooSpinTwo::b9Val
RooRealProxy b9Val
Definition: RooSpinTwo.h:47
RooSpin::Vdecay1
RooSpin::VdecayType Vdecay1
Definition: RooSpin.h:135
RooSpin::modelMeasurables
Definition: RooSpin.h:50
RooSpin::modelParameters
Definition: RooSpin.h:61
RooSpinTwo::RooSpinTwo
RooSpinTwo()
Definition: RooSpinTwo.cc:7
RooSpinTwo::b6ValIm
RooRealProxy b6ValIm
Definition: RooSpinTwo.h:55
gGRAVITON_VV_7
@ gGRAVITON_VV_7
Definition: raw_couplings.txt:141
RooSpin::VdecayType
VdecayType
Definition: RooSpin.h:28
RooSpinTwo::b1Val
RooRealProxy b1Val
Definition: RooSpinTwo.h:39
RooSpinTwo
Definition: RooSpinTwo.h:7