File indexing completed on 2025-12-17 09:21:17
0001 #ifndef GLOBALQA_GLOBALQA_H
0002 #define GLOBALQA_GLOBALQA_H
0003
0004 #include <fun4all/SubsysReco.h>
0005
0006 #include <limits> // for numeric_limits
0007 #include <string>
0008 #include <vector>
0009
0010
0011 class CDBTTree;
0012 class PHCompositeNode;
0013 class TH1;
0014 class TH2;
0015 class TProfile2D;
0016
0017 class GlobalQA : public SubsysReco
0018 {
0019 public:
0020
0021 GlobalQA(const std::string &name =
0022 "GlobalQA");
0023
0024
0025
0026 ~GlobalQA() override = default;
0027
0028
0029 int Init(PHCompositeNode *) override;
0030
0031
0032 int process_event(PHCompositeNode *) override;
0033
0034 int process_g4hits(PHCompositeNode *);
0035 int process_g4cells(PHCompositeNode *);
0036 int process_towers(PHCompositeNode *);
0037 int process_clusters(PHCompositeNode *);
0038 int process_mbd(PHCompositeNode *);
0039
0040 void Detector(const std::string &name) { detector = name; }
0041 void set_timing_cut_width(const int &t) { _range = t; }
0042
0043 void set_debug(bool debug) { m_debug = debug; }
0044 TH2 *LogYHist2D(const std::string &name, const std::string &title, int,
0045 double, double, int, double, double);
0046
0047 private:
0048
0049 int Getpeaktime(TH1 *h);
0050 void createHistos();
0051
0052
0053 TH1 *h_GlobalQA_mbd_zvtx{nullptr};
0054 TH1 *h_GlobalQA_mbd_zvtx_wide{nullptr};
0055 TH1 *h_GlobalQA_calc_zvtx{nullptr};
0056 TH1 *h_GlobalQA_calc_zvtx_wide{nullptr};
0057 TH1 *h_GlobalQA_mbd_charge_s{nullptr};
0058 TH1 *h_GlobalQA_mbd_charge_n{nullptr};
0059 TH1 *h_GlobalQA_mbd_charge_sum{nullptr};
0060 TH2 *h2_GlobalQA_mbd_charge_NS_correlation{nullptr};
0061 TH1 *h_GlobalQA_mbd_nhit_s{nullptr};
0062 TH1 *h_GlobalQA_mbd_nhit_n{nullptr};
0063 TH2 *h2_GlobalQA_mbd_nhits_NS_correlation{nullptr};
0064 TH1 *h_GlobalQA_mbd_zvtxq{nullptr};
0065
0066
0067 TH1 *h_GlobalQA_sEPD_tile[744] = {nullptr};
0068 TH1 *h_GlobalQA_sEPD_adcsum_s{nullptr};
0069 TH1 *h_GlobalQA_sEPD_adcsum_n{nullptr};
0070 TH2 *h2_GlobalQA_sEPD_adcsum_ns{nullptr};
0071 TH2 *h2_GlobalQA_sEPD_ADC_channel_north{nullptr};
0072 TH2 *h2_GlobalQA_sEPD_ADC_channel_south{nullptr};
0073 TProfile2D *h2Profile_GlobalQA_sEPD_tiles_north{nullptr};
0074 TProfile2D *h2Profile_GlobalQA_sEPD_tiles_south{nullptr};
0075
0076
0077 TH1 *h_GlobalQA_zdc_zvtx{nullptr};
0078 TH1 *h_GlobalQA_zdc_zvtx_wide{nullptr};
0079 TH1 *h_GlobalQA_zdc_energy_s{nullptr};
0080 TH1 *h_GlobalQA_zdc_energy_n{nullptr};
0081 TH1 *h_GlobalQA_triggerVec{nullptr};
0082 float zdc_zvtx{std::numeric_limits<float>::quiet_NaN()};
0083
0084 int _eventcounter{0};
0085 int _range{1};
0086 uint64_t triggervec{0};
0087
0088
0089 bool m_debug{false};
0090
0091 std::string detector;
0092 std::string m_outputFileName;
0093 std::string OutputFileName;
0094
0095
0096 static constexpr uint64_t mbdns = (0x1UL << 10) | (0x1UL << 11);
0097 static constexpr uint64_t mbdnsvtx10 = (0x1UL << 12) | (0x1UL << 15);
0098 static constexpr uint64_t mbdnsvtx30 = (0x1UL << 13);
0099 static constexpr uint64_t mbdnsvtx150 = (0x1UL << 14);
0100 static constexpr uint64_t mbdtrig = mbdns | mbdnsvtx10 | mbdnsvtx30 | mbdnsvtx150;
0101 };
0102
0103 #endif