MINT2
Calculate4BodyProps.cpp
Go to the documentation of this file.
1 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
2 // status: Mon 9 Feb 2009 19:17:59 GMT
4 
5 #include <iostream>
6 #include <vector>
7 #include <algorithm>
8 
9 #include "TMatrixD.h"
10 #include "TMatrixDSym.h"
11 #include "TLorentzVector.h"
12 
14 
15 #include "Mint/Utils.h"
16 
17 using namespace std;
18 
19 Calculate4BodyProps::Calculate4BodyProps(double t01_in, double s12_in
20  , double s23_in, double s34_in
21  , double t40_in
22  , double m0_in
23  , double m1_in
24  , double m2_in
25  , double m3_in
26  , double m4_in
27  ){
28  set(t01_in, s12_in, s23_in, s34_in, t40_in
29  , m0_in, m1_in, m2_in, m3_in, m4_in);
30 }
31 
33  _t01 = other._t01;
34  _s12 = other._s12;
35  _s23 = other._s23;
36  _s34 = other._s34;
37  _t40 = other._t40;
38 
39  for(int i=0; i<5; i++){
40  m[i]=other.m[i];
41  for(int j=0; j<5; j++){
42  stij[i][j] = other.stij[i][j];
43  xij[i][j] = other.xij[i][j];
44  }
45  }
46 
47  _K4 = other._K4;
48  _K3_12 = other._K3_12;
49  _s124 = other._s124;
50  _K3_23 = other._K3_23;
51  _s14 = other._s14;
52 
53  _K3_34 = other._K3_34;
54  _s134 = other._s134;
55  _s13_plus_s24 = other._s13_plus_s24;
56 
57  _s13_minus_s24 = other._s13_minus_s24;
58  _s13 = other._s13;
59  _s24 = other._s24;
60 
61  _BDet = other._BDet;
62  _Delta4 = other._Delta4;
63  _Delta3 = other._Delta3;
64  _Delta2 = other._Delta2;
65 
66  _p1 = other._p1;
67  _p2 = other._p2;
68  _p3 = other._p3;
69  _p4 = other._p4;
70  _p0 = other._p0;
71 
72  knowK4 = other.knowK4;
73  knowK3_12 = other.knowK3_12;
74  knows124 = other.knows124;
75  knowK3_23 = other.knowK3_23;
76  knows14 = other.knows14;
77 
78  knowK3_34 = other.knowK3_34;
79  knows134 = other.knows134;
80  knows13_plus_s24 = other.knows13_plus_s24;
81 
82  knows13_minus_s24 = other.knows13_minus_s24;
83  knows13 = other.knows13;
84  knows24 = other.knows24;
85 
86  knowBDet = other.knowBDet;
87  knowstij = other.knowstij;
88 
89  knowDelta4 = other.knowDelta4;
90  knowDelta3 = other.knowDelta3;
91  knowDelta2 = other.knowDelta2;
92 
93  knowp1 = other.knowp1;
94  knowp2 = other.knowp2;
95  knowp3 = other.knowp3;
96  knowp4 = other.knowp4;
97  knowp0 = other.knowp0;
98 
99 }
100 
101 
102 void Calculate4BodyProps::set(double t01_in, double s12_in
103  , double s23_in, double s34_in
104  , double t40_in
105  , double m0_in
106  , double m1_in
107  , double m2_in
108  , double m3_in
109  , double m4_in
110  ){
111  _t01=t01_in;
112  _s12=s12_in;
113  _s23=s23_in;
114  _s34=s34_in;
115  _t40=t40_in;
116  m[0] = m0_in;
117  m[1] = m1_in;
118  m[2] = m2_in;
119  m[3] = m3_in;
120  m[4] = m4_in;
121 
122  knowNothing();
123 }
124 
125 void Calculate4BodyProps::set(double t01_in, double s12_in
126  , double s23_in, double s34_in
127  , double t40_in
128  , double m_in[5]
129  ){
130  _t01=t01_in;
131  _s12=s12_in;
132  _s23=s23_in;
133  _s34=s34_in;
134  _t40=t40_in;
135  for(int i=0; i<5; i++) m[i]=m_in[i];
136 
137  knowNothing();
138 }
139 
140 void Calculate4BodyProps::setWithSameMass(double t01_in, double s12_in
141  , double s23_in, double s34_in
142  , double t40_in
143  ){
144  _t01=t01_in;
145  _s12=s12_in;
146  _s23=s23_in;
147  _s34=s34_in;
148  _t40=t40_in;
149 
150  knowNothing();
151 }
153  knowK4=knowK3_12=knows124=knowK3_23=knows14=false;
154  knowK3_34=knows134=knows13_plus_s24=false;
155  knows13_minus_s24=knows13=knows24=false;
156  knowBDet=knowstij=false;
157  knowDelta4=knowDelta3=knowDelta2=false;
158 
159  knowp1=knowp2=knowp3=knowp4=knowp0=false;
160 }
161 
163  , double& s12Max
164  , double _s23
165  , double _mumM
166  , double _d1M
167  , double _d2M
168  , double _d3M
169  ){
170 
171  s12Min = s12Max = -9999;
172  double s23AbsMin = (_d2M + _d3M)*(_d2M + _d3M);
173  double s23AbsMax = (_mumM - _d1M)*(_mumM - _d1M);
174 
175  if(_s23 < 0) return 0;
176  if(_s23 < s23AbsMin) return false;
177  if(_s23 > s23AbsMax) return false;
178 
179 
180  double mumMsq = _mumM * _mumM;
181 
182  if(_s23 > mumMsq) return false;
183 
184  double m1sq=_d1M*_d1M, m2sq=_d2M*_d2M, m3sq=_d3M*_d3M;
185 
186  double m23 = sqrt(_s23);
187  double E3 = (_s23 - m2sq + m3sq)/(2*m23);
188  if(E3 < _d3M) return false;
189 
190  double E1 = (mumMsq - _s23 - m1sq)/(2*m23);
191  if(E1 < _d1M) return false;
192 
193  double E3_E1sq = (E3+E1)*(E3+E1);
194  double p3_23 = sqrt(E3*E3 - m3sq); // p2 in m12 restframe
195  double p1_23 = sqrt(E1*E1 - m1sq);
196  double P_minSq = (p3_23 - p1_23)*(p3_23 - p1_23);
197  double P_maxSq = (p3_23 + p1_23)*(p3_23 + p1_23);
198 
199  s12Max = E3_E1sq - P_minSq;
200  s12Min = E3_E1sq - P_maxSq;
201  if(false)cout << "s12Max s12Min "
202  << s12Max << ", "
203  << s12Min << endl;
204  return true;
205 }
206 
207  // for 4 body decays:
208  // K4 := m0sq + 2(m1sq + m2sq + m3sq +m4q)
209  // = s12 + s13 + s14 + s23 + s24 + s34
210  // K4 - s12 - s23 - s34 = s13 + s14 + s24;
211  //
212  // for 3 body decays (there's no missing factor 2).
213  // K3 := m0sq + m1sq + m2sq + m3sq = s12 + s23 + s13
214  // so s13 = K3 - s12 - s23.
215  //
216 
217 double Calculate4BodyProps::pij(int i, int j){
218  if(! knowstij) fill_stij();
219  return xij[i][j];
220 }
221 
222 double Calculate4BodyProps::G(int p, int q){
223  if(! knowstij) fill_stij();
224  return xij[p][q];
225 }
226 
227 double Calculate4BodyProps::G(int p1, int p2, int q1, int q2){
228  TMatrixD m(2,2);
229  if(! knowstij) fill_stij();
230  m(0,0) = xij[p1][q1];
231  m(0,1) = xij[p1][q2];
232  m(1,0) = xij[p2][q1];
233  m(1,1) = xij[p2][q2];
234 
235  return m.Determinant();
236 }
237 
238 double Calculate4BodyProps::G(int p1, int p2, int p3
239  , int q1, int q2, int q3){
240  TMatrixD m(3,3);
241  if(! knowstij) fill_stij();
242  m(0,0) = xij[p1][q1];
243  m(0,1) = xij[p1][q2];
244  m(0,2) = xij[p1][q3];
245  m(1,0) = xij[p2][q1];
246  m(1,1) = xij[p2][q2];
247  m(1,2) = xij[p2][q3];
248  m(2,0) = xij[p3][q1];
249  m(2,1) = xij[p3][q2];
250  m(2,2) = xij[p3][q3];
251 
252  return m.Determinant();
253 }
254 
255 double Calculate4BodyProps::G(int p1, int p2, int p3, int p4
256  , int q1, int q2, int q3, int q4){
257  TMatrixD m(4,4);
258  if(! knowstij) fill_stij();
259  m(0,0) = xij[p1][q1];
260  m(0,1) = xij[p1][q2];
261  m(0,2) = xij[p1][q3];
262  m(0,3) = xij[p1][q4];
263  m(1,0) = xij[p2][q1];
264  m(1,1) = xij[p2][q2];
265  m(1,2) = xij[p2][q3];
266  m(1,3) = xij[p2][q4];
267  m(2,0) = xij[p3][q1];
268  m(2,1) = xij[p3][q2];
269  m(2,2) = xij[p3][q3];
270  m(2,3) = xij[p3][q4];
271  m(3,0) = xij[p4][q1];
272  m(3,1) = xij[p4][q2];
273  m(3,2) = xij[p4][q3];
274  m(3,3) = xij[p4][q4];
275 
276  return m.Determinant();
277 }
278 
280  return G(p1, p1);
281 }
282 double Calculate4BodyProps::Delta(int p1, int p2){
283  return G(p1, p2, p1, p2);
284 }
285 double Calculate4BodyProps::Delta(int p1, int p2, int p3){
286  return G(p1, p2, p3, p1, p2, p3);
287 }
288 double Calculate4BodyProps::Delta(int p1, int p2, int p3, int p4){
289  return G(p1, p2, p3, p4, p1, p2, p3, p4);
290 }
291 
293  if(! knowK4) calcK4();
294  return _K4;
295 }
297  _K4 = m0sq() + 2*(m1sq() + m2sq() + m3sq() + m4sq());
298  knowK4=true;
299 }
301  if(! knowK3_12) calcK3_12();
302  return _K3_12;
303 }
305  // K3_12 := m0sq + m{12}sq + m3sq + m4sq
306  // = s{12}3 + s34 + {s12}4
307  _K3_12 = m0sq() + m12sq() + m3sq() + m4sq();
308  knowK3_12 = true;
309 }
311  if(! knows124) calcs124();
312  return _s124;
313 }
315  _s124 = K3_12() - s123() - s34();
316  knows124 = true;
317 }
318 
320  if(! knowK3_23) calcK3_23();
321  return _K3_23;
322 }
324  // K3_23 := m0sq + m1sq + m{23}sq + m4sq
325  // = s1{23} + s{23}4 + s14
326  _K3_23 = m0sq() + m1sq() + m23sq() + m4sq();
327  knowK3_23 = true;
328 }
329 
331  if(! knows14) calcs14();
332  return _s14;
333 }
335  _s14 = K3_23() - s123() - s234();
336  knows14 = true;
337 }
339  if(! knowK3_34) calcK3_34();
340  return _K3_34;
341 }
343  // K3_34 := m0sq + m1sq + m2sq + m{34}sq
344  // = s12 + s2{34} + s1{34}
345  _K3_34 = m0sq() + m1sq() + m2sq() + m34sq();
346  knowK3_34 = true;
347 }
349  if(! knows134) calcs134();
350  return _s134;
351 }
353  _s134 = K3_34() - s12() - s234();
354  knows134 = true;
355 }
356 
358  if(! knows13_plus_s24) calcs13_plus_s24();
359  return _s13_plus_s24;
360 }
362  // K4 - s12 - s23 - s34 = s13 + s14 + s24;
363  _s13_plus_s24 = K4() - s12() -s23() - s34() - s14();
364  knows13_plus_s24 = true;
365 }
367  if(! knows13_minus_s24) calcs13_minus_s24();
368  return _s13_minus_s24;
369 }
371  // K3 = s12 + s23 + s13
372  // use 1,3 of our 4 particles as "pseudo particle"
373  //
374  // m0sq + m{13}sq + m2sq + m4sq
375  // = s{13}2 + s24 + s{13}4
376  // <=> m{13}sq - s24
377  // = s{13}2 + s{13}4 - (m0sq - m2sq - m4sq)
378  // <=> s13 - s24 = s123 + s134 - (m0sq - m2sq - m4sq)
379 
380  _s13_minus_s24 = s123() + s134() - m0sq() - m2sq() - m4sq();
381 
382  knows13_minus_s24 = true;
383 }
385  if(! knows13) calcs13();
386  return _s13;
387 }
389  _s13 = (s13_plus_s24() + s13_minus_s24())/2.0;
390  knows13 = true;
391 }
393  if(! knows24) calcs24();
394  return _s24;
395 }
397  _s24 = (s13_plus_s24() - s13_minus_s24())/2.0;
398  knows24 = true;
399 }
400 
401 double Calculate4BodyProps::sij(int i, int j){
402  int a = (i < j ? i: j);
403  int b = (i >= j ? i: j);
404  return sij(10*a + b);
405 }
406 double Calculate4BodyProps::sij(const std::vector<int>& v_in){
407  std::vector<int> v = v_in;
408  sort(v.begin(), v.end());
409  int index = 0;
410  int facTen = 1;
411  for(int i= v.size() -1; i>=0; i--){
412  index += facTen * v[i];
413  facTen *= 10;
414  }
415  return sij(index);
416 }
417 
418 
419 double Calculate4BodyProps::sijk(int i, int j, int k){
420  std::vector<int> v;
421  v.push_back(i); v.push_back(j); v.push_back(k);
422  sort(v.begin(), v.end());
423 
424  return sij(100*v[0] + 10*v[1] + v[2]);
425 }
426 
427 double Calculate4BodyProps::sij(int index){
428  switch ( index ){ // VERY! clumsy
429  case 1:
430  return m[1]*m[1];
431  break;
432  case 2:
433  return m[2]*m[2];
434  break;
435  case 3:
436  return m[3]*m[3];
437  break;
438  case 4:
439  return m[4]*m[4];
440  break;
441  case 11:
442  return 4*m[1]*m[1];
443  break;
444  case 22:
445  return 4*m[2]*m[2];
446  break;
447  case 33:
448  return 4*m[3]*m[3];
449  break;
450  case 44:
451  return 4*m[4]*m[4];
452  break;
453  case 12:
454  return s12();
455  break;
456  case 13:
457  return s13();
458  break;
459  case 14:
460  return s14();
461  break;
462  case 23:
463  return s23();
464  break;
465  case 24:
466  return s24();
467  break;
468  case 34:
469  return s34();
470  break;
471  case 123:
472  return s123();
473  break;
474  case 124:
475  return s124();
476  break;
477  case 134:
478  return s134();
479  break;
480  case 234:
481  return s234();
482  break;
483  case 1234:
484  return m[0]*m[0]; // assumes constrained fit.
485  break;
486  default:
487  cout << "Error from Calculate4BodyProps::sij(" << index << ")"
488  << ": Don't understand index " << index << endl;
489  return -9999;
490  }
491 }
492 
493 
495  if(! knowBDet) calcBDet();
496  return _BDet;
497 }
499  /*
500  cout << " for sij " << t01() << ", " << s12() << ", " << s23()
501  << ", " << s34() << ", " << t40() << endl;
502  cout << "\n " << m0sq() << ", " << m1sq() << ", " << m2sq()
503  << ", " << m3sq() << m4sq() << endl;
504  */
505  TMatrixDSym B(6);
506  B(0,0)=0;
507  B(1,0)=B(0,1)=m2sq(); B(1,1) = 0;
508  B(2,0)=B(0,2)=s23() ; B(2,1)=B(1,2) = m3sq(); B(2,2)=0;
509  B(3,0)=B(0,3)=t01() ; B(3,1)=B(1,3) = s34() ; B(3,2)=B(2,3)=m4sq(); B(3,3)=0;
510  B(4,0)=B(0,4)=m1sq(); B(4,1)=B(1,4) = s12() ; B(4,2)=B(2,4)=t40() ; B(4,3)=B(3,4)=m0sq(); B(4,4)=0;
511  B(5,0)=B(0,5)=B(5,1)=B(1,5)=B(5,2)=B(2,5)=B(5,3)=B(3,5)=B(5,4)=B(4,5)=1;
512  B(5,5)=0;
513  // B.Print();
514  _BDet = B.Determinant();
515  // cout << "B " << _BDet << endl;
516  knowBDet = true;
517 }
519  return -BDet()/16.0;
520 }
521 
523  if(knowstij) return;
524  stij[0][0] = 4*m0sq();
525  stij[0][1] = stij[1][0]=t01();
526  stij[0][4] = stij[4][0]=t40(); // not filling any others with 0
527  stij[1][1] = 4*m1sq();
528  stij[1][2] = stij[2][1] = s12();
529  stij[1][3] = stij[3][1] = s13();
530  stij[1][4] = stij[4][1] = s14();
531  stij[2][2] = 4*m2sq();
532  stij[2][3] = stij[3][2] = s23();
533  stij[2][4] = stij[4][2] = s24();
534  stij[3][3] = 4*m3sq();
535  stij[3][4] = stij[4][3] = s34();
536  stij[4][4] = 4*m4sq();
537 
538  for(int i=0; i<5; i++){
539  for(int j=0; j<5; j++){
540  xij[i][j] = 0.5*( stij[i][j] - m[i]*m[i] - m[j]*m[j] );
541  }
542  }
543  knowstij = true;
544 }
545 
547  if(! knowDelta4) calcDelta4();
548  return _Delta4;
549 }
550 
552  // cout << " compare: " << Delta4_with_xij() << " , " << Delta4_without_xij() << endl;
553  return Delta4_without_xij();
554 }
555 
557  TMatrixDSym B(4);
558  if(! knowstij)fill_stij();
559 
560  B(0,0)=xij[1][1];
561  B(1,0)=B(0,1)=xij[2][1]; B(1,1)=xij[2][2];
562  B(2,0)=B(0,2)=xij[3][1]; B(2,1)=B(1,2)=xij[3][2]; B(2,2)=xij[3][3];
563  B(3,0)=B(0,3)=xij[4][1]; B(3,1)=B(1,3)=xij[4][2]; B(3,2)=B(2,3)=xij[4][3]; B(3,3)=xij[4][4];
564 
565  _Delta4 = B.Determinant();
566 
567  knowDelta4 = true;
568 }
569 
571  if(! knowDelta3) calcDelta3();
572  return _Delta3;
573 }
575  TMatrixDSym B(3);
576  if(! knowstij)fill_stij();
577  B(0,0)=xij[1][1];
578  B(1,0)=B(0,1)=xij[2][1]; B(1,1)=xij[2][2];
579  B(2,0)=B(0,2)=xij[3][1]; B(2,1)=B(1,2)=xij[3][2]; B(2,2)=xij[3][3];
580  _Delta3 = B.Determinant();
581  knowDelta3 = true;
582 }
584  if(! knowDelta2) calcDelta2();
585  return _Delta2;
586 }
588  TMatrixDSym B(2);
589  if(! knowstij)fill_stij();
590  B(0,0)=xij[1][1];
591  B(1,0)=B(0,1)=xij[2][1]; B(1,1)=xij[2][2];
592  _Delta2 = B.Determinant();
593  knowDelta2 = true;
594 }
596  if(! knowstij)fill_stij();
597  return xij[1][1];
598 }
599 
601  double D1=Delta1(), D2=Delta2(), D3=Delta3(), D4=Delta4();
602  if(D1 <=0 || -D2*D3 <=0 || -D4/D3 < 0 || -D1*D2 <=0){
603  return 0;
604  }
605 
606  double invps2 = -Delta4();
607  if(invps2 <= 0) return 0;
608  return pi*pi/(32.0*m[0]*m[0]) * 1.0/sqrt(invps2);
609 }
610 
612  double D1=Delta1(), D2=Delta2(), D3=Delta3(), D4=Delta4();
613  cout << "Calculate4BodyProps::showPhaseSpaceFactorCalculation()" << endl;
614  cout << "\n\t D1 " << D1 << ", D2 " << D2
615  << ", D3 " << D3 << ", D4 " << D4 << endl;
616  cout << "\n\t D1 <=0 ? " << D1;
617  cout << "\n\t -D2*D3 <=0 ? " << "- " << D2 << " * " << D3
618  << " = " << -D2*D3;
619  cout << "\n\t -D4/D3 < 0 ? " << "- " << D4 << " / " << D3;
620  if(D3 != 0) cout << " = " << -D4/D3;
621  cout << "\n\t -D1*D2 <=0 ? " << "- " << D1 << " * " << D2
622  << " = " << -D1*D2
623  << endl;
624 
625  if(D1 <=0 || -D2*D3 <=0 || -D4/D3 < 0 || -D1*D2 <=0){
626  return 0;
627  }
628 
629  double invps2 = -Delta4();
630  cout << "\n\t invps2 = " << invps2 << endl;
631  if(invps2 <= 0) return 0;
632  double returnVal = pi*pi/(32.0*m[0]*m[0]) * 1.0/sqrt(invps2);
633  cout << "\n\t returning " << returnVal << endl;
634  return returnVal;
635 }
636 
637 
638 void Calculate4BodyProps::s12MinMax(double& mi, double& ma){
639  // pseudoparticle: 34
640  // p0 = p1 + p2 + (p3 + p4)
641  boundaries3Body(mi, ma
642  , s234()
643  , m0(), m1(), m2()
644  , sqrt(s34()));
645 }
646 
647 void Calculate4BodyProps::s23MinMax(double& mi, double& ma){
648  // pseudoparticle: 14
649  // p0 = p2 + p3 + (p1 + p4)
650  boundaries3Body(mi, ma
651  , s134()
652  , m0(), m2(), m3()
653  , sqrt(s14()));
654 }
655 
656 void Calculate4BodyProps::s34MinMax(double& mi, double& ma){
657  // pseudoparticle: 12
658  // p0 = p3 + p4 + (p1 + p2)
659  boundaries3Body(mi, ma
660  , s124()
661  , m0(), m3(), m4()
662  , sqrt(s12()));
663 }
664 
665 void Calculate4BodyProps::t40MinMax(double& mi, double& ma){
666  // = s123MinMax
667  // pseudoparticle: 23
668  // p0 = p1 + (p2 + p3) + p4
669  boundaries3Body(mi, ma
670  , s234()
671  , m0(), m1(), sqrt(s23())
672  , m4());
673 }
674 
675 void Calculate4BodyProps::t01MinMax(double& mi, double& ma){
676  // = s234MinMax
677  // pseudoparticle: 34
678  // p0 = p2 + (p3 + p4) + p1
679  boundaries3Body(mi, ma
680  , s134()
681  , m0(), m2(), sqrt(s34())
682  , m1());
683 }
684 
685 
686 // the actual 4-momenta - see page 208 of THE BOOK:
687 TLorentzVector Calculate4BodyProps::p1(){
688  if(! knowp1) calcp1();
689  return _p1;
690 }
692  double D1=Delta1();
693  if(D1 < 0){
694  TLorentzVector p(-9999,-9999,-9999,-9999);
695  _p1 = p;
696  }else{
697  TLorentzVector p(0, 0, 0, sqrt(D1));
698  _p1 = p;
699  }
700  knowp1 = true;
701 }
702 
703 TLorentzVector Calculate4BodyProps::p2(){
704  if(! knowp2) calcp2();
705  return _p2;
706 }
708  double D1=Delta1(), D2=Delta2();
709  if(D1 <= 0 || -D2/D1 < 0){
710  TLorentzVector p(-9999,-9999,-9999,-9999);
711  _p2 = p;
712  }else{
713  TLorentzVector p(0, 0, sqrt(-D2/D1), G(1,2)/sqrt(D1));
714  _p2 = p;
715  }
716  knowp2 = true;
717 }
718 TLorentzVector Calculate4BodyProps::p3(){
719  if(! knowp3) calcp3();
720  return _p3;
721 }
723  bool dbThis =false;
724  double D1=Delta1(), D2=Delta2(), D3=Delta3();
725  if(D1 <= 0 || (- D1 * D2) <= 0 || -D3/D2 < 0 ){
726  if(dbThis) cout << "calcp3, failing because "
727  << D1 <<" <= " << 0 << " || "
728  << (- D1 * D2) << " <= " << 0
729  << " || " << -D3/D2 << " < " << 0 <<endl;
730  if(dbThis) cout << " Delta3 = " << D3 << endl;
731  TLorentzVector p(-9999,-9999,-9999,-9999);
732  _p3=p;
733  }else{
734  TLorentzVector p( sqrt(-D3/D2)
735  , 0
736  , -G(1,2, 1,3)/sqrt(-D1*D2)
737  , G(1,3)/sqrt(D1)
738  );
739  _p3=p;
740  }
741  knowp3 = true;
742 }
743 
744 TLorentzVector Calculate4BodyProps::p4(){
745  if(! knowp4) calcp4();
746  return _p4;
747 }
749  double D1=Delta1(), D2=Delta2(), D3=Delta3(), D4=Delta4();
750  if(D1 <=0 || -D2*D3 <=0 || -D4/D3 < 0 || -D1*D2 <=0){
751  TLorentzVector p(-9999,-9999,-9999,-9999);
752  _p4 = p;
753  }else{
754  TLorentzVector p(G(1, 2, 3, 1, 2, 4)/sqrt(-D2*D3)
755  , sqrt(-D4/D3)
756  , -G(1, 2, 1, 4)/sqrt(-D1*D2)
757  , G(1,4)/sqrt(D1)
758  );
759  _p4 = p;
760  }
761  knowp4 = true;
762 }
763 
764 TLorentzVector Calculate4BodyProps::p0(){
765  if(! knowp0) calcp0();
766  return _p0;
767 }
769  double D1=Delta1(), D2=Delta2(), D3=Delta3(), D4=Delta4();
770  if(D1 <=0 || -D2*D3 <=0 || -D4/D3 < 0 || -D1*D2 <=0){
771  TLorentzVector p(-9999,-9999,-9999,-9999);
772  _p0 = p;
773  }else{
774  _p0 = p1() + p2() + p3() + p4();
775  }
776  knowp0 = true;
777 }
778 
779 TLorentzVector Calculate4BodyProps::pVec(int i){
780  switch(i){
781  case 0:
782  return p0();
783  break;
784  case 1:
785  return p1();
786  break;
787  case 2:
788  return p2();
789  break;
790  case 3:
791  return p3();
792  break;
793  case 4:
794  return p4();
795  break;
796  default:
797  TLorentzVector p(-9999,-9999,-9999,-9999);
798  return p;
799  }
800 }
801 //
802 
static const double pi
TLorentzVector pVec(int i)
void set(double t01_in, double s12_in, double s23_in, double s34_in, double t40_in, double m0_in, double m1_in, double m2_in, double m3_in, double m4_in)
bool boundaries3Body(double &s12Min, double &s12Max, double _s23, double _mumM, double _d1M, double _d2M, double _d3M)
void t01MinMax(double &mi, double &ma)
void s23MinMax(double &mi, double &ma)
void setWithSameMass(double t01_in, double s12_in, double s23_in, double s34_in, double t40_in)
static const double m2
static const double m
double pij(int i, int j)
double sijk(int i, int j, int k)
double G(int p, int q)
void s12MinMax(double &mi, double &ma)
void s34MinMax(double &mi, double &ma)
static const double m3
void t40MinMax(double &mi, double &ma)