MpdFemtoModelQinvCorrFctnKt.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /**
  2. * \class MpdFemtoModelQinvCorrFctnKt
  3. * \brief One-dimensional correlation function with kT-binning for models
  4. *
  5. * One-dimensional correlation function with correlation functions binned
  6. * according to the user request
  7. *
  8. * \author Grigory Nigmatkulov (NRNU MEPhI)
  9. * \date May 18, 2019
  10. * \email nigmatkulov@gmail.com
  11. */
  12. #ifndef MpdFemtoModelQinvCorrFctnKt_h
  13. #define MpdFemtoModelQinvCorrFctnKt_h
  14. // MpdFemtoMaker headers
  15. #include "MpdFemtoBaseCorrFctn.h"
  16. #include "MpdFemtoBasePairCut.h"
  17. // C++ headers
  18. #include <vector>
  19. // Forward declarations
  20. class MpdFemtoPair;
  21. class MpdFemtoModelManager;
  22. class TH1D;
  23. //_________________
  24. class MpdFemtoModelQinvCorrFctnKt : public MpdFemtoBaseCorrFctn {
  25. public:
  26. /// Parametrized constructor
  27. ///
  28. /// \param title Name of the histogram
  29. /// \param nBins Number of qInv bins
  30. /// \param qLo Minimum value of the qInv
  31. /// \param qHi Maximum value of the qInv
  32. /// \param ktBins Number of kT bins used in the analysis
  33. /// \param ktLo Minimum value of kT
  34. /// \param ktHi Maximum value of kT
  35. ///
  36. MpdFemtoModelQinvCorrFctnKt(const char* title = "hQinv",
  37. const int& nbins = 100, const double& QinvLo = 0., const double& QinvHi = 1.,
  38. const int& ktBins = 10, const double& KtLo = 0.05, const double& KtHi = 1.05,
  39. const bool useDenominator = true);
  40. /// Copy constructor
  41. MpdFemtoModelQinvCorrFctnKt(const MpdFemtoModelQinvCorrFctnKt& copy);
  42. /// Assignment operator
  43. MpdFemtoModelQinvCorrFctnKt& operator=(const MpdFemtoModelQinvCorrFctnKt& copy);
  44. /// Destructor
  45. virtual ~MpdFemtoModelQinvCorrFctnKt();
  46. /// Method that allows front-loading model manager
  47. virtual void connectToManager(MpdFemtoModelManager *manager);
  48. /// Make report
  49. virtual MpdFemtoString report();
  50. /// Add real pair
  51. virtual void addRealPair(MpdFemtoPair* pair);
  52. /// Add mixed pair
  53. virtual void addMixedPair(MpdFemtoPair* pair);
  54. /// Begin event
  55. virtual void eventBegin(const MpdFemtoEvent* event);
  56. /// Event end
  57. virtual void eventEnd(const MpdFemtoEvent* event);
  58. /// Finish
  59. virtual void finish();
  60. /// Write histograms
  61. void writeOutHistos();
  62. /// Return output list
  63. virtual TList* getOutputList();
  64. /// Set kT bins
  65. void setKtRange(const int& nbins = 10, const double& ktLo = 0.05, const double& ktHi = 1.05);
  66. /// Return i-th numerator
  67. TH1D *numerator(unsigned int i) {
  68. return ( mNumerator.at(i)) ? mNumerator.at(i) : nullptr;
  69. }
  70. /// Return i-th weighted numerator
  71. TH1D *numeratorWeighted(unsigned int i) {
  72. return ( mNumeratorWeighted.at(i)) ? mNumeratorWeighted.at(i) : nullptr;
  73. }
  74. /// Return i-th denominator
  75. TH1D *denominator(unsigned int i) {
  76. return ( mDenominator.at(i)) ? mDenominator.at(i) : nullptr;
  77. }
  78. /// Return i-th denominator
  79. TH1D *denominatorWeighted(unsigned int i) {
  80. return ( mDenominatorWeighted.at(i)) ? mDenominatorWeighted.at(i) : nullptr;
  81. }
  82. /// Set write denominator
  83. void setUseDenominator(bool isUse) { mIsUseDenominator = isUse; }
  84. /// Clone correlation function
  85. virtual MpdFemtoModelQinvCorrFctnKt* clone() const {
  86. return new MpdFemtoModelQinvCorrFctnKt(*this);
  87. }
  88. private:
  89. /// Pointer to the model manager that performs femtoscopic
  90. /// weight calculation
  91. MpdFemtoModelManager *mManager;
  92. /// Numerator
  93. std::vector< TH1D* > mNumerator;
  94. /// Numerator weighted
  95. std::vector< TH1D* > mNumeratorWeighted;
  96. /// Denominator
  97. std::vector< TH1D* > mDenominator;
  98. /// Denominator weighted
  99. std::vector< TH1D* > mDenominatorWeighted;
  100. /// Number of kT bins to study
  101. int mNKtBins;
  102. /// Range of kT to plot [min,max]
  103. double mKtRange[2];
  104. /// kT bin width
  105. double mKtStep;
  106. /// Use and write denominators
  107. bool mIsUseDenominator;
  108. ClassDef(MpdFemtoModelQinvCorrFctnKt, 1)
  109. };
  110. #endif // #define MpdFemtoModelQinvCorrFctnKt_h