Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BbcMonDefs.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file BbcMonDefs.h
1 #ifndef __BBCMONDEFS_H__
2 #define __BBCMONDEFS_H__
3 
4 #define AUAU // PROTONPROTON //PAL //PAU //DAU //HE3AU //CUCU //AUAU
5 
6 namespace bbc_onlmon
7 {
8 
9  const int num_pmt = 128; // number of PMT
10  const int tdc_max = 4096; // TDC number of max
11  const int tdc_min_overflow = 2600; // TDC number of max
12  const int tdc_max_overflow = 3299; // TDC number of max
13  const float max_armhittime = 22; // Minimum of Tdc-ArmHitTime
14  const float min_armhittime = 0; // Maximum od Tdc-ArmHitTime
15  static const double TDC_FIT_MAX = 19.0; // compatible type with TF::GetParameter(1)
16  static const double TDC_FIT_MIN = 1.0;
17  //static const int zvtnbin = 180;
18  static const int zvtnbin = 600;
19  static const float max_zvertex = 300;
20  static const float min_zvertex = -300;
21 
22 #define nPMT_1SIDE_BBC 64
23 #define nPMT_BBC (nPMT_1SIDE_BBC * 2)
24 
25 #define nCANVAS 4
26 
27 #define nSIDE 2
28 #define nTRIGGER 2
29 
30  static const char *SIDE_Str[nSIDE] __attribute__((unused)) = {"South", "North"};
31  static const char *TRIGGER_str[nTRIGGER] __attribute__((unused)) = {"minimum_bias", "laser"};
32 
33 #define nTDC 1
34  // static const char *TDC_STR[nTDC] = {"TDC0","TDC1"};
35  // static const char *TDC_Str[nTDC] = {"Tdc0","Tdc1"};
36  // static const char *TDC_str[nTDC] = {"tdc0","tdc1"};
37 
38  static const int nBIN_TDC = 64;
39 
40  static const float TDC_CONVERSION_FACTOR = 0.007;
41  static const int nBIN_ADC = 128;
42  static const int MAX_ADC = 4096;
43 
44  static const float VIEW_OVERFLOW_MAX = 20;
45  static const float VIEW_OVERFLOW_MIN = -20;
46  static const float BBC_TDC_OVERFLOW_REGULAR_MAX = 3; // Sigma
47  static const float BBC_TDC_OVERFLOW_REGULAR_MIN = -3; // Sigma
48  static const float BBC_TDC_OVERFLOW_REGULAR_RMS_MAX = 3.0; // sigma
49  static const float BBC_ZVERTEX_OVERFLOW_REGULAR_MAX = 50; // cm
50  static const float BBC_ZVERTEX_OVERFLOW_REGULAR_MIN = -50; // cm
51 
52  static const float BBC_nHIT_LASER_MAX[nSIDE] = {1.00, 1.00};
53  static const float BBC_nHIT_LASER_MIN[nSIDE] = {0.95, 0.95};
54  // changed at Jan. 25. 2003
55  // Due to the laser timing in ch25 is faster than normal ch,
56  // the ich25 tend to have under-flow of the tdc(tdc<0ch).
57  // Then, I changed the BBC_nHIT_LASER_MIN[nSIDE] to 0.95%
58  // Takashi Hachiya
59 
60  /*
61  0 : for 6 devided pads
62  */
63  static const float CANVAS_XAXIS_TITLE_SIZE[] = {0.060};
64  static const float CANVAS_XAXIS_TITLE_OFFSET[] = {1.000};
65  static const float CANVAS_XAXIS_LABEL_SIZE[] = {0.050};
66  static const float CANVAS_XAXIS_LABEL_OFFSET[] = {0.005};
67  static const float CANVAS_XAXIS_PAD_OFFSET[] = {1.000};
68 
69  static const float CANVAS_YAXIS_TITLE_SIZE[] = {0.070};
70  static const float CANVAS_YAXIS_TITLE_OFFSET[] = {0.500};
71  static const float CANVAS_YAXIS_LABEL_SIZE[] = {0.050};
72  static const float CANVAS_YAXIS_LABEL_OFFSET[] = {0.005};
73  static const float CANVAS_YAXIS_PAD_OFFSET[] = {0.150};
74 
75  static const float BBC_TYPICAL_REGULAR_TDC0_MEAN = 10.5;
76  static const float BBC_MAX_REGULAR_TDC0_MEAN = 13.5; // for 7.7GeV run
77  static const float BBC_MIN_REGULAR_TDC0_MEAN = 7.5; // for 7.7GeV run
78  // static const float BBC_MAX_REGULAR_TDC0_MEAN = 12.5;
79  // static const float BBC_MIN_REGULAR_TDC0_MEAN = 8.5;
80  static const float BBC_TYPICAL_REGULAR_TDC1_MEAN = 10.5;
81  static const float BBC_MAX_REGULAR_TDC1_MEAN = 13.5; // for 7.7GeV run
82  static const float BBC_MIN_REGULAR_TDC1_MEAN = 7.5; // for 7.7GeV run
83  // static const float BBC_MAX_REGULAR_TDC1_MEAN = 12.5;
84  // static const float BBC_MIN_REGULAR_TDC1_MEAN = 8.5;
85  static const float BBC_MAX_REGULAR_ZVERTEX_MEAN = 20.0;
86  static const float BBC_MIN_REGULAR_ZVERTEX_MEAN = -20.0;
88 
89  static const int BBC_PACKET_ID = 1001;
90  static const int BBCN_PACKET_ID = 1002;
91  static const int BBCS_PACKET_ID = 1003;
92  static const int BBC_ZDC_PACKET_ID = 13001;
93  static const int BBC_TRIG_PACKET_ID = 14001;
94 
95 #ifdef HE3AU
96  static const unsigned long BBC_ZDC_TRIG = 0x4; // 0x2;
97  static const unsigned long BBC_BBC_TRIG = 0x2; // 0x1;
98  static const unsigned long BBC_BBZDC_TRIG = 0x8; // 0x8;
99  static const unsigned long BBC_BBLL1_TRIG = 0x40; // 0x1000;
100  // for He3Au
101  static const float BBC_nHIT_MB_MAX[nSIDE] = {0.90, 0.90};
102  static const float BBC_nHIT_MB_MIN[nSIDE] = {0.05, 0.05};
103  static const float ZDC_BBC_TRIGSCALE = 1;
104  // Charge Sum plot
105  static const int MAX_ADC_MIP = 100; // for He3Au
106  static const int MAX_CHARGE_SUM = 500; // for He3Au
107 #endif
108 
109 #ifdef CUCU
110  static const unsigned long BBC_ZDC_TRIG = 0x4; // 0x2;
111  static const unsigned long BBC_BBC_TRIG = 0x2; // 0x1;
112  static const unsigned long BBC_BBZDC_TRIG = 0x8; // 0x8;
113  static const unsigned long BBC_BBLL1_TRIG = 0x40; // 0x1000;
114  // for CuCu
115  static const float BBC_nHIT_MB_MAX[nSIDE] = {0.90, 0.90};
116  static const float BBC_nHIT_MB_MIN[nSIDE] = {0.10, 0.10};
117  static const float ZDC_BBC_TRIGSCALE = 10;
118  // Charge Sum plot
119  static const int MAX_ADC_MIP = 50; // for AuAu
120  static const int MAX_CHARGE_SUM = 1500; // for AuAu
121 #endif
122  // last year
123 #ifdef AUAU
124  static const unsigned long BBC_ZDC_TRIG = 0x4; // 0x2;
125  static const unsigned long BBC_BBC_TRIG = 0x2; // 0x1;
126  static const unsigned long BBC_BBZDC_TRIG = 0x8; // 0x8;
127  static const unsigned long BBC_BBLL1_TRIG = 0x40; // 0x1000;
128  // for AuAu
129  static const float BBC_nHIT_MB_MAX[nSIDE] = {0.90, 0.90};
130  // static const float BBC_nHIT_MB_MIN[nSIDE] = { 0.10, 0.10 };
131  static const float BBC_nHIT_MB_MIN[nSIDE] = {0.05, 0.05};
132  static const float ZDC_BBC_TRIGSCALE = 1;
133  // Charge Sum plot
134  static const int MAX_ADC_MIP = 100; // for AuAu
135  static const int MAX_CHARGE_SUM = 1500; // for AuAu 200GeV
136 // static const int MAX_ADC_MIP = 100; // for AuAu 15GeV
137 // static const int MAX_CHARGE_SUM = 150; // for AuAu 15GeV
138 // static const int MAX_ADC_MIP = 50; // for AuAu
139 // static const int MAX_CHARGE_SUM = 400; // for AuAu
140 // static const int MAX_CHARGE_SUM = 1500; // for AuAu 200GeV
141 // static const int MAX_CHARGE_SUM = 750; // for AuAu 62GeV
142 // static const int MAX_CHARGE_SUM = 150; // for AuAu 7.7GeV
143 #endif
144 
145 #ifdef DAU
146  static const unsigned long BBC_ZDC_TRIG = 0x4; // 0x2;
147  static const unsigned long BBC_BBC_TRIG = 0x2; // 0x1;
148  static const unsigned long BBC_BBZDC_TRIG = 0x8; // 0x8;
149  static const unsigned long BBC_BBLL1_TRIG = 0x40; // 0x1000;
150  // for dAu
151  static const float BBC_nHIT_MB_MAX[nSIDE] = {0.80, 0.40};
152  static const float BBC_nHIT_MB_MIN[nSIDE] = {0.02, 0.005};
153  static const float ZDC_BBC_TRIGSCALE = 3;
154  // Charge Sum plot
155  static const int MAX_ADC_MIP = 50; // for dAu
156  static const int MAX_CHARGE_SUM = 150; // for dAu
157 #endif
158 
159 #ifdef PAU
160  static const unsigned long BBC_ZDC_TRIG = 0x4; // 0x2;
161  static const unsigned long BBC_BBC_TRIG = 0x2; // 0x1;
162  static const unsigned long BBC_BBZDC_TRIG = 0x8; // 0x8;
163  static const unsigned long BBC_BBLL1_TRIG = 0x40; // 0x1000;
164  // for pAu
165  static const float BBC_nHIT_MB_MAX[nSIDE] = {0.80, 0.60};
166  static const float BBC_nHIT_MB_MIN[nSIDE] = {0.02, 0.01};
167  static const float ZDC_BBC_TRIGSCALE = 3;
168  // Charge Sum plot
169  static const int MAX_ADC_MIP = 100; // for pAu
170  static const int MAX_CHARGE_SUM = 250; // for pAu
171 #endif
172 
173 #ifdef PAL
174  static const unsigned long BBC_ZDC_TRIG = 0x4; // 0x2;
175  static const unsigned long BBC_BBC_TRIG = 0x2; // 0x1;
176  static const unsigned long BBC_BBZDC_TRIG = 0x8; // 0x8;
177  static const unsigned long BBC_BBLL1_TRIG = 0x40; // 0x1000;
178  // for pAl
179  static const float BBC_nHIT_MB_MAX[nSIDE] = {0.80, 0.60};
180  static const float BBC_nHIT_MB_MIN[nSIDE] = {0.02, 0.01};
181  static const float ZDC_BBC_TRIGSCALE = 3;
182  // Charge Sum plot
183  static const int MAX_ADC_MIP = 100; // for pAu
184  static const int MAX_CHARGE_SUM = 200; // for pAu
185 #endif
186 
187 #ifdef PROTONPROTON
188 
189  static const unsigned long BBC_ZDC_TRIG = 0x4000000; // 27 zdcns;
190  static const unsigned long BBC_BBC_TRIG = 0x4; // 3bit bbll1>1 only
191  static const unsigned long BBC_BBZDC_TRIG = 0x8; // 0x8;
192  static const unsigned long BBC_BBLL1_TRIG = 0x40; // 0x1000;
193  static const unsigned long BBC_BBLL1_NOVTX_TRIG = 0x80000000; //;
194  static const unsigned long BBC_RBIB_NTC_WIDE = 0x100000; //;
195 
196  // for pp
197  static const float BBC_nHIT_MB_MAX[nSIDE] = {0.60, 0.60};
198  static const float BBC_nHIT_MB_MIN[nSIDE] = {0.01, 0.01};
199  static const float ZDC_BBC_TRIGSCALE = 55;
200  // Charge Sum plot
201  static const int MAX_ADC_MIP = 100; // for pp
202  static const int MAX_CHARGE_SUM = 100; // for pp
203 #endif
204 
205 #ifdef UU
206  static const unsigned long BBC_ZDC_TRIG = 0x4; // 0x2;
207  static const unsigned long BBC_BBC_TRIG = 0x2; // 0x1;
208  static const unsigned long BBC_BBZDC_TRIG = 0x8; // 0x8;
209  static const unsigned long BBC_BBLL1_TRIG = 0x40; // 0x1000;
210  static const float BBC_nHIT_MB_MAX[nSIDE] = {0.90, 0.90};
211  static const float BBC_nHIT_MB_MIN[nSIDE] = {0.05, 0.05};
212  static const float ZDC_BBC_TRIGSCALE = 1;
213  // Charge Sum plot
214  static const int MAX_ADC_MIP = 50; // for UU
215  static const int MAX_CHARGE_SUM = 1500; // for UU 200GeV
216 #endif
217 
218  static const unsigned long BBC_BBLL1_COPY_TRIG = 0x1000000; // new trigger
219  // static const int BBC_BBLL1_TRIG = 0x10; //0x1000;
220  //static const unsigned long BBC_LASER_TRIG = 0x40000000; // 0x40000000;
221 
222  // the mean of TDC between south and north should be this value.
223  // static const int BBC_DEFAULT_OFFSET = 1500;
224  static const float BBC_DEFAULT_OFFSET = 10.5;
225 
226  // for trigger rate between BBCLL1 and ZDC within certain vertex cut
227  // the number should be within 3-5
228  static const float BBC_ZVERTEX_CUT_FOR_TRIG_RATE = 30.0; // [cm]
229 
230  // color definition
231  // static const int BBC_COLOR_ZVTX[4] = {4,2,7,1};
232  static const int BBC_COLOR_ZVTX[5] = {4, 2, 7, 6, 1};
233 
234  static const int BBC_NSAMPLES = 31; // number of digitizer samples
235 
236 } // namespace bbc_onlmon
237 
238 #endif /*__BBCMONDEFS_H__ */