1 |
#ifndef l2calcore_h |
2 |
#define l2calcore_h |
3 |
#include <TSystem.h> |
4 |
#include <TSQLServer.h> |
5 |
#include <GLTables.h> |
6 |
|
7 |
/* trigger configuration */ |
8 |
#define CTOF1 (1<<0) // (S11 + S12) * (S21 + S22) * (S31 + S32) |
9 |
#define CTOF2 (1<<1) // (S11 * S12) * (S21 * S22) * (S31 * S32) |
10 |
#define CTOF3 (1<<2) // (S21 + S22) * (S31 + S32) |
11 |
#define CTOF4 (1<<3) // (S21 * S22) * (S31 * S32) |
12 |
#define CTOF5 (1<<4) // S12 * (S21 * S22) |
13 |
#define CTOF6 (1<<5) // (S11 + S12) * (S31 + S32) |
14 |
#define CTOF7 (1<<6) // (S11 * S12) * (S31 * S32) |
15 |
#define CS4 (1<<7) // S4_1 |
16 |
#define CCALO (1<<8) // CALO_1 + CALO_2 + CALO_3 + CALO_4 |
17 |
#define CCALIB_ON (1<<9) |
18 |
|
19 |
/* Pattern Trigger definitions */ |
20 |
#define PT_LENGTH 6 |
21 |
|
22 |
/* PT: scintillators */ |
23 |
#define S11(pt) (pt[5] != 0) |
24 |
#define S12(pt) (pt[4] != 0) |
25 |
#define S21(pt) ((pt[3] & 0x00F) != 0) |
26 |
#define S22(pt) ((pt[3] & 0x0F0) != 0) |
27 |
#define S31(pt) ((pt[2] & 0x03F) != 0) |
28 |
#define S32(pt) ((pt[2] & 0xFC0) != 0) |
29 |
|
30 |
/* PT: calorimeter */ |
31 |
#define PCaloST(pt) (pt[0] & 0x0F) |
32 |
#define PCalo(pt) ((pt[0] & 0x0F) != 0) |
33 |
#define PCaloSection(pt, s) ((pt[0] & (1<<s)) != 0) |
34 |
#define PCaloXE(pt) ((pt[0] & 0x04) != 0) |
35 |
#define PCaloXO(pt) ((pt[0] & 0x08) != 0) |
36 |
#define PCaloYE(pt) ((pt[0] & 0x01) != 0) |
37 |
#define PCaloYO(pt) ((pt[0] & 0x02) != 0) |
38 |
|
39 |
/* PT: S4 */ |
40 |
#define PS4(pt) ((pt[1] & 0x01) != 0) |
41 |
|
42 |
struct FlCaLevel1 { |
43 |
Double_t al_p[5][2]; |
44 |
Float_t estrip[96][22][2]; |
45 |
Int_t good2; |
46 |
Int_t trkchi2; |
47 |
Float_t xalig; |
48 |
Float_t yalig; |
49 |
Float_t zalig; |
50 |
Float_t emin; |
51 |
Float_t riginput; |
52 |
Int_t hzn; |
53 |
Int_t npla; |
54 |
Int_t reverse; |
55 |
}; |
56 |
|
57 |
struct FlCaLevel2 { |
58 |
Int_t fmode[2]; |
59 |
Float_t wartrig; |
60 |
Float_t trigty; |
61 |
Int_t good; |
62 |
Int_t perr[4]; |
63 |
Int_t swerr[4]; |
64 |
Int_t crc[4]; |
65 |
Int_t selftrigger; |
66 |
Float_t nstrip; |
67 |
Float_t nsatstrip; |
68 |
Float_t qtot; |
69 |
Float_t ncore; |
70 |
Float_t qcore; |
71 |
Float_t impx; |
72 |
Float_t impy; |
73 |
Float_t tanx; |
74 |
Float_t tany; |
75 |
Float_t noint; |
76 |
Float_t ncyl; |
77 |
Float_t qcyl; |
78 |
Float_t qtrack; |
79 |
Float_t qmax; |
80 |
Float_t nx22; |
81 |
Float_t qx22; |
82 |
Float_t qq[4]; |
83 |
Float_t qtrackx; |
84 |
Float_t qtracky; |
85 |
Float_t dxtrack; |
86 |
Float_t dytrack; |
87 |
Float_t qlast; |
88 |
Float_t nlast; |
89 |
Float_t qpre; |
90 |
Float_t npre; |
91 |
Float_t qpresh; |
92 |
Float_t npresh; |
93 |
Float_t qlow; |
94 |
Float_t nlow; |
95 |
Float_t qtr; |
96 |
Float_t ntr; |
97 |
Float_t planetot; |
98 |
Float_t qmean; |
99 |
Int_t planemax[2]; |
100 |
Float_t dX0l; |
101 |
Float_t varcfit[2]; |
102 |
Int_t npcfit[2]; |
103 |
Int_t cibar[22][2]; |
104 |
Int_t tibar[22][2]; |
105 |
Float_t cbar[22][2]; |
106 |
Float_t tbar[22][2]; |
107 |
Float_t elen; |
108 |
Float_t selen; |
109 |
Int_t selfdelay[4][7]; |
110 |
}; |
111 |
|
112 |
/* struct FlEventi{ */ |
113 |
/* Float_t dexy[96][22][2]; */ |
114 |
/* }; */ |
115 |
|
116 |
/* struct FlGruppo{ */ |
117 |
/* Float_t clus[96][22][2]; */ |
118 |
/* Int_t ncl[22][2]; */ |
119 |
/* }; */ |
120 |
|
121 |
/* struct FlGruppo2{ */ |
122 |
/* Float_t clus2[96][22][2]; */ |
123 |
/* Int_t ncl2[22][2]; */ |
124 |
/* }; */ |
125 |
|
126 |
/* struct FlGruppo4{ */ |
127 |
/* Float_t clus4[96][22][2]; */ |
128 |
/* Int_t ncl4[22][2]; */ |
129 |
/* }; */ |
130 |
|
131 |
/* struct FlTaglioen{ */ |
132 |
/* Float_t einf; */ |
133 |
/* Float_t esup; */ |
134 |
/* Float_t ener[2]; */ |
135 |
/* }; */ |
136 |
|
137 |
/* struct FlAngolo{ */ |
138 |
/* Float_t bar[22][2]; */ |
139 |
/* Int_t ibar[22][2]; */ |
140 |
/* }; */ |
141 |
|
142 |
/* struct FlWhere{ */ |
143 |
/* Float_t cx; */ |
144 |
/* Float_t cy; */ |
145 |
/* Float_t piano[22]; */ |
146 |
/* }; */ |
147 |
|
148 |
/* struct FlGeneral{ */ |
149 |
/* Float_t rig; */ |
150 |
/* Float_t rmass; */ |
151 |
/* }; */ |
152 |
|
153 |
/* struct FlCh{ */ |
154 |
/* Float_t check; */ |
155 |
/* }; */ |
156 |
|
157 |
/* struct FlCalofit{ */ |
158 |
/* Float_t varfit[2]; */ |
159 |
/* Int_t npfit[2]; */ |
160 |
/* Int_t iwpl[2]; */ |
161 |
/* Int_t chtrack; */ |
162 |
/* }; */ |
163 |
|
164 |
/* struct FlPawcd{ */ |
165 |
/* Float_t hmemor[9000000]; */ |
166 |
/* }; */ |
167 |
|
168 |
/* struct FlQuestd{ */ |
169 |
/* Int_t iquest[100]; */ |
170 |
/* }; */ |
171 |
|
172 |
extern int CaloCore(UInt_t run, TFile *file, GL_TABLES *glt, Int_t calargc, char *calargv[]); |
173 |
|
174 |
#endif |