File indexing completed on 2025-08-05 08:11:13
0001
0002 #ifndef FINDDIJETS_H
0003 #define FINDDIJETS_H
0004
0005 #include <fun4all/SubsysReco.h>
0006 #include <calotrigger/TriggerAnalyzer.h>
0007 #include <DijetEventDisplay.h>
0008 #include <string>
0009 #include <array>
0010 #include "TMath.h"
0011
0012 class TF1;
0013
0014 class Fun4AllHistoManager;
0015 class PHCompositeNode;
0016 class TowerInfoContainer;
0017 class JetContainer;
0018 class PHG4TruthInfoContainer;
0019 struct jetty
0020 {
0021 float pt = 0;
0022 float et = 0;
0023 float eta = 0;
0024 float phi = 0;
0025 float iso = 0;
0026 float emcal = 0;
0027 float ihcal = 0;
0028 float ohcal = 0;
0029 float edep = 0;
0030 float edep_em = 0;
0031 float edep_hd = 0;
0032
0033 };
0034 class FindDijets : public SubsysReco
0035 {
0036 public:
0037
0038 FindDijets(const std::string &name = "FindDijets", const std::string &outfilename = "trees_finddijets.root");
0039
0040 virtual ~FindDijets();
0041
0042 int Init(PHCompositeNode *topNode) override;
0043
0044 int InitRun(PHCompositeNode *topNode) override;
0045
0046 int process_event(PHCompositeNode *topNode) override;
0047
0048 void process_truth_jets(JetContainer *jets);
0049
0050 void GetNodes (PHCompositeNode *topNode);
0051
0052 int ResetEvent(PHCompositeNode *topNode) override;
0053
0054 int EndRun(const int runnumber) override;
0055
0056 int End(PHCompositeNode *topNode) override;
0057
0058 int Reset(PHCompositeNode * ) override;
0059
0060 void SetIsSim(bool use) {isSim = use;}
0061 void SetPtCut(float pt) {pt_cut = pt;}
0062 double get_Dr(struct jetty jet1, struct jetty jet2);
0063 void DrawDijets(bool d) { drawDijets = d; }
0064 private:
0065
0066
0067 TriggerAnalyzer *triggeranalyzer{nullptr};;
0068 DijetEventDisplay *dijeteventdisplay{nullptr};
0069
0070
0071 int _verbosity;
0072
0073 float pt_cut = 4;
0074 float dphi_cut[3] = {TMath::Pi()/2., 3.*TMath::Pi()/4., 7.*TMath::Pi()/8.};
0075 float pt_cut1[3] = {10., 20., 30.};
0076 float pt_cut2[3] = {5., 10., 15.};
0077 std::string _foutname;
0078 std::string _nodename;
0079 std::string m_calo_nodename;
0080 int _i_event;
0081 bool isSim{0};
0082 Fun4AllHistoManager *hm{nullptr};
0083 std::array<std::string, 8> m_jet_triggernames;;
0084
0085 TF1 *fsmear{nullptr};
0086 bool drawDijets{false};
0087 double isocut = 1.0;
0088 };
0089
0090 #endif