Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:21:17

0001 #pragma once
0002 
0003 // We really just need timing and hitmap plots
0004 // I don't know what the status of the Event Mixup QA is
0005 //
0006 // This will eventually contain everything
0007 
0008 #include <fun4all/SubsysReco.h>
0009 
0010 #include <array>
0011 #include <string>
0012 #include <vector>
0013 
0014 class TH1;
0015 class PHCompositeNode;
0016 class Gl1Packet; // For streaming timing QA; correct implementations are only in inttcalib
0017 // class InttEventInfo; // EventMixUpQa (eventually)
0018 class InttRawHitContainer;
0019 
0020 class InttQa : public SubsysReco {
0021 public:
0022     InttQa (std::string const& = "InttQa");
0023     // The HistoManager owns our histograms after we register them,
0024     // and we do not dynamically allocate anything else
0025     virtual ~InttQa() = default;
0026 
0027     int InitRun(PHCompositeNode* /*unused*/) override;
0028     int process_event(PHCompositeNode* /*unused*/) override;
0029 
0030 private:
0031     void query();
0032     int get_nodes(PHCompositeNode* /*unused*/);
0033 
0034     static std::string constexpr m_prefix{"h_InttQa"};
0035 
0036     static int const n_felix_servers{8};
0037     static int const n_felix_channels{14};
0038     static int const n_chips{26};
0039     static int const n_channels{128};
0040     static int const n_bcos{128};
0041     static int const n_adcs{8};
0042 
0043     typedef std::array<TH1*, n_felix_servers> per_felix_server_array_t;
0044     typedef std::array<std::array<TH1*, n_felix_channels>, n_felix_servers> per_felix_channel_array_t;
0045     typedef std::array<std::array<std::array<TH1*, n_chips>, n_felix_channels>, n_felix_servers> per_chip_array_t;
0046 
0047     bool m_is_streaming{};
0048     TH1* m_is_streaming_hist{};
0049 
0050     per_felix_server_array_t m_felix_server_hit_distribution{};
0051     per_felix_channel_array_t m_felix_channel_bco_distribution{};
0052     per_felix_channel_array_t m_felix_channel_hit_distribution{};
0053     per_chip_array_t m_chip_hit_distribution{};
0054     per_chip_array_t m_chip_adc_distribution{};
0055 
0056     static int const n_barrels{2};
0057     static int const n_ladder_z{4};
0058     static std::array<int, n_barrels> constexpr n_ladders{24, 32, };
0059     static std::array<int, n_ladder_z> constexpr n_strip_y{5, 8, 8, 5, };
0060 
0061     typedef std::array<TH1*, n_barrels> per_barrel_array_t;
0062     per_barrel_array_t m_barrel_hit_distribution{};
0063 
0064     Gl1Packet* m_gl1_packet{};
0065     // std::vector<InttEventHeader*> m_intt_event_headers{};
0066     std::vector<InttRawHitContainer*> m_intt_raw_hit_containers{};
0067 
0068 };