MpdFemtoMcDstReader.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /**
  2. * \class MpdFemtoMcDstReader
  3. * \brief Reader for the McDst format that takes McDstReader
  4. *
  5. * The reader class for the McDst format. It reads McDst and
  6. * converts data to the internal MpdFemtoMaker structure (MpdFemtoEvent,
  7. * MpdFemtoTrack, etc).
  8. *
  9. * \author Grigory Nigmatkulov (NRNU MEPhI)
  10. * \date May 18, 2019
  11. * \email nigmatkulov@gmail.com
  12. */
  13. #ifndef MpdFemtoMcDstReader_h
  14. #define MpdFemtoMcDstReader_h
  15. // MpdFemtoMaker headers
  16. // Base
  17. #include "MpdFemtoBaseEventReader.h"
  18. // Infrastructure
  19. #include "MpdFemtoEvent.h"
  20. #include "MpdFemtoTrack.h"
  21. #include "MpdFemtoV0.h"
  22. #include "MpdFemtoKink.h"
  23. #include "MpdFemtoXi.h"
  24. #include "MpdFemtoEnumeration.h"
  25. #include "MpdFemtoString.h"
  26. // ROOT headers
  27. #include "TSystem.h"
  28. #include "TTree.h"
  29. #include "TChain.h"
  30. #include "TRandom3.h"
  31. #include "TMatrixTLazy.h"
  32. // McDst headers
  33. #include "MpdMcDst.h"
  34. #include "MpdMcEvent.h"
  35. #include "MpdMcParticle.h"
  36. #include "MpdMcArrays.h"
  37. #include "MpdMcDstReader.h"
  38. //_________________
  39. class MpdFemtoMcDstReader : public MpdFemtoBaseEventReader {
  40. public:
  41. /// Default constructor
  42. MpdFemtoMcDstReader();
  43. /// Parametrized constructor
  44. /// \param mcDstReader Takes pointer to McDstReader
  45. /// \param debug Set debut value (see the MpdFemtoBaseEventReader class)
  46. MpdFemtoMcDstReader(McDstReader* mcDstReader, int debug = 1);
  47. /// Copy constructor
  48. MpdFemtoMcDstReader(const MpdFemtoMcDstReader& copy);
  49. /// Assignment operator
  50. MpdFemtoMcDstReader& operator=(const MpdFemtoMcDstReader& copy);
  51. /// Destructor
  52. virtual ~MpdFemtoMcDstReader();
  53. /// Prepare report
  54. virtual MpdFemtoString report();
  55. /// Return instance of MpdFemtoEvent with filled information
  56. virtual MpdFemtoEvent* returnHbtEvent();
  57. /// Set McDstReader
  58. void setMcDstReader(McDstReader* reader) {
  59. mMcDstReader = reader;
  60. }
  61. /// Set magnetic field value in kilogauss (default is 0.5T)
  62. void setMagneticField(const float& field) {
  63. mMagField = field;
  64. }
  65. /// Set magnetic field value in kilogauss (default is 0.5T)
  66. void SetMagneticField(const float& field) {
  67. setMagneticField(field);
  68. }
  69. /// Set event plane rotation
  70. void setRotateEventPlane(const bool& rotate) {
  71. mDoRotate = rotate;
  72. }
  73. /// Set event plane rotation
  74. void SetRotateEventPlane(const bool& rotate) {
  75. setRotateEventPlane(rotate);
  76. }
  77. /// Set event plane angle range [min, max]
  78. void setEventPlaneAngleRange(const float& low, const float& hi) {
  79. mPhi[0] = low;
  80. mPhi[1] = hi;
  81. }
  82. /// Set event plane angle range [min, max]
  83. void SetEventPlaneAngleRange(const float& low, const float& hi) {
  84. setEventPlaneAngleRange(low, hi);
  85. }
  86. /// Set event plane resolution
  87. void setEventPlaneResolution(const float& res) {
  88. mEventPlaneResolution = res;
  89. }
  90. /// Set event plane resolution
  91. void SetEventPlaneResolution(const float& res) {
  92. setEventPlaneResolution(res);
  93. }
  94. private:
  95. /// Simple dE/dx estimation (not for physics analysis)
  96. double dEdxMean(Double_t mass, Double_t momentum);
  97. /// Pointer to the McDstReader
  98. McDstReader *mMcDstReader;
  99. /// Magnetic field in kilogauss (default is set to 0.5 T)
  100. float mMagField;
  101. /// Current event number
  102. //int mCurrentEvent;
  103. /// Pointer MpdFemtoEvent that should be return to MpdFemtoAnalysis
  104. MpdFemtoEvent *mHbtEvent;
  105. /// Use event plane rotation
  106. bool mDoRotate;
  107. /// Randomizer
  108. TRandom3 *mRandom;
  109. /// Phi range to generate event plane angle ( default: [-pi;pi] )
  110. float mPhi[2];
  111. /// Event plane resolution (default: ideal resolution, i.e. unity)
  112. float mEventPlaneResolution;
  113. /// Reference multiplicity (STAR: charged particles with pT>0.15, |eta|<0.5)
  114. unsigned short mRefMult;
  115. /// Reference multiplicity of positive particles (STAR: charged particles with pT>0.15, |eta|<0.5)
  116. unsigned short mRefMultPos;
  117. /// Reference multiplicity (STAR: charged particles with pT>0.15, |eta|<1)
  118. unsigned short mRefMult2;
  119. /// Reference multiplicity of positive particles (STAR: charged particles with pT>0.15, |eta|<1)
  120. unsigned short mRefMult2Pos;
  121. /// Sphericity esitmated by particles with |eta|<0.5, pT>0.15
  122. float mSphericity;
  123. /// Sphericity esitmated by particles with |eta|<1, pT>0.15
  124. float mSphericity2;
  125. /// Number of events passed
  126. long int mEventsPassed;
  127. /// Matrix for sphericity estimation (pT>0.15 && |eta|<0.5)
  128. TMatrixTSym<double> *mMatrix;
  129. /// Matrix for sphericity2 estimation (pT>0.15 && |eta|<1.0)
  130. TMatrixTSym<double> *mMatrix2;
  131. ClassDef(MpdFemtoMcDstReader, 3)
  132. };
  133. #endif // MpdFemtoMcDstReader_h