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