File indexing completed on 2025-08-05 08:12:41
0001 #ifndef __HIJBKG_UPC_H__
0002 #define __HIJBKG_UPC_H__
0003
0004 #include <Rtypes.h>
0005 #include <fun4all/SubsysReco.h>
0006
0007 #include <string>
0008 #include <vector>
0009 #include <TParticle.h>
0010
0011 class PHCompositeNode;
0012 class PHG4Particle;
0013 class TTree;
0014 class TFile;
0015
0016 class hijbkg_upc : public SubsysReco
0017 {
0018 public:
0019
0020 hijbkg_upc(const std::string &name = "hijbkg_upc");
0021
0022 ~hijbkg_upc() override;
0023
0024
0025
0026
0027
0028
0029 int Init(PHCompositeNode *topNode) override;
0030
0031
0032
0033
0034
0035
0036 int InitRun(PHCompositeNode *topNode) override;
0037
0038
0039
0040
0041 int process_event(PHCompositeNode *topNode) override;
0042
0043
0044 int ResetEvent(PHCompositeNode *topNode) override;
0045
0046
0047 int EndRun(const int runnumber) override;
0048
0049
0050 int End(PHCompositeNode *topNode) override;
0051
0052
0053 int Reset(PHCompositeNode * ) override;
0054
0055 void Print(const std::string &what = "ALL") const override;
0056
0057 private:
0058
0059 TTree *T;
0060 int m_evt {0};
0061 Float_t m_cent = 0;
0062 Float_t m_b = 0;
0063 TParticle m_part[2];
0064
0065 std::vector<int> m_pid = {0};
0066 std::vector<Float_t> m_pt = {0};
0067 std::vector<Float_t> m_eta = {0};
0068 std::vector<Float_t> m_phi = {0};
0069 std::vector<Float_t> m_e = {0};
0070 std::vector<Float_t> m_p = {0};
0071 Float_t m_psi2 = 0;
0072
0073 std::string Outfile;
0074 TFile *out;
0075
0076 int isStableCharged(int pid);
0077 float getpT(PHG4Particle *particle);
0078 float getPhi(PHG4Particle *particle);
0079 float getEta(PHG4Particle *particle);
0080 float getP(PHG4Particle *particle);
0081
0082 };
0083
0084 #endif