MpdFemtoAverageSeparation.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /**
  2. * \class MpdFemtoAverageSeparation
  3. * \brief One-dimensional distr. of Average Separation
  4. *
  5. *
  6. * \author Malinina Ludmila (SINP MSU & JINR)
  7. * \date Sep 2020, 2020
  8. * \email lmalinin@cern.ch
  9. */
  10. #ifndef MpdFemtoAverageSeparation_h
  11. #define MpdFemtoAverageSeparation_h
  12. // MpdFemtoMaker headers
  13. // Base
  14. #include "MpdFemtoBaseCorrFctn.h"
  15. // ROOT headers
  16. #include "TH1.h"
  17. #include "TVector3.h"
  18. // C++ headers
  19. #include <vector>
  20. // Forward declarations
  21. class MpdFemtoPair;
  22. //_________________
  23. class MpdFemtoAverageSeparation : public MpdFemtoBaseCorrFctn {
  24. public:
  25. /// Parametrized constructor
  26. ///
  27. /// \param title Name of the histogram
  28. /// \param nBinsEta Number of Average Separation bins
  29. /// \param mEtaLo Minimum value of Average Separation
  30. /// \param mEtaHi Maximum value of Average Separation
  31. ///
  32. MpdFemtoAverageSeparation(const char* title = "hAverageSepartion",
  33. const int& nBinsAvSep = 200, const double& AvSep = 0, const double& aVSep = 100);
  34. /// Destructor
  35. virtual ~MpdFemtoAverageSeparation();
  36. void setHistoParameters(const int& nBinsAvSep = 200, const double& AvSep = 0., const double& avSep = 100.);
  37. /// Make report
  38. virtual MpdFemtoString report();
  39. /// Add real pair
  40. virtual void addRealPair(MpdFemtoPair* pair);
  41. /// Add mixed pair
  42. virtual void addMixedPair(MpdFemtoPair* pair);
  43. /// Begin event
  44. virtual void eventBegin(const MpdFemtoEvent* event);
  45. /// Event end
  46. virtual void eventEnd(const MpdFemtoEvent* event);
  47. /// Finish
  48. virtual void finish();
  49. /// Return i-th histogram for numerator
  50. TH1F* numerator(unsigned int i) {
  51. return ( mNumerator.at(i)) ? mNumerator.at(i) : nullptr;
  52. }
  53. /// Return i-th histogram for denominator
  54. TH1F* denominator(unsigned int i) {
  55. return ( mDenominator.at(i)) ? mDenominator.at(i) : nullptr;
  56. }
  57. /// Write histograms
  58. virtual void writeOutHistos();
  59. /// Return output list
  60. virtual TList* getOutputList();
  61. /// Clone correlation function
  62. virtual MpdFemtoAverageSeparation* clone() const {
  63. return new MpdFemtoAverageSeparation(*this);
  64. }
  65. protected:
  66. /// Numerator made with pairs from the same event
  67. std::vector< TH1F* > mNumerator;
  68. /// Denominator made with mixed pairs
  69. std::vector< TH1F* > mDenominator;
  70. /// Number of eta bins
  71. int mAvSepBins;
  72. /// Eta range
  73. double mAvSepRange[2];
  74. ClassDef(MpdFemtoAverageSeparation, 1)
  75. };
  76. #endif // MpdFemtoAverageSeparation_h