CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
mt2w_bisect.h
Go to the documentation of this file.
1 /***********************************************************************/
2 /* */
3 /* Finding MT2W */
4 /* Reference: arXiv:1203.4813 [hep-ph] */
5 /* Authors: Yang Bai, Hsin-Chia Cheng, */
6 /* Jason Gallicchio, Jiayin Gu */
7 /* Based on MT2 by: Hsin-Chia Cheng, Zhenyu Han */
8 /* May 8, 2012, v1.00a */
9 /* */
10 /***********************************************************************/
11 #ifndef PhysicsTools_Heppy_mt2w_bisect_H
12 #define PhysicsTools_Heppy_mt2w_bisect_H
13 
14 namespace heppy {
15 
16 namespace mt2w_bisect
17 {
18 class mt2w
19 {
20  public:
21  static const float RELATIVE_PRECISION;
22  static const float ABSOLUTE_PRECISION;
23  static const float MIN_MASS;
24  static const float ZERO_MASS;
25  static const float SCANSTEP;
26 
27  mt2w(double upper_bound=500.0, double error_value=499.0, double scan_step=0.5);
28  // Constructor where:
29  // upper_bound: the upper bound of search for MT2W, default value is 500 GeV
30  // error_value: if we couldn't find any compatible region below upper_bound, this value gets returned.
31  // -1.0 is a reasonable to indicate error, but upper_bound-1.0 allows a simple greater-than cut for signal
32  // scan_step: if we need to scan to find the compatible region, this is the step of the scan
33  void set_momenta(double *pl0, double *pb10, double *pb20, double* pmiss0); //b1 pairs with l
34  void set_momenta(double El, double plx, double ply, double plz,
35  double Eb1, double pb1x, double pb1y, double pb1z,
36  double Eb2, double pb2x, double pb2y, double pb2z,
37  double pmissx, double pmissy); // Same as above without pointers/arrays
38  // Where the input 4-vector information represents:
39  // l is the visible lepton
40  // b1 is the bottom on the same side as the visible lepton
41  // b2 is the other bottom (paired with the invisible W)
42  // pmiss is missing momentum with only x and y components.
43  double get_mt2w(); // Calculates result, which is cached until set_momenta is called.
44  // void print();
45 
46  protected:
47  void mt2w_bisect(); // The real work is done here.
48 
49  private:
50 
51  bool solved;
53  double upper_bound;
54  double error_value;
55  double scan_step;
56  double mt2w_b;
57 
58  int teco(double mtop); // test the compatibility of a given trial top mass mtop
59  inline int signchange_n( long double t1, long double t2, long double t3, long double t4, long double t5);
60  inline int signchange_p( long double t1, long double t2, long double t3, long double t4, long double t5);
61 
62  //data members
63  double plx, ply, plz, ml, El; // l is the visible lepton
64  double pb1x, pb1y, pb1z, mb1, Eb1; // b1 is the bottom on the same side as the visible lepton
65  double pb2x, pb2y, pb2z, mb2, Eb2; // b2 is the other bottom
66  double pmissx, pmissy; // x and y component of missing p_T
67  double mv,mw; //mass of neutrino and W-boson
68 
69  //auxiliary definitions
70  double mlsq, Elsq;
71  double mb1sq, Eb1sq;
72  double mb2sq, Eb2sq;
73 
74  //auxiliary coefficients
75  double a1, b1, c1, a2, b2, c2, d1, e1, f1, d2, e2, f2;
76  double d2o, e2o, f2o;
77 
78  double precision;
79 };
80 
81 }//end namespace mt2w_bisect
82 }//end namespace heppy
83 
84 #endif
static const float SCANSTEP
Definition: mt2w_bisect.h:25
int signchange_n(long double t1, long double t2, long double t3, long double t4, long double t5)
Definition: mt2w_bisect.cc:375
static const float ZERO_MASS
Definition: mt2w_bisect.h:24
int teco(double mtop)
Definition: mt2w_bisect.cc:216
int signchange_p(long double t1, long double t2, long double t3, long double t4, long double t5)
Definition: mt2w_bisect.cc:385
mt2w(double upper_bound=500.0, double error_value=499.0, double scan_step=0.5)
Definition: mt2w_bisect.cc:55
static const float RELATIVE_PRECISION
Definition: mt2w_bisect.h:21
static const float ABSOLUTE_PRECISION
Definition: mt2w_bisect.h:22
static const float MIN_MASS
Definition: mt2w_bisect.h:23
void set_momenta(double *pl0, double *pb10, double *pb20, double *pmiss0)
Definition: mt2w_bisect.cc:78