File indexing completed on 2025-08-05 08:13:14
0001 #ifndef JETRHOMEDIAN__H
0002 #define JETRHOMEDIAN__H
0003
0004 #include <fun4all/SubsysReco.h>
0005
0006 #include <memory>
0007 #include <string>
0008 #include <utility> // std::pair, std::make_pair
0009
0010 #include <array>
0011 #include <vector>
0012
0013 class PHCompositeNode;
0014 class JetEvalStack;
0015 class TTree;
0016 class TH2D;
0017 class TH1;
0018 class JetInput;
0019
0020 class JetRhoMedian : public SubsysReco
0021 {
0022 public:
0023 JetRhoMedian
0024 ( const std::string& outputfilename = "JetRhoMedian.root"
0025 , const float _jet_R = 0.4
0026 , const std::string& truthjetname = "AntiKt_Truth_r04"
0027 , const std::string& sub1jetname = "AntiKt_Truth_r04"
0028 , const float min_lead_truth_pt = 10.
0029 );
0030
0031 virtual ~JetRhoMedian();
0032
0033
0034 int Init (PHCompositeNode *topNode);
0035 int InitRun (PHCompositeNode *topNode);
0036 int process_event (PHCompositeNode *topNode);
0037 int End (PHCompositeNode *topNode);
0038 void clear_vectors();
0039 void add_input(JetInput *input) { m_inputs.push_back(input); }
0040
0041 private:
0042 long long int nevent { 0 };
0043 long long int outevent { 0 };
0044 const std::string m_outputfilename;
0045 const float jet_R;
0046 const std::string m_truthJetName;
0047 const std::string m_sub1JetName;
0048 const float m_min_lead_truth_pt;
0049
0050 int i_truthset = 0;
0051
0052 std::string m_recoJetName;
0053
0054 TTree *m_T;
0055
0056
0057 float m_rho;
0058 float m_rho_sigma;
0059 float m_cent_mdb { -1. };
0060 float m_cent { -1. };
0061 float m_cent_epd { -1. };
0062 float m_impactparam { -1. };
0063
0064
0065 std::vector<float> m_CaloJetEta {};
0066 std::vector<float> m_CaloJetPhi {};
0067 std::vector<float> m_CaloJetPt {};
0068 std::vector<float> m_CaloJetPtLessRhoA {};
0069 std::vector<float> m_CaloJetArea {};
0070
0071
0072 std::vector<float> m_TruthJetEta {};
0073 std::vector<float> m_TruthJetPhi {};
0074 std::vector<float> m_TruthJetPt {};
0075
0076
0077 std::vector<float> m_Sub1JetEta {};
0078 std::vector<float> m_Sub1JetPhi {};
0079 std::vector<float> m_Sub1JetPt {};
0080
0081
0082 float mBGE_mean_area { 0 };
0083 float mBGE_empty_area { 0 };
0084 float mBGE_n_empty_jets { 0 };
0085 unsigned int mBGE_n_jets_used { 0 };
0086
0087 std::vector<JetInput *> m_inputs;
0088 };
0089
0090 #endif