Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:21:08

0001 #ifndef ZDC_ZDCMON_H
0002 #define ZDC_ZDCMON_H
0003 
0004 #include <onlmon/OnlMon.h>
0005 
0006 #include <onlmon/OnlMon.h>
0007 #include <cmath>
0008 #include <vector>
0009 
0010 class CaloWaveformFitting;
0011 class TowerInfoContainer;
0012 class Event;
0013 class TH1;
0014 class TH2;
0015 class TProfile;
0016 class Packet;
0017 
0018 class ZdcMon : public OnlMon
0019 {
0020  public:
0021   ZdcMon(const std::string &name = "ZDCMON");
0022   virtual ~ZdcMon();
0023 
0024   int process_event(Event *evt);
0025   int Init();
0026   int BeginRun(const int runno);
0027   int Reset();
0028   
0029 
0030  protected:
0031   std::vector<float> anaWaveformFast(Packet *p, const int channel);
0032   CaloWaveformFitting *WaveformProcessingFast = nullptr;
0033 
0034   double PI = 3.14159;
0035   int evtcnt = 0;
0036   int idummy = 0;
0037 
0038   //zdc
0039   TH1 *zdc_adc_north = nullptr;
0040   TH1 *zdc_adc_south = nullptr;
0041 
0042 
0043   TH1 *zdc_N1 = nullptr;
0044   TH1 *zdc_N2 = nullptr;
0045   TH1 *zdc_N3 = nullptr;
0046   TH1 *zdc_S1 = nullptr;
0047   TH1 *zdc_S2 = nullptr;
0048   TH1 *zdc_S3 = nullptr;
0049 
0050   TH1 *veto_NF = nullptr;
0051   TH1 *veto_NB = nullptr;
0052   TH1 *veto_SF = nullptr;
0053   TH1 *veto_SB = nullptr;
0054     
0055     
0056   TH1* h_waveform_timez = nullptr;
0057   TH1* h_waveform_timess = nullptr;
0058   TH1* h_waveform_timesn = nullptr;
0059   TH1* h_waveform_timevs = nullptr;
0060   TH1* h_waveform_timevn = nullptr;
0061 
0062   // //waveform
0063   TH2 *h_waveformZDC = nullptr;
0064   TH2 *h_waveformSMD_North = nullptr;
0065   TH2 *h_waveformSMD_South = nullptr;
0066   TH2 *h_waveformVeto_North = nullptr;
0067   TH2 *h_waveformVeto_South = nullptr;
0068 
0069 
0070   // smd
0071   // Individual Channels
0072   TH1 *smd_adc_n_hor_ind[8] = {nullptr};
0073   TH1 *smd_adc_s_hor_ind[8] = {nullptr};
0074   TH1 *smd_adc_n_ver_ind[7] = {nullptr};
0075   TH1 *smd_adc_s_ver_ind[7] = {nullptr};
0076 
0077   // SMD hit Multiplicities
0078   TH1 *smd_north_hor_hits = nullptr;
0079   TH1 *smd_north_ver_hits = nullptr;
0080   TH1 *smd_south_hor_hits = nullptr;
0081   TH1 *smd_south_ver_hits = nullptr;
0082 
0083   // north smd
0084   TH1 *smd_hor_north = nullptr;
0085   TH1 *smd_ver_north = nullptr;
0086   TH1 *smd_sum_hor_north = nullptr;
0087   TH1 *smd_sum_ver_north = nullptr;
0088   TH1 *smd_hor_north_small = nullptr;
0089   TH1 *smd_ver_north_small = nullptr;
0090   TH1 *smd_hor_north_good = nullptr;
0091   TH1 *smd_ver_north_good = nullptr;
0092   // south smd
0093   TH1 *smd_hor_south = nullptr;
0094   TH1 *smd_ver_south = nullptr;
0095   TH1 *smd_sum_hor_south = nullptr;
0096   TH1 *smd_sum_ver_south = nullptr;
0097   TH1 *smd_hor_south_good = nullptr;
0098   TH1 *smd_ver_south_good = nullptr;
0099   // smd values
0100   TH2 *smd_value = nullptr;
0101   TH2 *smd_value_good = nullptr;
0102   TH2 *smd_value_small = nullptr;
0103   TH2 *smd_xy_north = nullptr;
0104   TH2 *smd_xy_south = nullptr;
0105 
0106   float v[4] = {0.0f};
0107   float smd_adc[32] = {0.0f};
0108   float zdc_adc[16] = {0.0f};
0109   float smd_sum[4] = {0.0f};
0110   float smd_pos[4] = {0.0f};
0111 
0112   float gain[32] = {0.0f};
0113   float smd_south_rgain[16] = {0.0f};
0114   float smd_north_rgain[16] = {0.0f};
0115   float overflow0[40] = {0.0f};
0116   float overflow1[40] = {0.0f};
0117 
0118   void CompSmdAdc();
0119   void CompSmdPos();
0120   void CompSumSmd();
0121   void CompZdcAdc();
0122 };
0123 
0124 #endif /* ZDC_ZDCMON_H */