File indexing completed on 2025-08-06 08:18:43
0001
0002
0003 #ifndef DIJETQA_H
0004 #define DIJETQA_H
0005
0006 #include "jetqa/JetQADefs.h"
0007
0008 #include <calobase/RawTower.h>
0009 #include <calobase/RawTowerContainer.h>
0010 #include <calobase/RawTowerGeom.h>
0011 #include <calobase/RawTowerGeomContainer.h>
0012 #include <calobase/TowerInfo.h>
0013 #include <calobase/TowerInfoContainer.h>
0014
0015 #include <calotrigger/TriggerAnalyzer.h>
0016
0017 #include <centrality/CentralityInfo.h>
0018
0019 #include <fun4all/Fun4AllBase.h>
0020 #include <fun4all/Fun4AllHistoManager.h>
0021 #include <fun4all/Fun4AllReturnCodes.h>
0022 #include <fun4all/SubsysReco.h>
0023
0024 #include <globalvertex/GlobalVertex.h>
0025 #include <globalvertex/GlobalVertexMap.h>
0026
0027 #include <jetbase/JetContainer.h>
0028 #include <jetbase/JetMap.h>
0029 #include <jetbase/Jetv1.h>
0030 #include <jetbase/Jetv2.h>
0031
0032 #include <phool/PHCompositeNode.h>
0033 #include <phool/getClass.h>
0034
0035 #include <qautils/QAHistManagerDef.h>
0036
0037 #include <TFile.h>
0038 #include <TH1.h>
0039 #include <TH2.h>
0040 #include <TTree.h>
0041
0042 #include <cstdlib>
0043 #include <math.h>
0044 #include <string>
0045 #include <unordered_set>
0046 #include <utility>
0047 #include <vector>
0048 #include <boost/format.hpp>
0049
0050 #define PI 3.1415926535
0051
0052 class PHCompositeNode;
0053
0054 class DijetQA : public SubsysReco
0055 {
0056 public:
0057 DijetQA(const std::string &name = "DijetQA", const std::string &recojetname="AntiKt_Tower_r04");
0058
0059 ~DijetQA() override;
0060
0061
0062
0063
0064
0065
0066 int Init(PHCompositeNode *topNode) override;
0067
0068
0069
0070
0071
0072
0073 int InitRun(PHCompositeNode *topNode) override;
0074
0075
0076
0077
0078 int process_event(PHCompositeNode *topNode) override;
0079 void FindPairs(JetContainer *);
0080
0081
0082 int ResetEvent(PHCompositeNode *topNode) override;
0083
0084
0085 int EndRun(const int runnumber) override;
0086
0087
0088 int End(PHCompositeNode *topNode) override;
0089
0090
0091 int Reset(PHCompositeNode * ) override;
0092
0093
0094 void Print(const std::string &what = "ALL") const override;
0095
0096
0097 void setEtaRange(double low, double high)
0098 {
0099 m_etaRange.first = low;
0100 m_etaRange.second = high;
0101 }
0102
0103
0104 void setPtLeadRange(double low, double high)
0105 {
0106 m_ptLeadRange.first = low;
0107 m_ptLeadRange.second = high;
0108 }
0109
0110
0111 void setPtSubRange(double low, double high)
0112 {
0113 m_ptSubRange.first = low;
0114 m_ptSubRange.second = high;
0115 }
0116
0117
0118 void setTrgToSelect(const uint32_t trig = JetQADefs::GL1::MBDNSJet1)
0119 {
0120 m_doTrgSelect = true;
0121 m_trgToSelect = trig;
0122 }
0123
0124
0125
0126
0127
0128
0129
0130
0131 private:
0132 std::string m_moduleName;
0133 std::pair<float, float> m_etaRange;
0134 std::pair<float, float> m_ptLeadRange;
0135 std::pair<float, float> m_ptSubRange;
0136 float DeltaPhiOne{3.141529694 / 32.};
0137
0138 int ntowers_opening{2};
0139 float DeltaPhi{ntowers_opening * DeltaPhiOne};
0140 int m_nJet, m_nJetPair;
0141 float m_zvtx,m_Ajj, m_xj, m_ptl, m_ptsl;
0142 float m_phil, m_phisl, m_dphil, m_dphi, m_etal, m_etasl, m_deltaeta;
0143 TH1F *h_Ajj{nullptr}, *h_xj{nullptr}, *h_pt{nullptr}, *h_dphi{nullptr};
0144 TH2F *h_Ajj_pt{nullptr}, *h_xj_pt{nullptr}, *h_dphi_pt{nullptr}, *h_dphi_Ajj{nullptr};
0145 TH1F *h_Ajj_l{nullptr}, *h_xj_l{nullptr}, *h_pt_l{nullptr}, *h_dphi_l{nullptr};
0146 TH2F *h_Ajj_pt_l{nullptr}, *h_xj_pt_l{nullptr}, *h_dphi_pt_l{nullptr}, *h_dphi_Ajj_l{nullptr};
0147 bool m_doTrgSelect;
0148 uint32_t m_trgToSelect;
0149 std::string m_recoJetName;
0150 Fun4AllHistoManager *m_manager{nullptr};
0151 TriggerAnalyzer *m_analyzer{nullptr};
0152 };
0153
0154 #endif