File indexing completed on 2025-08-05 08:16:29
0001
0002
0003 #ifndef EVENTPLANERECO_H
0004 #define EVENTPLANERECO_H
0005
0006
0007
0008
0009
0010 #include <cdbobjects/CDBTTree.h>
0011 #include <fun4all/SubsysReco.h>
0012
0013 #include <string> // for string
0014 #include <vector> // for vector
0015
0016 class CDBHistos;
0017 class TProfile2D;
0018 class TH1;
0019
0020 class PHCompositeNode;
0021
0022 class EventPlaneReco : public SubsysReco {
0023 public:
0024 EventPlaneReco(const std::string &name = "EventPlaneReco");
0025 ~EventPlaneReco() override = default;
0026 int InitRun(PHCompositeNode *topNode) override;
0027 int process_event(PHCompositeNode *topNode) override;
0028 int End(PHCompositeNode * ) override;
0029
0030 void ResetMe();
0031 void set_sepd_epreco(bool sepdEpReco) { _sepdEpReco = sepdEpReco; }
0032 void set_mbd_epreco(bool mbdEpReco) { _mbdEpReco = mbdEpReco; }
0033 void set_isSim(bool isSim) { _isSim = isSim; }
0034 void set_sEPD_Mip_cut(const float e) { _epd_e = e; }
0035 void set_sEPD_Charge_cut(const float c) { _epd_charge_min = c; }
0036 void set_MBD_Min_Qcut(const float f) { _mbd_e = f; }
0037 void set_MBD_Vetex_cut(const float v) { _mbd_vertex_cut = v; }
0038 void set_Ep_orders(const unsigned int n) { m_MaxOrder = n; }
0039
0040 private:
0041 int CreateNodes(PHCompositeNode *topNode);
0042 unsigned int m_MaxOrder{3};
0043 std::string FileName;
0044
0045 std::vector<std::vector<double>> south_q;
0046 std::vector<std::vector<double>> north_q;
0047 std::vector<std::vector<double>> northsouth_q;
0048 static const int nRings = 16;
0049 std::vector<std::vector<std::vector<double>>> ring_q_north;
0050 std::vector<std::vector<std::vector<double>>> ring_q_south;
0051 std::vector<std::pair<double, double>> south_Qvec;
0052 std::vector<std::pair<double, double>> north_Qvec;
0053 std::vector<std::pair<double, double>> northsouth_Qvec;
0054 std::vector<std::vector<std::pair<double, double>>> all_ring_Qvecs_north;
0055 std::vector<std::vector<std::pair<double, double>>> all_ring_Qvecs_south;
0056
0057
0058 TH1* h_phi_weight_south_input{nullptr};
0059 TH1* h_phi_weight_north_input{nullptr};
0060
0061
0062 std::vector<std::vector<double>> south_q_subtract;
0063 std::vector<std::vector<double>> north_q_subtract;
0064 std::vector<std::vector<double>> northsouth_q_subtract;
0065
0066
0067 std::vector<double> shift_north;
0068 std::vector<double> shift_south;
0069 std::vector<double> shift_northsouth;
0070 std::vector<double> tmp_south_psi;
0071 std::vector<double> tmp_north_psi;
0072 std::vector<double> tmp_northsouth_psi;
0073
0074
0075 TProfile2D *tprof_mean_cos_north_epd_input[6]{};
0076 TProfile2D *tprof_mean_sin_north_epd_input[6]{};
0077 TProfile2D *tprof_mean_cos_south_epd_input[6]{};
0078 TProfile2D *tprof_mean_sin_south_epd_input[6]{};
0079 TProfile2D *tprof_mean_cos_northsouth_epd_input[6]{};
0080 TProfile2D *tprof_mean_sin_northsouth_epd_input[6]{};
0081
0082
0083 const int _imax{12};
0084 TProfile2D *tprof_cos_north_epd_shift_input[6][12]{};
0085 TProfile2D *tprof_sin_north_epd_shift_input[6][12]{};
0086 TProfile2D *tprof_cos_south_epd_shift_input[6][12]{};
0087 TProfile2D *tprof_sin_south_epd_shift_input[6][12]{};
0088 TProfile2D *tprof_cos_northsouth_epd_shift_input[6][12]{};
0089 TProfile2D *tprof_sin_northsouth_epd_shift_input[6][12]{};
0090
0091 bool _mbdEpReco{false};
0092 bool _sepdEpReco{false};
0093 bool _isSim{false};
0094 bool _do_ep{false};
0095
0096 float _nsum{0.0};
0097 float _ssum{0.0};
0098 float _mbdvtx{999.0};
0099 float _epd_charge_min{5.0};
0100 float _epd_charge_max{10000.0};
0101 float _epd_e{10.0};
0102 float _mbd_e{10.0};
0103 float _mbdQ{0.0};
0104 double _totalcharge{0.0};
0105 float _mbd_vertex_cut{60.0};
0106 };
0107
0108 #endif