File indexing completed on 2025-08-03 08:21:05
0001 #ifndef SEPD_SEPDMON_H
0002 #define SEPD_SEPDMON_H
0003
0004 #include <onlmon/OnlMon.h>
0005 #include <cmath>
0006 #include <vector>
0007
0008 class CaloWaveformFitting;
0009 class TowerInfoContainer;
0010 class Event;
0011 class TH1;
0012 class TH2;
0013 class Packet;
0014 class TProfile;
0015 class TProfile2D;
0016 class runningMean;
0017 class eventReceiverClient;
0018
0019 class SepdMon : public OnlMon
0020 {
0021 public:
0022 SepdMon(const std::string &name);
0023 virtual ~SepdMon();
0024
0025 int process_event(Event *evt);
0026 int Init();
0027 int BeginRun(const int runno);
0028 int Reset();
0029
0030 protected:
0031 std::vector<float> getSignal(Packet *p, const int channel);
0032 std::vector<float> anaWaveformFast(Packet *p, const int channel);
0033 std::vector<float> anaWaveformTemp(Packet *p, const int channel);
0034 int evtcnt = 0;
0035 int idummy = 0;
0036
0037
0038 uint64_t mbdtrig{0};
0039 uint64_t mbdns{0};
0040 uint64_t mbdnsvtx10{0};
0041 uint64_t mbdnsvtx30{0};
0042 uint64_t mbdnsvtx150{0};
0043
0044 const int Nsector = 24;
0045 const int Nchannel = 192 * 4;
0046 const int packetlow = 9001;
0047 const int packethigh = 9006;
0048 const int m_nChannels = 192;
0049
0050 const int packet_depth = 1000;
0051 const float hit_threshold = 10;
0052 const int n_samples_show = 31;
0053
0054 const int nChannels = 744;
0055 int nPhi0 = 12;
0056 int nPhi = 24;
0057 int nRad = 24;
0058 double axislimit = M_PI;
0059
0060 TH2 *h_ADC_corr = nullptr;
0061 TH2 *h_hits_corr = nullptr;
0062
0063 TH1 *h1_waveform_twrAvg = nullptr;
0064 TH1 *h1_waveform_time = nullptr;
0065 TH1 *h1_waveform_pedestal = nullptr;
0066 TH1 *h_event = nullptr;
0067 TH2 *h2_sepd_waveform = nullptr;
0068
0069 TH1 *h1_sepd_fitting_sigDiff = nullptr;
0070 TH1 *h1_sepd_fitting_pedDiff = nullptr;
0071 TH1 *h1_sepd_fitting_timeDiff = nullptr;
0072
0073 TH1 *h1_packet_chans = nullptr;
0074 TH1 *h1_packet_length = nullptr;
0075 TH1 *h1_packet_number = nullptr;
0076 TH1 *h1_packet_event = nullptr;
0077
0078 TProfile *p_noiserms_all_channel{nullptr};
0079 TH1 *h_hits_all_channel = nullptr;
0080 TH1 *h_ADC_all_channel = nullptr;
0081 TH1 *h_ADC_channel[768] = {nullptr};
0082
0083
0084 std::string runtypestr = "Unknown";
0085 std::string id_string;
0086
0087 CaloWaveformFitting *WaveformProcessingFast = nullptr;
0088 CaloWaveformFitting *WaveformProcessingTemp = nullptr;
0089 eventReceiverClient *erc = nullptr;
0090
0091 std::vector<runningMean *> rm_packet_number;
0092 std::vector<runningMean *> rm_packet_length;
0093 std::vector<runningMean *> rm_packet_chans;
0094 std::vector<runningMean *> rm_packet_event;
0095 };
0096
0097 #endif