Rivet  1.8.3
mt2_bisect.hh
1 #ifndef MT2_BISECT_H
2 #define MT2_BISECT_H
3 
4 /***********************************************************************/
5 /* */
6 /* Finding mt2 by Bisection */
7 /* */
8 /* Authors: Hsin-Chia Cheng, Zhenyu Han */
9 /* Dec 11, 2008, v1.01a */
10 /* */
11 /* see arXiv:0810.5178 */
12 /* */
13 /* Wrapped for Rivet by D. Grellscheid */
14 /* Apr 13, 2011 */
15 /* */
16 /***********************************************************************/
17 
18 namespace Rivet {
19 
20 namespace mt2_bisect
21 {
22 
23 /*The user can change the desired precision below, the larger one of the following two definitions is used. Relative precision less than 0.00001 is not guaranteed to be achievable--use with caution*/
24 
25  const double RELATIVE_PRECISION = 0.00001;
26  //defined as precision = RELATIVE_PRECISION * scale, where scale = max{Ea, Eb}
27 
28  const double ABSOLUTE_PRECISION = 0.0;
29  //absolute precision for mt2, unused by default
30 
31 
32 //Reserved for expert
33  const double MIN_MASS = 0.1; //if ma<MINMASS and mb<MINMASS, use massless code
34  const double ZERO_MASS = 0.000; //give massless particles a small mass
35  const double SCANSTEP = 0.1;
36 
37 class mt2
38 {
39  public:
40 
41  mt2();
42  void mt2_bisect();
43  void mt2_massless();
44  void set_momenta(double *pa0, double *pb0, double* pmiss0);
45  void set_mn(double mn);
46  double get_mt2();
47  // void print();
48  int nevt;
49  private:
50 
51  bool solved;
52  bool momenta_set;
53  double mt2_b;
54 
55  int nsols(double Dsq);
56  int nsols_massless(double Dsq);
57  inline int signchange_n( long double t1, long double t2, long double t3, long double t4, long double t5);
58  inline int signchange_p( long double t1, long double t2, long double t3, long double t4, long double t5);
59  int scan_high(double &Deltasq_high);
60  int find_high(double &Deltasq_high);
61  //data members
62  double pax, pay, ma, Ea;
63  double pmissx, pmissy;
64  double pbx, pby, mb, Eb;
65  double mn, mn_unscale;
66 
67  //auxiliary definitions
68  double masq, Easq;
69  double mbsq, Ebsq;
70  double pmissxsq, pmissysq;
71  double mnsq;
72 
73  //auxiliary coefficients
74  double a1, b1, c1, a2, b2, c2, d1, e1, f1, d2, e2, f2;
75  double d11, e11, f12, f10, d21, d20, e21, e20, f22, f21, f20;
76 
77  double scale;
78  double precision;
79 };
80 
81 }//end namespace mt2_bisect
82 
83 }//end namespace Rivet
84 
85 #endif
Definition: mt2_bisect.hh:37