Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TpotMon.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TpotMon.h
1 #ifndef TPOT_TPOTMON_H
2 #define TPOT_TPOTMON_H
3 
4 #include "MicromegasGeometry.h"
5 
9 #include <onlmon/OnlMon.h>
10 
11 #include <array>
12 #include <memory>
13 
14 class Event;
15 class TH1;
16 class TH2;
17 class TH2Poly;
18 
19 class TpotMon : public OnlMon
20 {
21  public:
22  TpotMon(const std::string &name);
23  ~TpotMon() override = default;
24 
25  int process_event(Event *evt) override;
26  int Init() override;
27  int BeginRun(const int runno) override;
28  int Reset() override;
29 
33 
35  void set_max_sample( int value )
36  { m_max_sample = value; }
37 
39  void set_n_sigma( double value ) { m_n_sigma = value; }
40 
42  void set_min_adc( double value ) { m_min_adc = value; }
43 
44  // define signal sample window
45  using sample_window_t = std::pair<int, int>;
48 
49  private:
50 
52  void setup_detector_bins( TH2Poly* );
53 
56 
58  int m_evtcnt = 0;
59 
61  /*
62  * it is estimated by summing the number of recorded waveforms/max_waveform/trigger
63  * this will break when zero suppression is implemented
64  */
65  double m_fullevtcnt = 0;
66 
69 
72 
75 
78 
80  int m_max_sample = 100;
81 
82  // sample window
84 
86  double m_n_sigma = 5;
87 
89  double m_min_adc = 50;
90 
92  TH1* m_counters = nullptr;
93 
95  TH2Poly* m_detector_multiplicity_z = nullptr;
96  TH2Poly* m_detector_multiplicity_phi = nullptr;
97 
99  TH2Poly* m_detector_occupancy_z = nullptr;
100  TH2Poly* m_detector_occupancy_phi = nullptr;
101 
103  TH2Poly* m_resist_multiplicity_z = nullptr;
104  TH2Poly* m_resist_multiplicity_phi = nullptr;
105 
107  TH2Poly* m_resist_occupancy_z = nullptr;
108  TH2Poly* m_resist_occupancy_phi = nullptr;
109 
110  //@name per detector structure
113  {
114  public:
115 
117  TH1* m_counts_sample = nullptr;
118 
120  TH2* m_adc_sample = nullptr;
121 
123  TH1* m_hit_charge = nullptr;
124 
126  TH1* m_hit_multiplicity = nullptr;
127 
129  TH1* m_hit_vs_channel = nullptr;
130  };
132 
133  //@name map tile centers (from MicromegasGeometry) to fee_id
134  std::map<int, MicromegasGeometry::point_t> m_tile_centers;
135 
136  //@name map detector histograms to fee id
137  std::map<int, detector_histograms_t> m_detector_histograms;
138 
139 };
140 
141 #endif /* TPOT_TPOTMON_H */