Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:20:04

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