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