File indexing completed on 2025-08-05 08:13:18
0001
0002
0003 #ifndef JETNCONSTITUENTS_H
0004 #define JETNCONSTITUENTS_H
0005
0006 #include <fun4all/SubsysReco.h>
0007 #include <jetbase/Jet.h>
0008
0009 #include <string>
0010 #include <utility> // std::pair, std::make_pair
0011 #include <vector>
0012
0013 class PHCompositeNode;
0014
0015 class TH1;
0016 class TH2;
0017 class JetInput;
0018
0019
0020
0021
0022
0023
0024 class JetNconstituents : public SubsysReco
0025 {
0026
0027 public:
0028
0029 JetNconstituents(const std::string &outputfilename = "JetNconstituents.root");
0030 ~JetNconstituents() override {};
0031
0032 void setEtaRange(double low, double high)
0033 {
0034 m_etaRange.first = low;
0035 m_etaRange.second = high;
0036 }
0037
0038 void setPtRange(double low, double high)
0039 {
0040 m_ptRange.first = low;
0041 m_ptRange.second = high;
0042 }
0043
0044 void setRecoJetNodeName(const std::string &name)
0045 {
0046 m_recoJetName = name;
0047 }
0048
0049
0050 int Init(PHCompositeNode *topNode) override;
0051 int process_event(PHCompositeNode *topNode) override;
0052 int End(PHCompositeNode *topNode) override;
0053
0054
0055 private:
0056
0057
0058 std::string m_outputFileName{ "JetNconstituents.root"};
0059
0060
0061
0062 std::pair<double, double> m_etaRange = std::make_pair(-1.1, 1.1);
0063 std::pair<double, double> m_ptRange = std::make_pair(1.0, 1000.0);
0064 std::string m_recoJetName { "AntiKt_Tower_r04"};
0065
0066
0067 TH1 * h1_jetNconstituents_total{nullptr};
0068 TH1 * h1_jetNconstituents_IHCAL{nullptr};
0069 TH1 * h1_jetNconstituents_OHCAL{nullptr};
0070 TH1 * h1_jetNconstituents_CEMC{nullptr};
0071 TH2 * h2_jetNconstituents_vs_caloLayer{nullptr};
0072
0073
0074 TH1 * h1_jetFracE_IHCAL{nullptr};
0075 TH1 * h1_jetFracE_OHCAL{nullptr};
0076 TH1 * h1_jetFracE_CEMC{nullptr};
0077 TH2 * h2_jetFracE_vs_caloLayer{nullptr};
0078
0079
0080
0081 };
0082
0083 #endif