45 #include <JANA/JApplication.h>
46 #include <JANA/JFactory.h>
78 INDIVIDUAL_CHANNEL_DATA =
false;
79 CHECK_EMULATED_DATA =
false;
80 ANALYZE_F250_DATA =
true;
81 ANALYZE_F125_DATA =
true;
86 gPARMS->SetDefaultParameter(
"LOWLEVEL:MOREPLOTS", MORE_PLOTS,
"Make more monitoring plots.");
87 gPARMS->SetDefaultParameter(
"LOWLEVEL:CHECKEMULATION", CHECK_EMULATED_DATA,
"Make plots for checking emulation.");
88 gPARMS->SetDefaultParameter(
"LOWLEVEL:INDIVIDUAL", INDIVIDUAL_CHANNEL_DATA,
"Make histograms for individual channels.");
89 gPARMS->SetDefaultParameter(
"LOWLEVEL:F250DATA", ANALYZE_F250_DATA,
"Analyze f250ADC data");
90 gPARMS->SetDefaultParameter(
"LOWLEVEL:F125DATA", ANALYZE_F125_DATA,
"Analyze f125ADC data");
91 gPARMS->SetDefaultParameter(
"LOWLEVEL:F125THRESHOLD", F125_THRESHOLD,
"Set threshold for accepting f125ADC hits (in ADC counts)");
92 gPARMS->SetDefaultParameter(
"LOWLEVEL:F250THRESHOLD", F250_THRESHOLD,
"Set threshold for accepting f250ADC hits (in ADC counts)");
95 TDirectory *base = gDirectory;
96 TDirectory *maindir = gDirectory->mkdir(
"lowlevel_online");
101 if(ANALYZE_F250_DATA) {
104 gDirectory->mkdir(
"BCAL")->cd();
106 bcal_adc_multi =
new TH1I(
"bcal_adc_multi",
"BCAL ADC Multiplicity", 200, 0, 200);
107 bcal_tdc_multi =
new TH1I(
"bcal_tdc_multi",
"BCAL TDC Multiplicity", 200, 0, 200);
109 bcal_adc_integral =
new TH1I(
"bcal_adc_integral",
"BCAL fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000);
110 bcal_adc_peak =
new TH1I(
"bcal_adc_peak",
"BCAL fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1500);
111 bcal_adc_time =
new TH1I(
"bcal_adc_time",
"BCAL fADC250 Pulse Time;Time (ns)", 500, 0, 5000);
112 bcal_adc_pedestal =
new TH1I(
"bcal_adc_pedestal",
"BCAL fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 100, 0, 5000);
114 bcal_tdc_time =
new TH1I(
"bcal_tdc_time",
"BCAL TDC Pulse Time;Time (ns)", 1000, -1000, 3000);
117 bcal_adc_integral_pedsub =
new TH1I(
"bcal_adc_integral_pedsub",
"BCAL fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000);
118 bcal_adc_peak_pedsub =
new TH1I(
"bcal_adc_peak_pedsub",
"BCAL fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1500);
119 bcal_adc_quality =
new TH1I(
"bcal_adc_quality",
"BCAL fADC250 Quality Factor;Quality Factor", 128, 0, 128);
122 if(CHECK_EMULATED_DATA) {
123 bcal_adc_emudelta_integral =
new TH1I(
"bcal_adc_emudelta_integral",
"BCAL fADC250 Pulse Integral (Reported-Emulated)", 100, -50, 50);
124 bcal_adc_emudelta_peak =
new TH1I(
"bcal_adc_emudelta_peak",
"BCAL fADC250 Pulse Peak (Reported-Emulated)", 100, -50, 50);
125 bcal_adc_emudelta_pedestal =
new TH1I(
"bcal_adc_emudelta_pedestal",
"BCAL fADC250 Pulse Pedestal (Reported-Emulated)", 100, -50, 50);
126 bcal_adc_emudelta_coarsetime =
new TH1I(
"bcal_adc_emudelta_coarsetime",
"BCAL fADC250 Pulse Coarse Time (Reported-Emulated)", 100, -50, 50);
127 bcal_adc_emudelta_finetime =
new TH1I(
"bcal_adc_emudelta_finetime",
"BCAL fADC250 Pulse Fine Time (Reported-Emulated)", 100, -50, 50);
130 if(INDIVIDUAL_CHANNEL_DATA) {
131 const int NBCAL_channels = 1536;
133 bcal_adc_integral_chan =
new TH2I(
"bcal_adc_integral_chan",
"BCAL fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000, NBCAL_channels, 0, NBCAL_channels);
134 bcal_adc_integral_pedsub_chan =
new TH2I(
"bcal_adc_integral_pedsub_chan",
"BCAL fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000, NBCAL_channels, 0, NBCAL_channels);
135 bcal_adc_peak_chan =
new TH2I(
"bcal_adc_peak_chan",
"BCAL fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NBCAL_channels, 0, NBCAL_channels);
136 bcal_adc_peak_pedsub_chan =
new TH2I(
"bcal_adc_peak_pedsub_chan",
"BCAL fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NBCAL_channels, 0, NBCAL_channels);
137 bcal_adc_time_chan =
new TH2I(
"bcal_adc_time_chan",
"BCAL fADC250 Pulse Time;Time (ns)", 500, 0, 5000, NBCAL_channels, 0, NBCAL_channels);
138 bcal_adc_pedestal_chan =
new TH2I(
"bcal_adc_pedestal_chan",
"BCAL fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200, NBCAL_channels, 0, NBCAL_channels);
139 bcal_adc_quality_chan =
new TH2I(
"bcal_adc_quality_chan",
"BCAL fADC250 Quality Factor;Quality Factor", 128, 0, 128, NBCAL_channels, 0, NBCAL_channels);
161 bcal_num_events =
new TH1I(
"bcal_num_events",
"BCAL number of events", 1, 0.0, 1.0);
164 if(ANALYZE_F250_DATA) {
166 gDirectory->mkdir(
"CCAL")->cd();
168 ccal_adc_multi =
new TH1I(
"ccal_adc_multi",
"CCAL ADC Multiplicity", 250, 0, 250);
170 ccal_adc_integral =
new TH1I(
"ccal_adc_integral",
"CCAL fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000);
171 ccal_adc_peak =
new TH1I(
"ccal_adc_peak",
"CCAL fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000);
172 ccal_adc_time =
new TH1I(
"ccal_adc_time",
"CCAL fADC250 Pulse Time;Time (ns)", 1000, 0, 10000);
173 ccal_adc_pedestal =
new TH1I(
"ccal_adc_pedestal",
"CCAL fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 200, 0, 6000);
175 ccal_num_events =
new TH1I(
"ccal_num_events",
"CCAL number of events", 1, 0.0, 1.0);
179 if(ANALYZE_F125_DATA) {
181 gDirectory->mkdir(
"CDC")->cd();
184 int Nstraws[28] = {42, 42, 54, 54, 66, 66, 80, 80, 93, 93, 106, 106, 123, 123,
185 135, 135, 146, 146, 158, 158, 170, 170, 182, 182, 197, 197, 209, 209};
186 Nstraws_integrated.clear();
187 Nstraws_integrated.push_back(0);
188 for(
int i=1; i<28; i++)
189 Nstraws_integrated.push_back( Nstraws[i]+Nstraws_integrated[i-1] );
191 const int Nstraws_total = Nstraws_integrated[27];
193 cdc_adc_multi =
new TH1I(
"cdc_adc_multi",
"CDC ADC Multiplicity", 500, 0, 500);
195 cdc_adc_integral =
new TH1I(
"cdc_adc_integral",
"CDC fADC125 Pulse Integral;Integral (fADC counts)", 1000, 0, 20000);
196 cdc_adc_time =
new TH1I(
"cdc_adc_time",
"CDC fADC125 Pulse Time;Time (ns)", 500, 0, 2000);
197 cdc_adc_pedestal =
new TH1I(
"cdc_adc_pedestal",
"CDC fADC125 Summed Pedestal;Pedestal Sum (fADC counts)", 200, 0, 1000);
200 cdc_adc_integral_pedsub =
new TH1I(
"cdc_adc_integral_pedsub",
"CDC fADC125 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 20000);
201 cdc_adc_quality =
new TH1I(
"cdc_adc_quality",
"CDC fADC125 Quality Factor;Quality Factor", 40, 0, 40);
204 if(INDIVIDUAL_CHANNEL_DATA) {
205 cdc_adc_integral_chan =
new TH2I(
"cdc_adc_integral_chan",
"CDC fADC125 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000, Nstraws_total, 0, Nstraws_total);
206 cdc_adc_integral_pedsub_chan =
new TH2I(
"cdc_adc_integral_pedsub_chan",
"CDC fADC125 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)",
207 1000, 0, 40000, Nstraws_total, 0, Nstraws_total);
208 cdc_adc_time_chan =
new TH2I(
"cdc_adc_time_chan",
"CDC fADC125 Pulse Time;Time (ns)", 500, 0, 5000, Nstraws_total, 0, Nstraws_total);
209 cdc_adc_pedestal_chan =
new TH2I(
"cdc_adc_pedestal_chan",
"CDC fADC125 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200, Nstraws_total, 0, Nstraws_total);
210 cdc_adc_quality_chan =
new TH2I(
"cdc_adc_quality_chan",
"CDC fADC125 Quality Factor;Quality Factor", 128, 0, 128, Nstraws_total, 0, Nstraws_total);
213 cdc_num_events =
new TH1I(
"cdc_num_events",
"CDC number of events", 1, 0.0, 1.0);
217 if(ANALYZE_F250_DATA) {
219 gDirectory->mkdir(
"FCAL")->cd();
221 fcal_adc_multi =
new TH1I(
"fcal_adc_multi",
"FCAL ADC Multiplicity", 250, 0, 250);
223 fcal_adc_integral =
new TH1I(
"fcal_adc_integral",
"FCAL fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000);
224 fcal_adc_peak =
new TH1I(
"fcal_adc_peak",
"FCAL fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000);
225 fcal_adc_time =
new TH1I(
"fcal_adc_time",
"FCAL fADC250 Pulse Time;Time (ns)", 500, 0, 5000);
226 fcal_adc_pedestal =
new TH1I(
"fcal_adc_pedestal",
"FCAL fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 200, 0, 6000);
229 fcal_adc_integral_pedsub =
new TH1I(
"fcal_adc_integral_pedsub",
"FCAL fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000);
230 fcal_adc_peak_pedsub =
new TH1I(
"fcal_adc_peak_pedsub",
"FCAL fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000);
231 fcal_adc_quality =
new TH1I(
"fcal_adc_quality",
"FCAL fADC250 Quality Factor;Quality Factor", 128, 0, 128);
234 if(CHECK_EMULATED_DATA) {
235 fcal_adc_emudelta_integral =
new TH1I(
"fcal_adc_emudelta_integral",
"FCAL fADC250 Pulse Integral (Reported-Emulated)", 100, -50, 50);
236 fcal_adc_emudelta_peak =
new TH1I(
"fcal_adc_emudelta_peak",
"FCAL fADC250 Pulse Peak (Reported-Emulated)", 100, -50, 50);
237 fcal_adc_emudelta_pedestal =
new TH1I(
"fcal_adc_emudelta_pedestal",
"FCAL fADC250 Pulse Pedestal (Reported-Emulated)", 100, -50, 50);
238 fcal_adc_emudelta_coarsetime =
new TH1I(
"fcal_adc_emudelta_coarsetime",
"FCAL fADC250 Pulse Coarse Time (Reported-Emulated)", 100, -50, 50);
239 fcal_adc_emudelta_finetime =
new TH1I(
"fcal_adc_emudelta_finetime",
"FCAL fADC250 Pulse Fine Time (Reported-Emulated)", 100, -50, 50);
242 if(INDIVIDUAL_CHANNEL_DATA) {
243 const int NFCAL_blocks = 3600;
245 fcal_adc_integral_chan =
new TH2I(
"fcal_adc_integral_chan",
"FCAL fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000, NFCAL_blocks, 0, NFCAL_blocks);
246 fcal_adc_integral_pedsub_chan =
new TH2I(
"fcal_adc_integral_pedsub_chan",
"FCAL fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000, NFCAL_blocks, 0, NFCAL_blocks);
247 fcal_adc_peak_chan =
new TH2I(
"fcal_adc_peak_chan",
"FCAL fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NFCAL_blocks, 0, NFCAL_blocks);
248 fcal_adc_peak_pedsub_chan =
new TH2I(
"fcal_adc_peak_pedsub_chan",
"FCAL fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NFCAL_blocks, 0, NFCAL_blocks);
249 fcal_adc_time_chan =
new TH2I(
"fcal_adc_time_chan",
"FCAL fADC250 Pulse Time;Time (ns)", 500, 0, 5000, NFCAL_blocks, 0, NFCAL_blocks);
250 fcal_adc_pedestal_chan =
new TH2I(
"fcal_adc_pedestal_chan",
"FCAL fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200, NFCAL_blocks, 0, NFCAL_blocks);
251 fcal_adc_quality_chan =
new TH2I(
"fcal_adc_quality_chan",
"FCAL fADC250 Quality Factor;Quality Factor", 128, 0, 128, NFCAL_blocks, 0, NFCAL_blocks);
254 fcal_num_events =
new TH1I(
"fcal_num_events",
"FCAL number of events", 1, 0.0, 1.0);
259 if(ANALYZE_F125_DATA) {
261 gDirectory->mkdir(
"FDC")->cd();
263 fdc_adc_multi =
new TH1I(
"fdc_adc_multi",
"FDC ADC Multiplicity", 500, 0, 1000);
264 fdc_tdc_multi =
new TH1I(
"fdc_tdc_multi",
"FDC TDC Multiplicity", 500, 0, 1000);
266 fdc_adc_integral =
new TH1I(
"fdc_adc_integral",
"FDC fADC125 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000);
267 fdc_adc_time =
new TH1I(
"fdc_adc_time",
"FDC fADC125 Pulse Time;Time (ns)", 500, 0, 3000);
268 fdc_adc_pedestal =
new TH1I(
"fdc_adc_pedestal",
"FDC fADC125 Summed Pedestal;Pedestal Sum (fADC counts)", 110, 0, 2200);
271 fdc_tdc_time =
new TH1I(
"fdc_tdc_time",
"FDC TDC Pulse Time;Time (ns)", 1000, -500, 9500);
274 fdc_adc_integral_pedsub =
new TH1I(
"fdc_adc_integral_pedsub",
"FDC fADC125 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000);
275 fdc_adc_quality =
new TH1I(
"fdc_adc_quality",
"FDC fADC125 Quality Factor;Quality Factor", 20, 0, 20);
278 if(INDIVIDUAL_CHANNEL_DATA) {
279 const int NFDC_strips = 4*6*2*192;
280 fdc_adc_integral_chan =
new TH2I(
"fdc_adc_integral_chan",
"FDC fADC125 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000, NFDC_strips, 0, NFDC_strips);
281 fdc_adc_integral_pedsub_chan =
new TH2I(
"fdc_adc_integral_pedsub_chan",
"FDC fADC125 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)",
282 1000, 0, 40000, NFDC_strips, 0, NFDC_strips);
283 fdc_adc_time_chan =
new TH2I(
"fdc_adc_time_chan",
"FDC fADC125 Pulse Time;Time (ns)", 500, 0, 5000, NFDC_strips, 0, NFDC_strips);
284 fdc_adc_pedestal_chan =
new TH2I(
"fdc_adc_pedestal_chan",
"FDC fADC125 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200, NFDC_strips, 0, NFDC_strips);
285 fdc_adc_quality_chan =
new TH2I(
"fdc_adc_quality_chan",
"FDC fADC125 Quality Factor;Quality Factor", 128, 0, 128, NFDC_strips, 0, NFDC_strips);
288 fdc_num_events =
new TH1I(
"fdc_num_events",
"FDC number of events", 1, 0.0, 1.0);
292 if(ANALYZE_F250_DATA) {
294 gDirectory->mkdir(
"PSC")->cd();
296 psc_adc_multi =
new TH1I(
"psc_adc_multi",
"PSC ADC Multiplicity", 16, 0, 16);
297 psc_tdc_multi =
new TH1I(
"psc_tdc_multi",
"PSC TDC Multiplicity", 16, 0, 16);
299 psc_adc_integral =
new TH1I(
"psc_adc_integral",
"PSC fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 15000);
300 psc_adc_peak =
new TH1I(
"psc_adc_peak",
"PSC fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 3000);
301 psc_adc_time =
new TH1I(
"psc_adc_time",
"PSC fADC250 Pulse Time;Time (ns)", 500, 0, 5000);
302 psc_adc_pedestal =
new TH1I(
"psc_adc_pedestal",
"PSC fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 150, 0, 3000);
304 psc_tdc_time =
new TH1I(
"psc_tdc_time",
"PSC TDC Pulse Time;Time (ns)", 1000, -1000, 3000);
307 psc_adc_integral_pedsub =
new TH1I(
"psc_adc_integral_pedsub",
"PSC fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 15000);
308 psc_adc_peak_pedsub =
new TH1I(
"psc_adc_peak_pedsub",
"PSC fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 3000);
309 psc_adc_quality =
new TH1I(
"psc_adc_quality",
"PSC fADC250 Quality Factor;Quality Factor", 128, 0, 128);
312 if(CHECK_EMULATED_DATA) {
313 psc_adc_emudelta_integral =
new TH1I(
"psc_adc_emudelta_integral",
"PSC fADC250 Pulse Integral (Reported-Emulated)", 100, -50, 50);
314 psc_adc_emudelta_peak =
new TH1I(
"psc_adc_emudelta_peak",
"PSC fADC250 Pulse Peak (Reported-Emulated)", 100, -50, 50);
315 psc_adc_emudelta_pedestal =
new TH1I(
"psc_adc_emudelta_pedestal",
"PSC fADC250 Pulse Pedestal (Reported-Emulated)", 100, -50, 50);
316 psc_adc_emudelta_coarsetime =
new TH1I(
"psc_adc_emudelta_coarsetime",
"PSC fADC250 Pulse Coarse Time (Reported-Emulated)", 100, -50, 50);
317 psc_adc_emudelta_finetime =
new TH1I(
"psc_adc_emudelta_finetime",
"PSC fADC250 Pulse Fine Time (Reported-Emulated)", 100, -50, 50);
320 if(INDIVIDUAL_CHANNEL_DATA) {
323 psc_adc_integral_chan =
new TH2I(
"psc_adc_integral_chan",
"PSC fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000, NPSC_channels, 0, NPSC_channels);
324 psc_adc_integral_pedsub_chan =
new TH2I(
"psc_adc_integral_pedsub_chan",
"PSC fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000, NPSC_channels, 0, NPSC_channels);
325 psc_adc_peak_chan =
new TH2I(
"psc_adc_peak_chan",
"PSC fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NPSC_channels, 0, NPSC_channels);
326 psc_adc_peak_pedsub_chan =
new TH2I(
"psc_adc_peak_pedsub_chan",
"PSC fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NPSC_channels, 0, NPSC_channels);
327 psc_adc_time_chan =
new TH2I(
"psc_adc_time_chan",
"PSC fADC250 Pulse Time;Time (ns)", 500, 0, 5000, NPSC_channels, 0, NPSC_channels);
328 psc_adc_pedestal_chan =
new TH2I(
"psc_adc_pedestal_chan",
"PSC fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200, NPSC_channels, 0, NPSC_channels);
329 psc_adc_quality_chan =
new TH2I(
"psc_adc_quality_chan",
"PSC fADC250 Quality Factor;Quality Factor", 128, 0, 128, NPSC_channels, 0, NPSC_channels);
334 if(ANALYZE_F250_DATA) {
336 gDirectory->mkdir(
"PS")->cd();
338 ps_adc_multi =
new TH1I(
"ps_adc_multi",
"PS ADC Multiplicity", 150, 0, 150);
340 ps_adc_integral =
new TH1I(
"ps_adc_integral",
"PS fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000);
341 ps_adc_peak =
new TH1I(
"ps_adc_peak",
"PS fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 2500);
342 ps_adc_time =
new TH1I(
"ps_adc_time",
"PS fADC250 Pulse Time;Time (ns)", 500, 0, 5000);
343 ps_adc_pedestal =
new TH1I(
"ps_adc_pedestal",
"PS fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200);
346 ps_adc_integral_pedsub =
new TH1I(
"ps_adc_integral_pedsub",
"PS fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000);
347 ps_adc_peak_pedsub =
new TH1I(
"ps_adc_peak_pedsub",
"PS fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 2500);
348 ps_adc_quality =
new TH1I(
"ps_adc_quality",
"PS fADC250 Quality Factor;Quality Factor", 128, 0, 128);
351 if(CHECK_EMULATED_DATA) {
352 ps_adc_emudelta_integral =
new TH1I(
"ps_adc_emudelta_integral",
"PS fADC250 Pulse Integral (Reported-Emulated)", 100, -50, 50);
353 ps_adc_emudelta_peak =
new TH1I(
"ps_adc_emudelta_peak",
"PS fADC250 Pulse Peak (Reported-Emulated)", 100, -50, 50);
354 ps_adc_emudelta_pedestal =
new TH1I(
"ps_adc_emudelta_pedestal",
"PS fADC250 Pulse Pedestal (Reported-Emulated)", 100, -50, 50);
355 ps_adc_emudelta_coarsetime =
new TH1I(
"ps_adc_emudelta_coarsetime",
"PS fADC250 Pulse Coarse Time (Reported-Emulated)", 100, -50, 50);
356 ps_adc_emudelta_finetime =
new TH1I(
"ps_adc_emudelta_finetime",
"PS fADC250 Pulse Fine Time (Reported-Emulated)", 100, -50, 50);
359 if(INDIVIDUAL_CHANNEL_DATA) {
362 ps_adc_integral_chan =
new TH2I(
"ps_adc_integral_chan",
"PS fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000, NPS_channels, 0, NPS_channels);
363 ps_adc_integral_pedsub_chan =
new TH2I(
"ps_adc_integral_pedsub_chan",
"PS fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000, NPS_channels, 0, NPS_channels);
364 ps_adc_peak_chan =
new TH2I(
"ps_adc_peak_chan",
"PS fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NPS_channels, 0, NPS_channels);
365 ps_adc_peak_pedsub_chan =
new TH2I(
"ps_adc_peak_pedsub_chan",
"PS fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NPS_channels, 0, NPS_channels);
366 ps_adc_time_chan =
new TH2I(
"ps_adc_time_chan",
"PS fADC250 Pulse Time;Time (ns)", 500, 0, 5000, NPS_channels, 0, NPS_channels);
367 ps_adc_pedestal_chan =
new TH2I(
"ps_adc_pedestal_chan",
"PS fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200, NPS_channels, 0, NPS_channels);
368 ps_adc_quality_chan =
new TH2I(
"ps_adc_quality_chan",
"PS fADC250 Quality Factor;Quality Factor", 128, 0, 128, NPS_channels, 0, NPS_channels);
371 ps_num_events =
new TH1I(
"ps_num_events",
"PS number of events", 1, 0.0, 1.0);
375 if(ANALYZE_F250_DATA) {
377 gDirectory->mkdir(
"ST")->cd();
379 st_adc_multi =
new TH1I(
"st_adc_multi",
"ST ADC Multiplicity", 100, 0, 100);
380 st_tdc_multi =
new TH1I(
"st_tdc_multi",
"ST TDC Multiplicity", 100, 0, 100);
382 st_adc_integral =
new TH1I(
"st_adc_integral",
"ST fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000);
383 st_adc_peak =
new TH1I(
"st_adc_peak",
"ST fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 2500);
384 st_adc_time =
new TH1I(
"st_adc_time",
"ST fADC250 Pulse Time;Time (ns)", 500, 0, 5000);
385 st_adc_pedestal =
new TH1I(
"st_adc_pedestal",
"ST fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200);
387 st_tdc_time =
new TH1I(
"st_tdc_time",
"ST TDC Pulse Time;Time (ns)", 1000, -1000, 4000);
390 st_adc_integral_pedsub =
new TH1I(
"st_adc_integral_pedsub",
"ST fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000);
391 st_adc_peak_pedsub =
new TH1I(
"st_adc_peak_pedsub",
"ST fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 2500);
392 st_adc_quality =
new TH1I(
"st_adc_quality",
"ST fADC250 Quality Factor;Quality Factor", 128, 0, 128);
395 if(CHECK_EMULATED_DATA) {
396 st_adc_emudelta_integral =
new TH1I(
"ST_adc_emudelta_integral",
"ST fADC250 Pulse Integral (Reported-Emulated)", 100, -50, 50);
397 st_adc_emudelta_peak =
new TH1I(
"ST_adc_emudelta_peak",
"ST fADC250 Pulse Peak (Reported-Emulated)", 100, -50, 50);
398 st_adc_emudelta_pedestal =
new TH1I(
"ST_adc_emudelta_pedestal",
"ST fADC250 Pulse Pedestal (Reported-Emulated)", 100, -50, 50);
399 st_adc_emudelta_coarsetime =
new TH1I(
"ST_adc_emudelta_coarsetime",
"ST fADC250 Pulse Coarse Time (Reported-Emulated)", 100, -50, 50);
400 st_adc_emudelta_finetime =
new TH1I(
"ST_adc_emudelta_finetime",
"ST fADC250 Pulse Fine Time (Reported-Emulated)", 100, -50, 50);
403 if(INDIVIDUAL_CHANNEL_DATA) {
404 const int NST_sectors = 30;
406 st_adc_integral_chan =
new TH2I(
"st_adc_integral_chan",
"ST fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000, NST_sectors, 0, NST_sectors);
407 st_adc_integral_pedsub_chan =
new TH2I(
"st_adc_integral_pedsub_chan",
"ST fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000, NST_sectors, 0, NST_sectors);
408 st_adc_peak_chan =
new TH2I(
"st_adc_peak_chan",
"ST fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NST_sectors, 0, NST_sectors);
409 st_adc_peak_pedsub_chan =
new TH2I(
"st_adc_peak_pedsub_chan",
"ST fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NST_sectors, 0, NST_sectors);
410 st_adc_time_chan =
new TH2I(
"st_adc_time_chan",
"ST fADC250 Pulse Time;Time (ns)", 500, 0, 5000, NST_sectors, 0, NST_sectors);
411 st_adc_pedestal_chan =
new TH2I(
"st_adc_pedestal_chan",
"ST fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200, NST_sectors, 0, NST_sectors);
412 st_adc_quality_chan =
new TH2I(
"st_adc_quality_chan",
"ST fADC250 Quality Factor;Quality Factor", 128, 0, 128, NST_sectors, 0, NST_sectors);
415 st_num_events =
new TH1I(
"st_num_events",
"Start Counter number of events", 1, 0.0, 1.0);
419 if(ANALYZE_F250_DATA) {
421 gDirectory->mkdir(
"TAGH")->cd();
423 tagh_adc_multi =
new TH1I(
"tagh_adc_multi",
"TAGH ADC Multiplicity", 750, 0, 750);
424 tagh_tdc_multi =
new TH1I(
"tagh_tdc_multi",
"TAGH TDC Multiplicity", 750, 0, 750);
426 tagh_adc_integral =
new TH1I(
"tagh_adc_integral",
"TAGH fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 25000);
427 tagh_adc_peak =
new TH1I(
"tagh_adc_peak",
"TAGH fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 5000);
428 tagh_adc_time =
new TH1I(
"tagh_adc_time",
"TAGH fADC250 Pulse Time;Time (ns)", 500, 0, 5000);
429 tagh_adc_pedestal =
new TH1I(
"tagh_adc_pedestal",
"TAGH fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200);
431 tagh_tdc_time =
new TH1I(
"tagh_tdc_time",
"TAGH TDC Pulse Time;Time (ns)", 1000, -1000, 3000);
434 tagh_adc_integral_pedsub =
new TH1I(
"tagh_adc_integral_pedsub",
"TAGH fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 25000);
435 tagh_adc_peak_pedsub =
new TH1I(
"tagh_adc_peak_pedsub",
"TAGH fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 5000);
436 tagh_adc_quality =
new TH1I(
"tagh_adc_quality",
"TAGH fADC250 Quality Factor;Quality Factor", 128, 0, 128);
439 if(CHECK_EMULATED_DATA) {
440 tagh_adc_emudelta_integral =
new TH1I(
"tagh_adc_emudelta_integral",
"TAGH fADC250 Pulse Integral (Reported-Emulated)", 100, -50, 50);
441 tagh_adc_emudelta_peak =
new TH1I(
"tagh_adc_emudelta_peak",
"TAGH fADC250 Pulse Peak (Reported-Emulated)", 100, -50, 50);
442 tagh_adc_emudelta_pedestal =
new TH1I(
"tagh_adc_emudelta_pedestal",
"TAGH fADC250 Pulse Pedestal (Reported-Emulated)", 100, -50, 50);
443 tagh_adc_emudelta_coarsetime =
new TH1I(
"tagh_adc_emudelta_coarsetime",
"TAGH fADC250 Pulse Coarse Time (Reported-Emulated)", 100, -50, 50);
444 tagh_adc_emudelta_finetime =
new TH1I(
"tagh_adc_emudelta_finetime",
"TAGH fADC250 Pulse Fine Time (Reported-Emulated)", 100, -50, 50);
447 if(INDIVIDUAL_CHANNEL_DATA) {
450 tagh_adc_integral_chan =
new TH2I(
"tagh_adc_integral_chan",
"TAGH fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000, NTAGH_slots, 0, NTAGH_slots);
451 tagh_adc_integral_pedsub_chan =
new TH2I(
"tagh_adc_integral_pedsub_chan",
"TAGH fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000, NTAGH_slots, 0, NTAGH_slots);
452 tagh_adc_peak_chan =
new TH2I(
"tagh_adc_peak_chan",
"TAGH fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NTAGH_slots, 0, NTAGH_slots);
453 tagh_adc_peak_pedsub_chan =
new TH2I(
"tagh_adc_peak_pedsub_chan",
"TAGH fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NTAGH_slots, 0, NTAGH_slots);
454 tagh_adc_time_chan =
new TH2I(
"tagh_adc_time_chan",
"TAGH fADC250 Pulse Time;Time (ns)", 500, 0, 5000, NTAGH_slots, 0, NTAGH_slots);
455 tagh_adc_pedestal_chan =
new TH2I(
"tagh_adc_pedestal_chan",
"TAGH fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200, NTAGH_slots, 0, NTAGH_slots);
456 tagh_adc_quality_chan =
new TH2I(
"tagh_adc_quality_chan",
"TAGH fADC250 Quality Factor;Quality Factor", 128, 0, 128, NTAGH_slots, 0, NTAGH_slots);
459 tag_num_events =
new TH1I(
"tag_num_events",
"TAGGER number of events", 1, 0.0, 1.0);
463 if(ANALYZE_F250_DATA) {
465 gDirectory->mkdir(
"TAGM")->cd();
467 tagm_adc_multi =
new TH1I(
"tagm_adc_multi",
"TAGM ADC Multiplicity", 250, 0, 250);
468 tagm_tdc_multi =
new TH1I(
"tagm_tdc_multi",
"TAGM TDC Multiplicity", 250, 0, 250);
471 tagm_adc_integral =
new TH1I(
"tagm_adc_integral",
"TAGM fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 25000);
472 tagm_adc_peak =
new TH1I(
"tagm_adc_peak",
"TAGM fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 5000);
473 tagm_adc_time =
new TH1I(
"tagm_adc_time",
"TAGM fADC250 Pulse Time;Time (ns)", 500, 0, 5000);
474 tagm_adc_pedestal =
new TH1I(
"tagm_adc_pedestal",
"TAGM fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200);
476 tagm_tdc_time =
new TH1I(
"tagm_tdc_time",
"TAGM TDC Pulse Time;Time (ns)", 1000, -1000, 5000);
479 tagm_adc_integral_pedsub =
new TH1I(
"tagm_adc_integral_pedsub",
"TAGM fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 25000);
480 tagm_adc_peak_pedsub =
new TH1I(
"tagm_adc_peak_pedsub",
"TAGM fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 5000);
481 tagm_adc_quality =
new TH1I(
"tagm_adc_quality",
"TAGM fADC250 Quality Factor;Quality Factor", 128, 0, 128);
484 if(CHECK_EMULATED_DATA) {
485 tagm_adc_emudelta_integral =
new TH1I(
"tagm_adc_emudelta_integral",
"TAGM fADC250 Pulse Integral (Reported-Emulated)", 100, -50, 50);
486 tagm_adc_emudelta_peak =
new TH1I(
"tagm_adc_emudelta_peak",
"TAGM fADC250 Pulse Peak (Reported-Emulated)", 100, -50, 50);
487 tagm_adc_emudelta_pedestal =
new TH1I(
"tagm_adc_emudelta_pedestal",
"TAGM fADC250 Pulse Pedestal (Reported-Emulated)", 100, -50, 50);
488 tagm_adc_emudelta_coarsetime =
new TH1I(
"tagm_adc_emudelta_coarsetime",
"TAGM fADC250 Pulse Coarse Time (Reported-Emulated)", 100, -50, 50);
489 tagm_adc_emudelta_finetime =
new TH1I(
"tagm_adc_emudelta_finetime",
"TAGM fADC250 Pulse Fine Time (Reported-Emulated)", 100, -50, 50);
492 if(INDIVIDUAL_CHANNEL_DATA) {
495 tagm_adc_integral_chan =
new TH2I(
"tagm_adc_integral_chan",
"TAGM fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000, NTAGM_rows, 0, NTAGM_rows);
496 tagm_adc_integral_pedsub_chan =
new TH2I(
"tagm_adc_integral_pedsub_chan",
"TAGM fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000, NTAGM_rows, 0, NTAGM_rows);
497 tagm_adc_peak_chan =
new TH2I(
"tagm_adc_peak_chan",
"TAGM fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NTAGM_rows, 0, NTAGM_rows);
498 tagm_adc_peak_pedsub_chan =
new TH2I(
"tagm_adc_peak_pedsub_chan",
"TAGM fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NTAGM_rows, 0, NTAGM_rows);
499 tagm_adc_time_chan =
new TH2I(
"tagm_adc_time_chan",
"TAGM fADC250 Pulse Time;Time (ns)", 500, 0, 5000, NTAGM_rows, 0, NTAGM_rows);
500 tagm_adc_pedestal_chan =
new TH2I(
"tagm_adc_pedestal_chan",
"TAGM fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200, NTAGM_rows, 0, NTAGM_rows);
501 tagm_adc_quality_chan =
new TH2I(
"tagm_adc_quality_chan",
"TAGM fADC250 Quality Factor;Quality Factor", 128, 0, 128, NTAGM_rows, 0, NTAGM_rows);
506 if(ANALYZE_F250_DATA) {
508 gDirectory->mkdir(
"TOF")->cd();
510 tof_adc_multi =
new TH1I(
"tof_adc_multi",
"TOF ADC Multiplicity", 250, 0, 250);
511 tof_tdc_multi =
new TH1I(
"tof_tdc_multi",
"TOF TDC Multiplicity", 250, 0, 250);
513 tof_adc_integral =
new TH1I(
"tof_adc_integral",
"TOF fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000);
514 tof_adc_peak =
new TH1I(
"tof_adc_peak",
"TOF fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1500);
515 tof_adc_time =
new TH1I(
"tof_adc_time",
"TOF fADC250 Pulse Time;Time (ns)", 500, 0, 5000);
516 tof_adc_pedestal =
new TH1I(
"tof_adc_pedestal",
"TOF fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200);
518 tof_tdc_time =
new TH1I(
"tof_tdc_time",
"TOF TDC Pulse Time;Time (ns)", 1000, -1000, 3000);
521 tof_adc_integral_pedsub =
new TH1I(
"tof_adc_integral_pedsub",
"TOF fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000);
522 tof_adc_peak_pedsub =
new TH1I(
"tof_adc_peak_pedsub",
"TOF fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1500);
523 tof_adc_quality =
new TH1I(
"tof_adc_quality",
"TOF fADC250 Quality Factor;Quality Factor", 128, 0, 128);
526 if(CHECK_EMULATED_DATA) {
527 tof_adc_emudelta_integral =
new TH1I(
"tof_adc_emudelta_integral",
"TOF fADC250 Pulse Integral (Reported-Emulated)", 100, -50, 50);
528 tof_adc_emudelta_peak =
new TH1I(
"tof_adc_emudelta_peak",
"TOF fADC250 Pulse Peak (Reported-Emulated)", 100, -50, 50);
529 tof_adc_emudelta_pedestal =
new TH1I(
"tof_adc_emudelta_pedestal",
"TOF fADC250 Pulse Pedestal (Reported-Emulated)", 100, -50, 50);
530 tof_adc_emudelta_coarsetime =
new TH1I(
"tof_adc_emudelta_coarsetime",
"TOF fADC250 Pulse Coarse Time (Reported-Emulated)", 100, -50, 50);
531 tof_adc_emudelta_finetime =
new TH1I(
"tof_adc_emudelta_finetime",
"TOF fADC250 Pulse Fine Time (Reported-Emulated)", 100, -50, 50);
534 if(INDIVIDUAL_CHANNEL_DATA) {
535 const int NTOF_channels = 176;
537 tof_adc_integral_chan =
new TH2I(
"tof_adc_integral_chan",
"TOF fADC250 Pulse Integral;Integral (fADC counts)", 1000, 0, 40000, NTOF_channels, 0, NTOF_channels);
538 tof_adc_integral_pedsub_chan =
new TH2I(
"tof_adc_integral_pedsub_chan",
"TOF fADC250 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 40000, NTOF_channels, 0, NTOF_channels);
539 tof_adc_peak_chan =
new TH2I(
"tof_adc_peak_chan",
"TOF fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NTOF_channels, 0, NTOF_channels);
540 tof_adc_peak_pedsub_chan =
new TH2I(
"tof_adc_peak_pedsub_chan",
"TOF fADC250 Pulse Peak;Peak (fADC counts)", 500, 0, 1000, NTOF_channels, 0, NTOF_channels);
541 tof_adc_time_chan =
new TH2I(
"tof_adc_time_chan",
"TOF fADC250 Pulse Time;Time (ns)", 500, 0, 5000, NTOF_channels, 0, NTOF_channels);
542 tof_adc_pedestal_chan =
new TH2I(
"tof_adc_pedestal_chan",
"TOF fADC250 Summed Pedestal;Pedestal Sum (fADC counts)", 164, 0, 8200, NTOF_channels, 0, NTOF_channels);
543 tof_adc_quality_chan =
new TH2I(
"tof_adc_quality_chan",
"TOF fADC250 Quality Factor;Quality Factor", 128, 0, 128, NTOF_channels, 0, NTOF_channels);
546 tof_num_events =
new TH1I(
"tof_num_events",
"TOF number of events", 1, 0.0, 1.0);
553 gDirectory->mkdir(
"F1TDC")->cd();
555 f1tdc_unlocked =
new TH2I(
"f1tdc_unlocked",
"F1TDC hits unlocked; ROC id; slot", 100, 0.5, 100.5, 20, 0.5, 20.5);
556 f1tdc_bad_output_fifo =
new TH2I(
"f1tdc_bad_output_fifo",
"F1TDC bad output FIFO; ROC id; slot", 100, 0.5, 100.5, 20, 0.5, 20.5);
557 f1tdc_bad_hit_fifo =
new TH2I(
"f1tdc_bad_hit_fifo",
"F1TDC bad hit FIFO; ROC id; slot", 100, 0.5, 100.5, 20, 0.5, 20.5);
587 vector<const DBCALDigiHit*> bcaldigihits;
588 vector<const DBCALTDCDigiHit*> bcaltdcdigihits;
589 vector<const DCCALDigiHit*> ccaldigihits;
590 vector<const DCDCDigiHit*> cdcdigihits;
591 vector<const DFDCCathodeDigiHit*> fdccathodehits;
592 vector<const DFDCWireDigiHit*> fdcwirehits;
593 vector<const DFCALDigiHit*> fcaldigihits;
594 vector<const DPSCDigiHit*> pscdigihits;
595 vector<const DPSCTDCDigiHit*> psctdcdigihits;
596 vector<const DPSDigiHit*> psdigihits;
597 vector<const DTOFDigiHit*> tofdigihits;
598 vector<const DTOFTDCDigiHit*> toftdcdigihits;
599 vector<const DSCDigiHit*> scdigihits;
600 vector<const DRFTDCDigiTime*> rfdigihits;
601 vector<const DSCTDCDigiHit*> sctdcdigihits;
602 vector<const DTAGMDigiHit*> tagmdigihits;
603 vector<const DTAGMTDCDigiHit*> tagmtdcdigihits;
604 vector<const DTAGHDigiHit*> taghdigihits;
605 vector<const DTAGHTDCDigiHit*> taghtdcdigihits;
606 vector<const DTPOLSectorDigiHit*> tpoldigihits;
607 vector<const DF1TDCHit*> f1tdchits;
611 loop->GetSingle(locTrigger);
617 loop->Get(bcaldigihits);
618 loop->Get(bcaltdcdigihits);
619 loop->Get(ccaldigihits);
620 loop->Get(cdcdigihits);
621 loop->Get(fdccathodehits);
622 loop->Get(fdcwirehits);
623 loop->Get(fcaldigihits);
624 loop->Get(pscdigihits);
625 loop->Get(psctdcdigihits);
626 loop->Get(psdigihits);
627 loop->Get(tofdigihits);
628 loop->Get(toftdcdigihits);
629 loop->Get(scdigihits);
630 loop->Get(rfdigihits);
631 loop->Get(sctdcdigihits);
632 loop->Get(tagmdigihits);
633 loop->Get(tagmtdcdigihits);
634 loop->Get(taghdigihits);
635 loop->Get(taghtdcdigihits);
636 loop->Get(tpoldigihits);
637 loop->Get(f1tdchits);
639 vector< const DFCALGeometry* > geomVec;
640 loop->Get( geomVec );
644 loop->GetSingle(locTTabUtilities);
649 japp->RootFillLock(
this);
651 if(ANALYZE_F250_DATA) {
654 map<int, vector<const Df250PulseData*> > bcalhitmap;
658 bcal_adc_multi->Fill(bcaldigihits.size());
659 bcal_tdc_multi->Fill(bcaltdcdigihits.size());
662 for(
unsigned int i = 0; i < bcaldigihits.size(); i++){
665 if(CHECK_EMULATED_DATA)
666 hit->GetSingle(pulse);
668 if(hit->
pulse_peak < F250_THRESHOLD)
continue;
673 bcal_adc_pedestal->Fill(hit->
pedestal);
678 bcal_adc_quality->Fill(hit->
QF);
681 if(CHECK_EMULATED_DATA) {
689 cout <<
"BCAL INTEGRAL: " << eventnumber <<
" " << pulse->
rocid <<
" " << pulse->
slot <<
" " << pulse->
channel << endl;
691 cout <<
"BCAL TIMING: " << eventnumber <<
" " << pulse->
rocid <<
" " << pulse->
slot <<
" " << pulse->
channel << endl;
696 bcalhitmap[ichan].push_back(pulse);
699 if(INDIVIDUAL_CHANNEL_DATA) {
708 bcal_adc_peak_chan->Fill(hit->
pulse_peak, ichan);
710 bcal_adc_time_chan->Fill(hit->
pulse_time, ichan);
711 bcal_adc_pedestal_chan->Fill(hit->
pedestal, ichan);
712 bcal_adc_quality_chan->Fill(hit->
QF, ichan);
730 for(
unsigned int i = 0; i < bcaltdcdigihits.size(); i++){
734 bcal_tdc_time->Fill(digihit->
time);
739 ccal_num_events->Fill(0.5);
740 ccal_adc_multi->Fill(ccaldigihits.size());
742 for(
size_t loc_i = 0; loc_i < ccaldigihits.size(); ++loc_i){
745 if(hit->
pulse_peak < F250_THRESHOLD)
continue;
750 ccal_adc_pedestal->Fill(hit->
pedestal);
755 map<int, vector<const Df250PulseData*> > fcalhitmap;
757 fcal_num_events->Fill(0.5);
758 fcal_adc_multi->Fill(fcaldigihits.size());
760 for(
size_t loc_i = 0; loc_i < fcaldigihits.size(); ++loc_i){
763 if(CHECK_EMULATED_DATA)
764 hit->GetSingle(pulse);
766 if(hit->
pulse_peak < F250_THRESHOLD)
continue;
771 fcal_adc_pedestal->Fill(hit->
pedestal);
776 fcal_adc_quality->Fill(hit->
QF);
779 if(CHECK_EMULATED_DATA) {
787 cout <<
"FCAL INTEGRAL: " << eventnumber <<
" " << pulse->
rocid <<
" " << pulse->
slot <<
" " << pulse->
channel << endl;
789 cout <<
"FCAL TIMING: " << eventnumber <<
" " << pulse->
rocid <<
" " << pulse->
slot <<
" " << pulse->
channel << endl;
792 fcalhitmap[ichan].push_back(pulse);
795 if(INDIVIDUAL_CHANNEL_DATA) {
800 fcal_adc_peak_chan->Fill(hit->
pulse_peak, ichan);
802 fcal_adc_time_chan->Fill(hit->
pulse_time, ichan);
803 fcal_adc_pedestal_chan->Fill(hit->
pedestal, ichan);
804 fcal_adc_quality_chan->Fill(hit->
QF, ichan);
827 psc_adc_multi->Fill(pscdigihits.size());
828 psc_tdc_multi->Fill(psctdcdigihits.size());
830 for(
unsigned int i=0; i < pscdigihits.size(); i++) {
834 if(CHECK_EMULATED_DATA)
835 hit->GetSingle(pulse);
837 if(hit->
pulse_peak < F250_THRESHOLD)
continue;
842 psc_adc_pedestal->Fill(hit->
pedestal);
847 psc_adc_quality->Fill(hit->
QF);
850 if(CHECK_EMULATED_DATA) {
858 cout <<
"PSC INTEGRAL: " << eventnumber <<
" " << pulse->
rocid <<
" " << pulse->
slot <<
" " << pulse->
channel << endl;
860 cout <<
"PSC TIMING: " << eventnumber <<
" " << pulse->
rocid <<
" " << pulse->
slot <<
" " << pulse->
channel << endl;
863 if(INDIVIDUAL_CHANNEL_DATA) {
868 psc_adc_peak_chan->Fill(hit->
pulse_peak, ichan);
870 psc_adc_time_chan->Fill(hit->
pulse_time, ichan);
871 psc_adc_pedestal_chan->Fill(hit->
pedestal, ichan);
872 psc_adc_quality_chan->Fill(hit->
QF, ichan);
877 for(
unsigned int i=0; i < psctdcdigihits.size(); i++) {
880 psc_tdc_time->Fill(t_tdc);
887 ps_adc_multi->Fill(psdigihits.size());
889 for(
unsigned int i=0; i < psdigihits.size(); i++) {
892 if(CHECK_EMULATED_DATA)
893 hit->GetSingle(pulse);
898 ps_adc_pedestal->Fill(hit->
pedestal);
903 ps_adc_quality->Fill(hit->
QF);
906 if(CHECK_EMULATED_DATA) {
914 cout <<
"PS INTEGRAL: " << eventnumber <<
" " << pulse->
rocid <<
" " << pulse->
slot <<
" " << pulse->
channel << endl;
916 cout <<
"PS TIMING: " << eventnumber <<
" " << pulse->
rocid <<
" " << pulse->
slot <<
" " << pulse->
channel << endl;
919 if(INDIVIDUAL_CHANNEL_DATA) {
920 int ichan = hit->
column-1 + 145*hit->
arm;
924 ps_adc_peak_chan->Fill(hit->
pulse_peak, ichan);
926 ps_adc_time_chan->Fill(hit->
pulse_time, ichan);
927 ps_adc_pedestal_chan->Fill(hit->
pedestal, ichan);
928 ps_adc_quality_chan->Fill(hit->
QF, ichan);
941 st_adc_multi->Fill(scdigihits.size());
942 st_tdc_multi->Fill(sctdcdigihits.size());
944 for(uint32_t i = 0; i < scdigihits.size(); i++) {
947 if(CHECK_EMULATED_DATA)
948 hit->GetSingle(pulse);
950 if(hit->
pulse_peak < F250_THRESHOLD)
continue;
955 st_adc_pedestal->Fill(hit->
pedestal);
960 st_adc_quality->Fill(hit->
QF);
963 if(CHECK_EMULATED_DATA) {
971 cout <<
"ST INTEGRAL: " << eventnumber <<
" " << pulse->
rocid <<
" " << pulse->
slot <<
" " << pulse->
channel << endl;
973 cout <<
"ST TIMING: " << eventnumber <<
" " << pulse->
rocid <<
" " << pulse->
slot <<
" " << pulse->
channel << endl;
976 if(INDIVIDUAL_CHANNEL_DATA) {
977 int ichan = hit->
sector-1;
981 st_adc_peak_chan->Fill(hit->
pulse_peak, ichan);
983 st_adc_time_chan->Fill(hit->
pulse_time, ichan);
984 st_adc_pedestal_chan->Fill(hit->
pedestal, ichan);
985 st_adc_quality_chan->Fill(hit->
QF, ichan);
989 for(uint32_t i = 0; i < sctdcdigihits.size(); i++) {
992 st_tdc_time->Fill(t_tdc);
996 tag_num_events->Fill(0.5);
997 tagh_adc_multi->Fill(taghdigihits.size());
998 tagh_tdc_multi->Fill(taghtdcdigihits.size());
1000 for(
unsigned int i=0; i < taghdigihits.size(); i++) {
1003 if(CHECK_EMULATED_DATA)
1004 hit->GetSingle(pulse);
1006 if(hit->
pulse_peak < F250_THRESHOLD)
continue;
1011 tagh_adc_pedestal->Fill(hit->
pedestal);
1016 tagh_adc_quality->Fill(hit->
QF);
1019 if(CHECK_EMULATED_DATA) {
1027 if(INDIVIDUAL_CHANNEL_DATA) {
1032 tagh_adc_peak_chan->Fill(hit->
pulse_peak, ichan);
1034 tagh_adc_time_chan->Fill(hit->
pulse_time, ichan);
1035 tagh_adc_pedestal_chan->Fill(hit->
pedestal, ichan);
1036 tagh_adc_quality_chan->Fill(hit->
QF, ichan);
1040 for(uint32_t i = 0; i < taghtdcdigihits.size(); i++) {
1043 tagh_tdc_time->Fill(t_tdc);
1048 tagm_adc_multi->Fill(tagmdigihits.size());
1049 tagm_tdc_multi->Fill(tagmtdcdigihits.size());
1051 for(uint32_t i=0; i< tagmdigihits.size(); i++) {
1053 if (hit->
row != 0)
continue;
1055 if(CHECK_EMULATED_DATA)
1056 hit->GetSingle(pulse);
1058 if(hit->
pulse_peak < F250_THRESHOLD)
continue;
1063 tagm_adc_pedestal->Fill(hit->
pedestal);
1068 tagm_adc_quality->Fill(hit->
QF);
1071 if(CHECK_EMULATED_DATA) {
1079 if(INDIVIDUAL_CHANNEL_DATA) {
1080 int ichan = hit->
column - 1;
1084 tagm_adc_peak_chan->Fill(hit->
pulse_peak, ichan);
1086 tagm_adc_time_chan->Fill(hit->
pulse_time, ichan);
1087 tagm_adc_pedestal_chan->Fill(hit->
pedestal, ichan);
1088 tagm_adc_quality_chan->Fill(hit->
QF, ichan);
1092 for(uint32_t i = 0; i < tagmtdcdigihits.size(); i++) {
1105 tof_adc_multi->Fill(tofdigihits.size());
1106 tof_tdc_multi->Fill(toftdcdigihits.size());
1109 for(uint32_t i=0; i<tofdigihits.size(); i++) {
1112 if(CHECK_EMULATED_DATA)
1113 hit->GetSingle(pulse);
1115 if(hit->
pulse_peak < F250_THRESHOLD)
continue;
1120 tof_adc_pedestal->Fill(hit->
pedestal);
1125 tof_adc_quality->Fill(hit->
QF);
1128 if(CHECK_EMULATED_DATA) {
1136 if(INDIVIDUAL_CHANNEL_DATA) {
1137 int ichan = 48*2*hit->
plane + 2.*(hit->
bar-1) + hit->
end;
1141 tof_adc_peak_chan->Fill(hit->
pulse_peak, ichan);
1143 tof_adc_time_chan->Fill(hit->
pulse_time, ichan);
1144 tof_adc_pedestal_chan->Fill(hit->
pedestal, ichan);
1145 tof_adc_quality_chan->Fill(hit->
QF, ichan);
1150 for(uint32_t i = 0; i < toftdcdigihits.size(); i++) {
1153 tof_tdc_time->Fill(t_tdc);
1158 if(ANALYZE_F125_DATA) {
1162 cdc_adc_multi->Fill(cdcdigihits.size());
1164 for(uint32_t i=0; i<cdcdigihits.size(); i++) {
1173 cdc_adc_pedestal->Fill(hit->
pedestal);
1177 cdc_adc_quality->Fill(hit->
QF);
1180 if(INDIVIDUAL_CHANNEL_DATA) {
1181 int ichan = Nstraws_integrated[hit->
ring] + hit->
straw;
1187 cdc_adc_time_chan->Fill(hit->
pulse_time, ichan);
1188 cdc_adc_pedestal_chan->Fill(hit->
pedestal, ichan);
1189 cdc_adc_quality_chan->Fill(hit->
QF, ichan);
1195 fdc_adc_multi->Fill(fdccathodehits.size());
1196 fdc_tdc_multi->Fill(fdcwirehits.size());
1198 for(
unsigned int i = 0; i < fdccathodehits.size(); i++){
1207 fdc_adc_pedestal->Fill(hit->
pedestal);
1211 fdc_adc_quality->Fill(hit->
QF);
1215 if(INDIVIDUAL_CHANNEL_DATA) {
1217 if (hit->
view == 3) ud = 0;
1224 fdc_adc_time_chan->Fill(hit->
pulse_time, ichan);
1225 fdc_adc_pedestal_chan->Fill(hit->
pedestal, ichan);
1226 fdc_adc_quality_chan->Fill(hit->
QF, ichan);
1231 for(uint32_t i=0; i<fdcwirehits.size(); i++){
1234 fdc_tdc_time->Fill(t_tdc);
1241 for(uint32_t i=0; i<f1tdchits.size(); i++){
1245 f1tdc_unlocked->Fill(tdchit->
rocid, tdchit->
slot);
1248 f1tdc_bad_output_fifo->Fill(tdchit->
rocid, tdchit->
slot);
1251 f1tdc_bad_hit_fifo->Fill(tdchit->
rocid, tdchit->
slot);
1255 japp->RootFillUnLock(
this);
uint32_t QF
Quality Factor from FPGA algorithms.
static TH1I * ps_num_events
jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber)
int counter_id
counter id 1-274
double Convert_DigiTimeToNs_F1TDC(const JObject *locTDCDigiHit) const
uint32_t pedestal
pedestal info used by FPGA (if any)
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
JEventProcessor_lowlevel_online()
uint32_t QF
Quality Factor from FPGA algorithms.
static const int NUM_ARMS
uint32_t pedestal
pedestal info used by FPGA (if any)
uint32_t pulse_peak
maximum sample in pulse
uint32_t pedestal
pedestal info used by FPGA (if any)
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
uint32_t nsamples_integral
number of samples used in integral
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
uint32_t QF
Quality Factor from FPGA algorithms.
uint32_t nsamples_pedestal
number of samples used in pedestal
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
double Convert_DigiTimeToNs_CAEN1290TDC(const JObject *locTDCDigiHit) const
uint32_t QF
Quality Factor from FPGA algorithms.
~JEventProcessor_lowlevel_online()
uint32_t nsamples_integral
number of samples used in integral
static TH1I * tof_num_events
uint32_t QF
Quality Factor from FPGA algorithms.
uint32_t nsamples_integral
number of samples used in integral
uint32_t Get_L1FrontPanelTriggerBits(void) const
uint32_t pedestal_emulated
Value calculated from raw data (if available)
jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber)
uint32_t pulse_peak
maximum sample in pulse
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
uint32_t pulse_peak
identified pulse height as returned by FPGA algorithm
uint32_t pedestal
pedestal info used by FPGA (if any)
uint32_t pedestal
pedestal info used by FPGA (if any)
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
uint32_t pedestal
pedestal info used by FPGA (if any)
uint32_t course_time_emulated
Value calculated from raw data (if available) - debug.
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
uint32_t nsamples_integral
number of samples used in integral
static const unsigned int kRowCount
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
uint32_t nsamples_integral
number of samples used in integral
uint32_t nsamples_integral
number of samples used in integral
bool f250pulsedata_sorter(const Df250PulseData *a, const Df250PulseData *b)
uint32_t pulse_peak
maximum sample in pulse
uint32_t fine_time_emulated
Value calculated from raw data (if available) - debug.
uint32_t nsamples_pedestal
number of samples used in pedestal
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
static TH1I * bcal_num_events
uint32_t pulse_peak_emulated
Value calculated from raw data (if available)
uint32_t integral_emulated
Value calculated from raw data (if available)
uint32_t pedestal
pedestal info used by FPGA (if any)
uint32_t nsamples_pedestal
number of samples used in pedestal
uint32_t QF
Quality Factor from FPGA algorithms.
uint32_t QF
Quality Factor from FPGA algorithms.
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
uint32_t nsamples_pedestal
number of samples used in pedestal
static const int NUM_COARSE_COLUMNS
static TH1I * st_num_events
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
uint32_t QF
Quality Factor from FPGA algorithms.
static TH1I * cdc_num_events
int channel(int row, int column) const
uint32_t pedestal
pedestal info used by FPGA (if any)
uint32_t QF
Quality Factor from FPGA algorithms.
uint32_t nsamples_pedestal
number of samples used in pedestal
uint32_t nsamples_pedestal
number of samples used in pedestal
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
uint32_t pulse_peak
maximum sample in pulse
uint32_t nsamples_pedestal
number of samples used in pedestal
uint32_t nsamples_integral
number of samples used in integral
uint32_t pulse_peak
maximum sample in pulse
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
uint32_t pedestal
pedestal info used by FPGA (if any)
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
uint32_t nsamples_pedestal
number of samples used in pedestal
uint32_t nsamples_integral
number of samples used in integral
uint32_t pulse_peak
maximum sample in pulse
uint32_t pedestal
pedestal info used by FPGA (if any)
uint32_t pulse_peak
maximum sample in pulse
uint32_t QF
Quality Factor from FPGA algorithms.
static const int NUM_FINE_COLUMNS
static const unsigned int kCounterCount
static TH1F * tagm_adc_time
static TH1F * tagm_tdc_time
uint32_t pedestal
pedestal info used by FPGA (if any)
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
uint32_t nsamples_integral
number of samples used in integral
uint32_t nsamples_pedestal
number of samples used in pedestal
uint32_t pulse_number
pulse number for this channel, this event starting from 0
uint32_t nsamples_pedestal
number of samples used in pedestal
uint32_t pulse_peak
maximum sample in pulse
uint32_t nsamples_integral
number of samples used in integral
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm