BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/TrigEvent/include/TrigEvent/TrigMdc.h
Go to the documentation of this file.
1#ifndef EVENT_TRIG_MDC_H
2#define EVENT_TRIG_MDC_H
3
4#include <map>
5#include <stdint.h>
6#include <string>
7#include <vector>
8
9class TrigMdc {
10public:
11 TrigMdc( const char* name );
12 virtual ~TrigMdc();
13
14 void setMdcTrigData( uint32_t boardId, uint32_t window, uint32_t datasize,
15 const uint32_t* data );
16
17 void initialize();
18
19 inline const std::string& getName() const { return m_name; }
20 // hit
21 inline int getMdcHitOne( int layer, int wire ) const { return m_mdchit_one[layer][wire]; }
22 inline int getMdcHitSOne( int layer, int wire ) const {
23 if ( m_mdchit_sone[layer][wire] != 0 ) { return ( m_mdchit_sone[layer][wire] + 1 ); }
24 else return 0;
25 }
26 inline int getMdcHitPre( int layer, int wire ) const {
27 return m_mdchit_pre[layer][wire];
28 } // first up in windows
29 inline int getMdcHitAft( int layer, int wire ) const {
30 return m_mdchit_aft[layer][wire];
31 } // first down in windows after first up
32 inline uint32_t getMdcHitWin( int layer, int wire ) const {
33 return m_mdchit_win[layer][wire];
34 } // hit distributions in windows
35
36 // tsf
37 inline int getMdcTSFOne( int layer, int wire ) const { return m_mdctsf_one[layer][wire]; }
38 inline int getMdcTSFSOne( int layer, int wire ) const {
39 if ( m_mdctsf_sone[layer][wire] != 0 ) { return ( m_mdctsf_sone[layer][wire] + 1 ); }
40 else return 0;
41 }
42 inline int getMdcTSFPre( int layer, int wire ) const {
43 return m_mdctsf_pre[layer][wire];
44 } // first up in windows
45 inline int getMdcTSFAft( int layer, int wire ) const {
46 return m_mdctsf_aft[layer][wire];
47 } // first down in windows after first up
48 inline uint32_t getMdcTSFWin( int layer, int wire ) const {
49 return m_mdctsf_win[layer][wire];
50 } // hit distributions in windows
51
52 // ltrk
53 inline int getMdcLtrkOne( int id ) const { return m_mdcltrk_one[id]; }
54 inline int getMdcLtrkSOne( int id ) const {
55 if ( m_mdcltrk_sone[id] != 0 ) { return ( m_mdcltrk_sone[id] + 1 ); }
56 else return 0;
57 }
58 inline int getMdcLtrkPre( int id ) const { return m_mdcltrk_pre[id]; } // first up in windows
59 inline int getMdcLtrkAft( int id ) const {
60 return m_mdcltrk_aft[id];
61 } // first down in windows after first up
62 inline uint32_t getMdcLtrkWin( int id ) const {
63 return m_mdcltrk_win[id];
64 } // hit distributions in windows
65
66 // strk
67 inline int getMdcStrkOne( int id ) const { return m_mdcstrk_one[id]; }
68 inline int getMdcStrkSOne( int id ) const {
69 if ( m_mdcstrk_sone[id] != 0 ) { return ( m_mdcstrk_sone[id] + 1 ); }
70 else return 0;
71 }
72 inline int getMdcStrkPre( int id ) const { return m_mdcstrk_pre[id]; } // first up in windows
73 inline int getMdcStrkAft( int id ) const {
74 return m_mdcstrk_aft[id];
75 } // first down in windows after first up
76 inline uint32_t getMdcStrkWin( int id ) const {
77 return m_mdcstrk_win[id];
78 } // hit distributions in windows
79
80 // ltrk in couter
81 inline int getMdcLtrkCoutOne( int id ) const { return m_mdcltrkc_one[id]; }
82 inline int getMdcLtrkCoutSOne( int id ) const {
83 if ( m_mdcltrkc_sone[id] != 0 ) { return ( m_mdcltrkc_sone[id] + 1 ); }
84 else return 0;
85 }
86
87 // strk in counter
88 inline int getMdcStrkCoutOne( int id ) const { return m_mdcstrkc_one[id]; }
89 inline int getMdcStrkCoutSOne( int id ) const {
90 if ( m_mdcstrkc_sone[id] != 0 ) { return ( m_mdcstrkc_sone[id] + 1 ); }
91 else return 0;
92 }
93
94 inline int getMdcTrigCondi( int id ) const { return m_mdcTrigCondi[id]; }
95
96 void print();
97
98private:
99 std::string m_name;
100 std::string filename;
101 std::map<uint32_t, std::vector<uint32_t>> m_datamap;
102
103 int** m_mdchit_one;
104 int** m_mdchit_sone;
105 int** m_mdchit_pre;
106 int** m_mdchit_aft;
107 uint32_t** m_mdchit_win;
108
109 int** m_mdctsf_one;
110 int** m_mdctsf_sone;
111 int** m_mdctsf_pre;
112 int** m_mdctsf_aft;
113 uint32_t** m_mdctsf_win;
114
115 int* m_mdcltrk_one;
116 int* m_mdcltrk_sone;
117 int* m_mdcltrk_pre;
118 int* m_mdcltrk_aft;
119 uint32_t* m_mdcltrk_win;
120
121 int* m_mdcstrk_one;
122 int* m_mdcstrk_sone;
123 int* m_mdcstrk_pre;
124 int* m_mdcstrk_aft;
125 uint32_t* m_mdcstrk_win;
126
127 int* m_mdcltrkc_one;
128 int* m_mdcltrkc_sone;
129
130 int* m_mdcstrkc_one;
131 int* m_mdcstrkc_sone;
132
133 int* m_mdcTrigCondi;
134
135 /*
136 int m_mdchit_one[24][256];
137 int m_mdctsf_one[6][256];
138 int m_mdcltrk_one[128];
139 int m_mdcstrk_one[128];
140 int m_mdcltrkc_one[132];
141 int m_mdcstrkc_one[132];
142
143 int m_mdchit_sone[24][256];
144 int m_mdctsf_sone[6][256];
145 int m_mdcltrk_sone[128];
146 int m_mdcstrk_sone[128];
147 int m_mdcltrkc_sone[132];
148 int m_mdcstrkc_sone[132];
149 */
150};
151
152#endif // EVENT_TRIG_MDC_H
TTree * data
uint32_t getMdcHitWin(int layer, int wire) const
int getMdcHitAft(int layer, int wire) const
virtual ~TrigMdc()
Definition TrigMdc.cxx:80
uint32_t getMdcLtrkWin(int id) const
int getMdcTSFAft(int layer, int wire) const
const std::string & getName() const
int getMdcTSFPre(int layer, int wire) const
uint32_t getMdcStrkWin(int id) const
int getMdcHitPre(int layer, int wire) const
uint32_t getMdcTSFWin(int layer, int wire) const
TrigMdc(const char *name)
Definition TrigMdc.cxx:7
int getMdcTSFOne(int layer, int wire) const
int getMdcTSFSOne(int layer, int wire) const
int getMdcHitOne(int layer, int wire) const
void initialize()
Definition TrigMdc.cxx:102
void print()
Definition TrigMdc.cxx:413
void setMdcTrigData(uint32_t boardId, uint32_t window, uint32_t datasize, const uint32_t *data)
Definition TrigMdc.cxx:145
int getMdcHitSOne(int layer, int wire) const