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.

96 lines
3.9 KiB

  1. //Renata Kopecna
  2. #ifndef DESIGN_HH
  3. #define DESIGN_HH
  4. #include <TH1D.h>
  5. #include <TH2D.h>
  6. #include <TCanvas.h>
  7. #include <TGraphErrors.h>
  8. #include <TLine.h>
  9. #include <TLatex.h>
  10. //=========================================
  11. //
  12. // Latex in plots
  13. //
  14. //=========================================
  15. std::string latex_decay(bool DTF);
  16. std::string latex_Kst_decay(bool DTF);
  17. std::string MeVc();
  18. std::string GeVc();
  19. std::string GeVc_2();
  20. std::string latex_pull();
  21. std::string latex_angle(std::string angle, bool &is_ctl, bool &is_ctk, bool &is_phi);
  22. const std::string LATEX_Q2 = "q^{2}";
  23. const std::string LATEX_TL = "#theta_{L}";
  24. const std::string LATEX_CTL = "cos#theta_{L}";
  25. const std::string LATEX_TK = "#theta_{K}";
  26. const std::string LATEX_CTK = "cos#theta_{K}";
  27. const std::string LATEX_PHI = "#phi";
  28. const std::string EVENTS_TAG = "Weighted candidates";
  29. //Define the angles as chars, because ROOT
  30. //Very not cool to have a function here, but also very not
  31. //cool of ROOT to not accept strings and I cannot be bothered
  32. const char *LATEX_Q2_CH();
  33. const char *LATEX_TL_CH();
  34. const char *LATEX_CTL_CH();
  35. const char *LATEX_TK_CH();
  36. const char *LATEX_CTK_CH();
  37. const char *LATEX_PHI_CH();
  38. const Color_t pWaveColor = kSpring;
  39. const Color_t sWaveColor = kOrange;
  40. const Color_t psInterferenceColor = kMagenta-10;
  41. std::string q2_label(double low_q2, double high_q2);
  42. //=========================================
  43. //
  44. // General
  45. //
  46. //=========================================
  47. void set_gStyle();
  48. //Save several file types in one go
  49. void saveTCanvas(TCanvas *c, std::string name, std::vector<std::string> types);
  50. TLine *threeSigmaLine(double min, double max, bool plus);
  51. TLine *oneSigmaLine(double min, double max, bool plus);
  52. void plotAndSave(TH1D *hist, std::string canvasName, std::string targetPath, std::string plotType);
  53. void plotAndSave(TH2D *hist, std::string canvasName, std::string targetPath, std::string plotType);
  54. void plotAndSaveWithLine(TH1D* hist, TF1 *line, std::string canvasName, std::string targetPath, std::string plotType);
  55. TLatex *getPrettyTex(double TextFontSize, int TextAlign);
  56. //=========================================
  57. //
  58. // Angular correction plots
  59. //
  60. //=========================================
  61. void plotAngular(TH1D *hist, TH1D *moments, bool write, std::string name, std::string appendix, std::string q2region, TLatex *tex, std::string folderName);
  62. void plotAngular(TH1D *hist, TH1D *moments, bool write, std::string name, std::string appendix, std::string folderName);
  63. void plotAngular(TH2D *hist, TH2D *moments, bool write, std::string name, std::string appendix, std::string q2region, TLatex *tex, std::string folderName);
  64. void plotAngular(TH2D *hist, TH2D *moments, bool write, std::string name, std::string appendix, std::string folderName);
  65. void plotAngularInOne(TCanvas *c, int whichC, TH1D *moments, TH1D *ub, TH1D *hist, TH1D* ml, bool run_minuit, double q2min, double q2max, double y, bool cross);
  66. void labelAngularScan(std::vector<int>scan_low, std::vector<int>scan_range,TH2D *hist);
  67. //=========================================
  68. //
  69. // Fit results plots
  70. //
  71. //=========================================
  72. int design_pull_basic(TH1D *pull, Float_t textsize, double eff_pullHeight);
  73. int design_pull(TH1D *pull, Color_t lineColor, Color_t fillColor, double eff_pullHeight, double pullFrameRange);
  74. int design_pull(TGraphErrors *pull, Color_t lineColor, Color_t fillColor, double eff_pullHeight, double pullFrameRange);
  75. //Draw shaded boxes at q2 regions of resonances
  76. void drawResonances(TCanvas *c, double min, double max);
  77. void drawResonances(TPad *c, double min, double max);
  78. int design_YieldInQ2(int Run, TGraphErrors *graphSig, TGraphErrors *graphBkg, TGraphErrors *graphSignificance, TGraphErrors *CMS, bool fixRange, std::string savePath, std::vector<std::string> extensions);
  79. int design_SignificanceInQ2(int Run, TGraphErrors *graphSignificance, TGraphErrors *CMS, bool fixRange, std::string savePath, std::vector<std::string> extensions);
  80. #endif // DESIGN_HH