StSphericity.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. #ifndef STSPHERICITY_HH
  2. #define STSPHERICITY_HH
  3. #include "StMaker.h"
  4. #include "StThreeVector.hh"
  5. #include "StThreeVectorF.hh"
  6. #include "StPhysicalHelixD.hh"
  7. #include "TDatabasePDG.h"
  8. #include <StarGenerator/EVENT/StarGenParticle.h>
  9. #include <StarGenerator/EVENT/StarGenEvent.h>
  10. #include <TString.h>
  11. #include <TSystem.h>
  12. #include <TFile.h>
  13. #include <TLorentzVector.h>
  14. #include <TTree.h>
  15. #include <TH1.h>
  16. #include <TH2.h>
  17. #include <TH3.h>
  18. #include <TVectorT.h>
  19. #include <TMatrixTLazy.h>
  20. #include <TChain.h>
  21. #include <TMatrixDSymEigen.h>
  22. #include <vector>
  23. #include <iostream>
  24. class StSphericity : public StMaker
  25. {
  26. public:
  27. StSphericity(const char *aDirName,
  28. const char *aFileName,
  29. const char *aFilter = ".",
  30. int aMaxFiles = 1e6);
  31. ~StSphericity();
  32. int GetNEvents();
  33. Int_t Init();
  34. Int_t Make();
  35. Int_t Finish();
  36. void SetOutFileName(const char *oFileName) { outFileName = oFileName; }
  37. void SetSphericityLowCut(float val) { sphLoCut = val; }
  38. void SetSphericityHighCut(float val) { sphHiCut = val; }
  39. void SetPCut(float p) { pCut = p; }
  40. private:
  41. string dir;
  42. string fileName;
  43. string filter;
  44. unsigned int eventId;
  45. unsigned int nEvents;
  46. TFile *outFile;
  47. TChain *chain;
  48. TTree *tree;
  49. StarGenEvent *event;
  50. const char *outFileName;
  51. float pCut;
  52. TMatrixTSym<double> *matrix;
  53. TMatrixTSym<double> *matrix3d; // 3D sphericity matrix
  54. float sphLoCut, sphHiCut;
  55. TH1F *hEta;
  56. TH1F *hPhi;
  57. TH2F *hEtaPhi;
  58. TH2F *hDEtaDPhi;
  59. //
  60. // Manual calculation of the sphericity
  61. //
  62. TH1F *hSphManual;
  63. TH2F *hDEtaDPhi_lo_sphManual; // sphericity < lo "jet-like" events
  64. TH2F *hDEtaDPhi_hi_sphManual; // sphericity > hi isotropic
  65. //
  66. // Automatic calculation of the sphericity through the ROOT
  67. //
  68. TH1F *hSphAuto;
  69. TH2F *hDEtaDPhi_lo_sphAuto; // sphericity < lo "jet-like" events
  70. TH2F *hDEtaDPhi_hi_sphAuto; // sphericity > hi isotropic
  71. //
  72. // 3D sphericity
  73. //
  74. TH1F *hSph3d;
  75. TH2F *hDEtaDPhi_lo_sph3d; // sphericity < lo "jet-like" events
  76. TH2F *hDEtaDPhi_hi_sph3d; // sphericity > hi isotropic
  77. TH1F *hSphDiff; // difference between manual and auto calculated sphericity
  78. TH1F *hSph3dDiff; // sphAuto - sph3d
  79. //
  80. // Momentum distribution to visualize shape of the emission source
  81. // in the momentum phase space
  82. //
  83. // with S_transverse cut_low
  84. TH3F *hP3DLow;
  85. TH2F *hPxPyLow;
  86. TH2F *hPxPzLow;
  87. TH2F *hPyPzLow;
  88. // with S_transverse cut_high
  89. TH3F *hP3DHigh;
  90. TH2F *hPxPyHigh;
  91. TH2F *hPxPzHigh;
  92. TH2F *hPyPzHigh;
  93. // without S_transverse cut
  94. TH3F *hP3D_wocut;
  95. TH2F *hPxPy_wocut;
  96. TH2F *hPxPz_wocut;
  97. TH2F *hPyPz_wocut;
  98. int maxFiles;
  99. int InitRead(string aDir, string aFileName,
  100. string aFilter, int aMaxFiles);
  101. int FillChain(TChain *aChain, const char *aFileName, int aMaxFiles);
  102. int FillChain(TChain *aChain, char *aDir, const char *aFilter, int aMaxFiles);
  103. void UninitRead();
  104. ClassDef(StSphericity, 1)
  105. };
  106. #endif