utility.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #ifndef UTILITY_H
  2. #define UTILITY_H
  3. #define _MAX_TRACKS 5000
  4. #define _N_ARM 2 // 3 IS FULL DETECTOR
  5. #define _N_HARM 2
  6. #define _N_SORTS 4
  7. #define _N_MODULES_TOTAL 90
  8. #define _N_METHOD 2 // 0 - TPC , 1 - ZDC
  9. #define _N_QCOMP 2
  10. #include <TMath.h>
  11. #include <TProfile.h>
  12. #include <TH1F.h>
  13. #include <TF1.h>
  14. #include <TH2F.h>
  15. #include <TChain.h>
  16. #include <TFile.h>
  17. #include <TStyle.h>
  18. #include <TApplication.h>
  19. #include "SpecFuncMathMore.h"
  20. #include <iostream>
  21. #include <iomanip>
  22. #include <fstream>
  23. #include <sstream>
  24. #include <cstdio>
  25. using TMath::Abs;
  26. using TMath::Cos;
  27. using TMath::Sin;
  28. using TMath::ATan2;
  29. using TMath::Sqrt;
  30. using TMath::LocMin;
  31. using TMath::Pi;
  32. using std::cout;
  33. using std::endl;
  34. const Float_t Cut_Pt_Min = 0.;
  35. const Float_t Cut_Eta_Min = 0.7;
  36. const Float_t Cut_Eta_Max = 1.5;
  37. const Int_t Cut_No_Of_hits_min = 32;
  38. const int Ndim = 3;
  39. const float centralityBinsFlow[] = {10.,20.,40.,50};
  40. const int NcentralityBinsFlow = 3;
  41. const float centralityBinsRes[] = {0.,5.,10.,15.,20.,25.,30.,35.,40.,45.,50.,55.,60.,65.,70.,75.,80.,85.,90.,95.,100};
  42. //const float centralityBinsRes[] = {0.,1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.,13.,14.,15.,16.,17.,18.,19.,20.,21.,22.,23.,24.,25.,26.,27.,28.,29.,30.,31.,32.,33.,34.,35.,36.,37.,38.,39.,40.,41.,42.,43.,44.,45.,46.,47.,48.,49.,50.,51.,52.,53.,54.,55.,56.,57.,58.,59.,60.,61.,62.,63.,64.,65.,66.,67.,68.,69.,70.,71.,72.,73.,74.,75.,76.,77.,78.,79.,80.,81.,82.,83.,84.,85.,86.,87.,88.,89.,90.,91.,92.,93.,94.,95.,96.,97.,98.,99.,100.};
  43. const int NcentralityBinsRes = 20;
  44. const double ptBins[] = {0.,0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.};
  45. const int NptBins = 12;
  46. const float etaBins[] = {-1.5,-1.2,-1.,-0.8,-0.6,-0.4,-0.2,0.,0.2,0.4,0.6,0.8,1.,1.2,1.5};
  47. const int NetaBins = 14;
  48. const float rapidityBins[] = {-2., -1.8, -1.6, -1.4,-1.2,-1.,-0.8,-0.6,-0.4,-0.2,0.,0.2,0.4,0.6,0.8,1.,1.2,1.4,1.6,1.8,2.};
  49. const int NrapidityBins = 20;
  50. const TString arm_names[_N_ARM] = {TString("R"),TString("L")};
  51. const TString sorts_of_particles[4] = {TString("all sorts") , TString("pions (211)") , TString("protons (2212)") , TString("kaons (321)")};
  52. const TString methods_names[_N_METHOD] = {TString("TPC") , TString("FHCal")};
  53. class FlowParticle
  54. {
  55. public:
  56. double Eta;
  57. double Pt;
  58. double Phi;
  59. double Rapidity;
  60. FlowParticle();
  61. FlowParticle(double Eta, double Pt, double Phi, double Rapidity);
  62. };
  63. class EPParticle
  64. {
  65. public:
  66. double Eta;
  67. double Pt;
  68. double Phi;
  69. EPParticle();
  70. EPParticle(double Eta, double Pt, double Phi);
  71. };
  72. Double_t ResEventPlane(Double_t chi, Int_t harm); //harm = 1 or 2 for our case
  73. Double_t Chi(Double_t res, Int_t harm); //harm = 1 or 2 for our case
  74. Double_t* GetAngles();
  75. Float_t Unfold(Float_t phiEP_mc, Float_t psi_N_FULL, Int_t harm);
  76. #endif