Angular analysis of B+->K*+(K+pi0)mumu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
3.3 KiB

  1. /**
  2. * @file event.hh
  3. * @author Christoph Langenbruch, Renata Kopecna
  4. * @date 2009-03-18
  5. *
  6. */
  7. #ifndef EVENT_H
  8. #define EVENT_H
  9. #include <string>
  10. #include <vector>
  11. namespace fcnc { //Forward declaration, fully defined in options.hh
  12. class options;
  13. }
  14. namespace fcnc {
  15. // typedef event_type enum {};
  16. ///The event class stores the different event quantities needed to extract the physically interesting parametes in the likelihood fit.
  17. class event {
  18. public:
  19. //save the year into each event
  20. int year;
  21. ///the mass used to separate signal and background
  22. double m;
  23. ///the error on the measured mass
  24. double sigma_m;
  25. //the reconstructed mass of the K*+
  26. double mkpi;
  27. ///set in the toy data generation to distinguish background from signal in the plots
  28. int event_type;
  29. /// magnet polarity (down = -1 and up = +1)
  30. int magnet;
  31. ///costhetal
  32. double costhetal;
  33. ///costhetak
  34. double costhetak;
  35. ///phi
  36. double phi;
  37. //full angular angles that are saved even after folding
  38. double costhetal_fa;
  39. double costhetak_fa;
  40. double phi_fa;
  41. ///weight
  42. double weight;
  43. double delta_weight;
  44. double max_mu_pt;
  45. double kaon_pt;
  46. ///xis
  47. //double xis[18];
  48. //float xis[18];
  49. ///q2
  50. double q2;
  51. ///from opening angle of leptons:
  52. double pseudo_q2;
  53. ///p2
  54. double p2;
  55. ///cp_conjugate (B) or not (Bbar)
  56. bool cp_conjugate;
  57. double sweight;
  58. double mjpsipi;
  59. event():
  60. year(2000),
  61. m(0.0),
  62. sigma_m(0.0),
  63. mkpi(892.0),
  64. event_type(0),
  65. magnet(0),
  66. costhetal(0.0),
  67. costhetak(0.0),
  68. phi(0.0),
  69. costhetal_fa(0.0),
  70. costhetak_fa(0.0),
  71. phi_fa(0.0),
  72. weight(1.0),
  73. delta_weight(0.0),
  74. max_mu_pt(0.0),
  75. kaon_pt(0.0),
  76. //norm(1.0),
  77. q2(0.0),
  78. pseudo_q2(0.0),
  79. cp_conjugate(false),
  80. sweight(1.0)
  81. {
  82. // xis[0] = 3.0/2.0;
  83. // xis[1] = 3.0/4.0;
  84. // xis[2] = -1.0/2.0;
  85. // xis[3] = -1.0/4.0;
  86. // xis[4] = 0.0;
  87. // xis[5] = 0.0;
  88. // xis[6] = 0.0;
  89. // xis[7] = 0.0;
  90. // xis[8] = 0.0;
  91. // xis[9] = 0.0;
  92. // xis[10] = 0.0;
  93. // xis[11] = 0.0;
  94. // xis[12] = 1.0;
  95. // xis[13] = 0.0;
  96. // xis[14] = 0.0;
  97. // xis[15] = 0.0;
  98. // xis[16] = 0.0;
  99. // xis[17] = 0.0;
  100. };
  101. //reset folded angles back to full angular
  102. void reset_angles()
  103. {
  104. costhetal = costhetal_fa;
  105. costhetak = costhetak_fa;
  106. phi = phi_fa;
  107. };
  108. };
  109. ///print the quantities of event meas
  110. void print_event(const event& meas);
  111. void save_events(std::string filename, const std::vector<event>& events);
  112. void save_eos_events(std::string filename, const std::vector<event>& events);
  113. std::vector<event> filterResonances(std::vector<event> events);
  114. std::vector<event> load_events(std::string filename, std::string treename="Events", int neventsmax = -1);
  115. ///convert between different angular conventions
  116. void lhcbtotheory(const bool bzero, const double ctl_lhcb, const double ctk_lhcb, const double phi_lhcb, double& ctl_th, double& ctk_th, double& phi_th);
  117. void theorytolhcb(const bool bzero, const double ctl_th, const double ctk_th, const double phi_th, double& ctl_lhcb, double& ctk_lhcb, double& phi_lhcb);
  118. };
  119. int convert_tuples(int job_id, std::string theFCNCpath, fcnc::options opts, std::vector<int> years);
  120. std::vector<fcnc::event> merge_two_evtVecs(std::vector<fcnc::event> one, std::vector<fcnc::event> two);
  121. #endif