Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JEventProcessor_lowlevel_online.cc
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: JEventProcessor_lowlevel_online.cc
4 //
5 
6 #include <TMath.h>
7 
9 using namespace jana;
10 
11 #include <BCAL/DBCALDigiHit.h>
12 #include <BCAL/DBCALTDCDigiHit.h>
13 #include <CCAL/DCCALDigiHit.h>
14 #include <CDC/DCDCDigiHit.h>
15 #include <FDC/DFDCCathodeDigiHit.h>
16 #include <FDC/DFDCWireDigiHit.h>
17 #include <FCAL/DFCALDigiHit.h>
22 #include <TAGGER/DTAGHTDCDigiHit.h>
23 #include <TAGGER/DTAGHDigiHit.h>
24 #include <TAGGER/DTAGHHit.h>
25 #include <TAGGER/DTAGHGeometry.h>
26 #include <TAGGER/DTAGMGeometry.h>
27 #include <TOF/DTOFDigiHit.h>
28 #include <TOF/DTOFTDCDigiHit.h>
30 #include <TPOL/DTPOLHit_factory.h>
31 #include <RF/DRFTDCDigiTime.h>
34 #include <TAGGER/DTAGMDigiHit.h>
35 #include <TAGGER/DTAGMTDCDigiHit.h>
36 #include "DAQ/DF1TDCHit.h"
37 
38 #include <FCAL/DFCALGeometry.h>
39 #include "TTAB/DTTabUtilities.h"
40 #include "TRIGGER/DTrigger.h"
41 
42 #include <map>
43 
44 // Routine used to create our JEventProcessor
45 #include <JANA/JApplication.h>
46 #include <JANA/JFactory.h>
47 extern "C"{
48  void InitPlugin(JApplication *app){
49  InitJANAPlugin(app);
50  app->AddProcessor(new JEventProcessor_lowlevel_online());
51  }
52 } // "C"
53 
54 
55 //------------------
56 // JEventProcessor_lowlevel_online (Constructor)
57 //------------------
59 {
60 
61 }
62 
63 //------------------
64 // ~JEventProcessor_lowlevel_online (Destructor)
65 //------------------
67 {
68 
69 }
70 
71 //------------------
72 // init
73 //------------------
75 {
76  // initialize variables
77  MORE_PLOTS = false;
78  INDIVIDUAL_CHANNEL_DATA = false;
79  CHECK_EMULATED_DATA = false;
80  ANALYZE_F250_DATA = true;
81  ANALYZE_F125_DATA = true;
82 
83  F250_THRESHOLD = 0;
84  F125_THRESHOLD = 0;
85 
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)");
93 
94  // Set a base directory
95  TDirectory *base = gDirectory;
96  TDirectory *maindir = gDirectory->mkdir("lowlevel_online");
97 
98  maindir->cd();
99 
100  //------------------------ BCAL -----------------------
101  if(ANALYZE_F250_DATA) {
102  maindir->cd();
103  //TDirectory *bcaldir = gDirectory->mkdir("BCAL");
104  gDirectory->mkdir("BCAL")->cd();
105 
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);
108 
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);
113 
114  bcal_tdc_time = new TH1I("bcal_tdc_time", "BCAL TDC Pulse Time;Time (ns)", 1000, -1000, 3000);
115 
116  if(MORE_PLOTS) {
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);
120  }
121 
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);
128  }
129 
130  if(INDIVIDUAL_CHANNEL_DATA) {
131  const int NBCAL_channels = 1536;
132 
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);
140  }
141  }
142 
143  // Set y-axis labels for individual channel plots
144  /*
145  for(int ibin = 1; ibin <= 16; ibin++)
146  {
147  int idy = ibin-1; // convenient to use index that starts from zero!
148  int layer = 1 + (idy%4);
149  int sector = 1 + idy/4;
150 
151  ostringstream ss;
152  ss << "D S" << sector << " L" << layer;
153  bcal_adc_occ->GetYaxis()->SetBinLabel(ibin, ss.str().c_str());
154 
155  ss.str("");
156  ss << "U S" << sector << " L" << layer;
157  bcal_adc_occ->GetYaxis()->SetBinLabel(ibin + 17, ss.str().c_str());
158  }
159  */
160 
161  bcal_num_events = new TH1I("bcal_num_events", "BCAL number of events", 1, 0.0, 1.0);
162 
163  //------------------------ CCAL -----------------------
164  if(ANALYZE_F250_DATA) {
165  maindir->cd();
166  gDirectory->mkdir("CCAL")->cd();
167 
168  ccal_adc_multi = new TH1I("ccal_adc_multi", "CCAL ADC Multiplicity", 250, 0, 250);
169 
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);
174 
175  ccal_num_events = new TH1I("ccal_num_events", "CCAL number of events", 1, 0.0, 1.0);
176  }
177 
178  //------------------------ CDC ------------------------
179  if(ANALYZE_F125_DATA) {
180  maindir->cd();
181  gDirectory->mkdir("CDC")->cd();
182 
183  // Save some geometry information
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] );
190 
191  const int Nstraws_total = Nstraws_integrated[27];
192 
193  cdc_adc_multi = new TH1I("cdc_adc_multi", "CDC ADC Multiplicity", 500, 0, 500);
194 
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);
198 
199  if(MORE_PLOTS) {
200  cdc_adc_integral_pedsub = new TH1I("cdc_adc_integral_pedsub", "CDC fADC125 Pulse Integral (Pedestal Subtracted);Integral (fADC counts)", 1000, 0, 20000); // check
201  cdc_adc_quality = new TH1I("cdc_adc_quality", "CDC fADC125 Quality Factor;Quality Factor", 40, 0, 40);
202  }
203 
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);
211  }
212 
213  cdc_num_events = new TH1I("cdc_num_events", "CDC number of events", 1, 0.0, 1.0);
214  }
215 
216  //------------------------ FCAL -----------------------
217  if(ANALYZE_F250_DATA) {
218  maindir->cd();
219  gDirectory->mkdir("FCAL")->cd();
220 
221  fcal_adc_multi = new TH1I("fcal_adc_multi", "FCAL ADC Multiplicity", 250, 0, 250);
222 
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);
227 
228  if(MORE_PLOTS) {
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);
232  }
233 
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);
240  }
241 
242  if(INDIVIDUAL_CHANNEL_DATA) {
243  const int NFCAL_blocks = 3600; // use the actual number...
244 
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);
252  }
253 
254  fcal_num_events = new TH1I("fcal_num_events", "FCAL number of events", 1, 0.0, 1.0);
255  }
256 
257 
258  //------------------------ FDC ------------------------
259  if(ANALYZE_F125_DATA) {
260  maindir->cd();
261  gDirectory->mkdir("FDC")->cd();
262 
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);
265 
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);
269 
270  //fdc_tdc_time = new TH1I("fdc_tdc_time", "FDC TDC Pulse Time;Time (ns)", 1000, -1000, 3000);
271  fdc_tdc_time = new TH1I("fdc_tdc_time", "FDC TDC Pulse Time;Time (ns)", 1000, -500, 9500);
272 
273  if(MORE_PLOTS) {
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);
276  }
277 
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);
286  }
287 
288  fdc_num_events = new TH1I("fdc_num_events", "FDC number of events", 1, 0.0, 1.0);
289  }
290 
291  //------------------------ PSC ---------------------
292  if(ANALYZE_F250_DATA) {
293  maindir->cd();
294  gDirectory->mkdir("PSC")->cd();
295 
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);
298 
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);
303 
304  psc_tdc_time = new TH1I("psc_tdc_time", "PSC TDC Pulse Time;Time (ns)", 1000, -1000, 3000);
305 
306  if(MORE_PLOTS) {
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);
310  }
311 
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);
318  }
319 
320  if(INDIVIDUAL_CHANNEL_DATA) {
321  const int NPSC_channels = DPSGeometry::NUM_ARMS*DPSGeometry::NUM_COARSE_COLUMNS;
322 
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);
330  }
331  }
332 
333  //------------------------ PS ---------------------
334  if(ANALYZE_F250_DATA) {
335  maindir->cd();
336  gDirectory->mkdir("PS")->cd();
337 
338  ps_adc_multi = new TH1I("ps_adc_multi", "PS ADC Multiplicity", 150, 0, 150);
339 
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);
344 
345  if(MORE_PLOTS) {
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);
349  }
350 
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);
357  }
358 
359  if(INDIVIDUAL_CHANNEL_DATA) {
360  const int NPS_channels = DPSGeometry::NUM_ARMS*DPSGeometry::NUM_FINE_COLUMNS;
361 
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);
369  }
370 
371  ps_num_events = new TH1I("ps_num_events", "PS number of events", 1, 0.0, 1.0);
372  }
373 
374  //------------------------ ST -------------------------
375  if(ANALYZE_F250_DATA) {
376  maindir->cd();
377  gDirectory->mkdir("ST")->cd();
378 
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);
381 
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);
386 
387  st_tdc_time = new TH1I("st_tdc_time", "ST TDC Pulse Time;Time (ns)", 1000, -1000, 4000);
388 
389  if(MORE_PLOTS) {
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);
393  }
394 
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);
401  }
402 
403  if(INDIVIDUAL_CHANNEL_DATA) {
404  const int NST_sectors = 30;
405 
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);
413  }
414 
415  st_num_events = new TH1I("st_num_events", "Start Counter number of events", 1, 0.0, 1.0);
416  }
417 
418  //------------------------ TAGH -----------------------
419  if(ANALYZE_F250_DATA) {
420  maindir->cd();
421  gDirectory->mkdir("TAGH")->cd();
422 
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);
425 
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);
430 
431  tagh_tdc_time = new TH1I("tagh_tdc_time", "TAGH TDC Pulse Time;Time (ns)", 1000, -1000, 3000);
432 
433  if(MORE_PLOTS) {
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);
437  }
438 
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);
445  }
446 
447  if(INDIVIDUAL_CHANNEL_DATA) {
448  const int NTAGH_slots = DTAGHGeometry::kCounterCount;
449 
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);
457  }
458 
459  tag_num_events = new TH1I("tag_num_events", "TAGGER number of events", 1, 0.0, 1.0);
460  }
461 
462  //------------------------ TAGM -----------------------
463  if(ANALYZE_F250_DATA) {
464  maindir->cd();
465  gDirectory->mkdir("TAGM")->cd();
466 
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);
469 
470  //const uint32_t NCOLUMNS = 102;
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);
475 
476  tagm_tdc_time = new TH1I("tagm_tdc_time", "TAGM TDC Pulse Time;Time (ns)", 1000, -1000, 5000);
477 
478  if(MORE_PLOTS) {
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);
482  }
483 
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);
490  }
491 
492  if(INDIVIDUAL_CHANNEL_DATA) {
493  const int NTAGM_rows = DTAGMGeometry::kRowCount;
494 
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);
502  }
503  }
504 
505  //------------------------ TOF ------------------------
506  if(ANALYZE_F250_DATA) {
507  maindir->cd();
508  gDirectory->mkdir("TOF")->cd();
509 
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);
512 
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);
517 
518  tof_tdc_time = new TH1I("tof_tdc_time", "TOF TDC Pulse Time;Time (ns)", 1000, -1000, 3000);
519 
520  if(MORE_PLOTS) {
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);
524  }
525 
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);
532  }
533 
534  if(INDIVIDUAL_CHANNEL_DATA) {
535  const int NTOF_channels = 176;
536 
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);
544  }
545 
546  tof_num_events = new TH1I("tof_num_events", "TOF number of events", 1, 0.0, 1.0);
547  }
548 
549 
550  //------------------------ F1TDC ------------------------
551 
552  maindir->cd();
553  gDirectory->mkdir("F1TDC")->cd();
554 
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);
558 
559  // back to base dir
560  base->cd();
561 
562  return NOERROR;
563 }
564 
565 //------------------
566 // brun
567 //------------------
568 jerror_t JEventProcessor_lowlevel_online::brun(JEventLoop *eventLoop, int32_t runnumber)
569 {
570  // This is called whenever the run number changes
571 
572 
573  return NOERROR;
574 }
575 
576 
577 // Sorting functions
579  return a->pulse_number < b->pulse_number;
580 }
581 
582 //------------------
583 // evnt
584 //------------------
585 jerror_t JEventProcessor_lowlevel_online::evnt(JEventLoop *loop, uint64_t eventnumber)
586 {
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;
608 
609  // ignore front panel triggers
610  const DTrigger* locTrigger = NULL;
611  loop->GetSingle(locTrigger);
612  if(locTrigger->Get_L1FrontPanelTriggerBits() != 0)
613  return NOERROR;
614 
615 
616  // Get hit data
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);
638 
639  vector< const DFCALGeometry* > geomVec;
640  loop->Get( geomVec );
641  const DFCALGeometry& fcalGeom = *(geomVec[0]);
642 
643  const DTTabUtilities* locTTabUtilities = nullptr;
644  loop->GetSingle(locTTabUtilities);
645 
646  // For now, just histogram fADC data and don't worry about TDCs
647  // The only extra information that TDCs have are time information
648  // Maybe we can fold that into calibrated hit monitoring
649  japp->RootFillLock(this); //ACQUIRE ROOT FILL LOCK
650 
651  if(ANALYZE_F250_DATA) {
652 
653  //------------------------ BCAL -----------------------
654  map<int, vector<const Df250PulseData*> > bcalhitmap;
655 
656  bcal_num_events->Fill(0.5);
657 
658  bcal_adc_multi->Fill(bcaldigihits.size());
659  bcal_tdc_multi->Fill(bcaltdcdigihits.size());
660 
661  // fADC250
662  for(unsigned int i = 0; i < bcaldigihits.size(); i++){
663  const DBCALDigiHit *hit = bcaldigihits[i];
664  const Df250PulseData *pulse = NULL;
665  if(CHECK_EMULATED_DATA)
666  hit->GetSingle(pulse);
667 
668  if(hit->pulse_peak < F250_THRESHOLD) continue;
669 
670  bcal_adc_integral->Fill(hit->pulse_integral);
671  bcal_adc_peak->Fill(hit->pulse_peak);
672  bcal_adc_time->Fill(hit->pulse_time);
673  bcal_adc_pedestal->Fill(hit->pedestal);
674 
675  if(MORE_PLOTS) {
676  bcal_adc_integral_pedsub->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal));
677  bcal_adc_peak_pedsub->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal);
678  bcal_adc_quality->Fill(hit->QF);
679  }
680 
681  if(CHECK_EMULATED_DATA) {
682  bcal_adc_emudelta_integral->Fill( pulse->integral - pulse->integral_emulated );
683  bcal_adc_emudelta_peak->Fill( pulse->pulse_peak - pulse->pulse_peak_emulated );
684  bcal_adc_emudelta_pedestal->Fill( pulse->pedestal - pulse->pedestal_emulated );
685  bcal_adc_emudelta_coarsetime->Fill( pulse->course_time - pulse->course_time_emulated );
686  bcal_adc_emudelta_finetime->Fill( pulse->fine_time - pulse->fine_time_emulated );
687 
688  if(pulse->integral != pulse->integral_emulated)
689  cout << "BCAL INTEGRAL: " << eventnumber << " " << pulse->rocid << " " << pulse->slot << " " << pulse->channel << endl;
690  if(pulse->course_time != pulse->course_time_emulated)
691  cout << "BCAL TIMING: " << eventnumber << " " << pulse->rocid << " " << pulse->slot << " " << pulse->channel << endl;
692 
693  int ichan = 48*(hit->module-1) - 4*(hit->sector-1) + hit->layer;
694  if(hit->end == DBCALGeometry::kUpstream)
695  ichan += 768;
696  bcalhitmap[ichan].push_back(pulse);
697  }
698 
699  if(INDIVIDUAL_CHANNEL_DATA) {
700  int ichan = 48*(hit->module-1) - 4*(hit->sector-1) + hit->layer;
701 
702  // plot all of the downstream channels, then the downstream ones
703  if(hit->end == DBCALGeometry::kUpstream)
704  ichan += 768;
705 
706  bcal_adc_integral_chan->Fill(hit->pulse_integral, ichan);
707  bcal_adc_integral_pedsub_chan->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal), ichan);
708  bcal_adc_peak_chan->Fill(hit->pulse_peak, ichan);
709  bcal_adc_peak_pedsub_chan->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal, 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);
713  }
714  }
715  /*
716  // check to see if we have problems with pulse timing (seen when running with NSAT=1)
717  for( map<int, vector<const Df250PulseData*> >::iterator vit = bcalhitmap.begin();
718  vit != bcalhitmap.end(); vit++) {
719  sort(vit->second.begin(), vit->second.end(), f250pulsedata_sorter);
720 
721  if(vit->second.size() < 2)
722  continue;
723 
724  for(unsigned int j=0; j<vit->second.size()-1; j++)
725  if( vit->second[j]->course_time > vit->second[j+1]->course_time )
726  cout << "BCAL: " << eventnumber << " " << vit->second[j]->rocid << " " << vit->second[j]->slot << " " << vit->second[j]->channel << endl;
727  }
728  */
729  // F1TDC
730  for(unsigned int i = 0; i < bcaltdcdigihits.size(); i++){
731  const DBCALTDCDigiHit *digihit = bcaltdcdigihits[i];
732  //double t_tdc = locTTabUtilities->Convert_DigiTimeToNs_F1TDC(digihit);
733  //bcal_tdc_time->Fill(t_tdc);
734  bcal_tdc_time->Fill(digihit->time);
735  }
736 
737  //------------------------ CCAL -----------------------
738 
739  ccal_num_events->Fill(0.5);
740  ccal_adc_multi->Fill(ccaldigihits.size());
741 
742  for(size_t loc_i = 0; loc_i < ccaldigihits.size(); ++loc_i){
743  const DCCALDigiHit *hit = ccaldigihits[loc_i];
744 
745  if(hit->pulse_peak < F250_THRESHOLD) continue;
746 
747  ccal_adc_integral->Fill(hit->pulse_integral);
748  ccal_adc_peak->Fill(hit->pulse_peak);
749  ccal_adc_time->Fill(hit->pulse_time);
750  ccal_adc_pedestal->Fill(hit->pedestal);
751  }
752 
753 
754  //------------------------ FCAL -----------------------
755  map<int, vector<const Df250PulseData*> > fcalhitmap;
756 
757  fcal_num_events->Fill(0.5);
758  fcal_adc_multi->Fill(fcaldigihits.size());
759 
760  for(size_t loc_i = 0; loc_i < fcaldigihits.size(); ++loc_i){
761  const DFCALDigiHit *hit = fcaldigihits[loc_i];
762  const Df250PulseData *pulse = NULL;
763  if(CHECK_EMULATED_DATA)
764  hit->GetSingle(pulse);
765 
766  if(hit->pulse_peak < F250_THRESHOLD) continue;
767 
768  fcal_adc_integral->Fill(hit->pulse_integral);
769  fcal_adc_peak->Fill(hit->pulse_peak);
770  fcal_adc_time->Fill(hit->pulse_time);
771  fcal_adc_pedestal->Fill(hit->pedestal);
772 
773  if(MORE_PLOTS) {
774  fcal_adc_integral_pedsub->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal));
775  fcal_adc_peak_pedsub->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal);
776  fcal_adc_quality->Fill(hit->QF);
777  }
778 
779  if(CHECK_EMULATED_DATA) {
780  fcal_adc_emudelta_integral->Fill( pulse->integral - pulse->integral_emulated );
781  fcal_adc_emudelta_peak->Fill( pulse->pulse_peak - pulse->pulse_peak_emulated );
782  fcal_adc_emudelta_pedestal->Fill( pulse->pedestal - pulse->pedestal_emulated );
783  fcal_adc_emudelta_coarsetime->Fill( pulse->course_time - pulse->course_time_emulated );
784  fcal_adc_emudelta_finetime->Fill( pulse->fine_time - pulse->fine_time_emulated );
785 
786  if( pulse->integral != pulse->integral_emulated )
787  cout << "FCAL INTEGRAL: " << eventnumber << " " << pulse->rocid << " " << pulse->slot << " " << pulse->channel << endl;
788  if( pulse->course_time != pulse->course_time_emulated )
789  cout << "FCAL TIMING: " << eventnumber << " " << pulse->rocid << " " << pulse->slot << " " << pulse->channel << endl;
790 
791  int ichan = fcalGeom.channel( hit->row, hit->column );
792  fcalhitmap[ichan].push_back(pulse);
793  }
794 
795  if(INDIVIDUAL_CHANNEL_DATA) {
796  int ichan = fcalGeom.channel( hit->row, hit->column );
797 
798  fcal_adc_integral_chan->Fill(hit->pulse_integral, ichan);
799  fcal_adc_integral_pedsub_chan->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal), ichan);
800  fcal_adc_peak_chan->Fill(hit->pulse_peak, ichan);
801  fcal_adc_peak_pedsub_chan->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal, 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);
805  }
806  }
807 
808  /*
809  // check to see if we have problems with pulse timing (seen when running with NSAT=1
810  for( map<int, vector<const Df250PulseData*> >::iterator vit = fcalhitmap.begin();
811  vit != fcalhitmap.end(); vit++) {
812  sort(vit->second.begin(), vit->second.end(), f250pulsedata_sorter);
813 
814  if(vit->second.size() < 2) continue;
815 
816  for(unsigned int j=0; j<vit->second.size()-1; j++)
817  if( vit->second[j]->course_time > vit->second[j+1]->course_time )
818  cout << "FCAL: " << eventnumber << " " << vit->second[j]->rocid << " " << vit->second[j]->slot << " " << vit->second[j]->channel << endl;
819  }
820  */
821  //for(unsigned int i = 0; i < fdcwirehits.size(); i++){
822  // fdc_wire_occ->Fill((fdcwirehits[i]->package - 1)*6 + fdcwirehits[i]->chamber, fdcwirehits[i]->wire);
823  //}
824 
825  //------------------------ PS/PSC ---------------------
826  ps_num_events->Fill(0.5);
827  psc_adc_multi->Fill(pscdigihits.size());
828  psc_tdc_multi->Fill(psctdcdigihits.size());
829 
830  for(unsigned int i=0; i < pscdigihits.size(); i++) {
831  //const int Nmods = 8;
832  const DPSCDigiHit *hit = pscdigihits[i];
833  const Df250PulseData *pulse = NULL;
834  if(CHECK_EMULATED_DATA)
835  hit->GetSingle(pulse);
836 
837  if(hit->pulse_peak < F250_THRESHOLD) continue;
838 
839  psc_adc_integral->Fill(hit->pulse_integral);
840  psc_adc_peak->Fill(hit->pulse_peak);
841  psc_adc_time->Fill(hit->pulse_time);
842  psc_adc_pedestal->Fill(hit->pedestal);
843 
844  if(MORE_PLOTS) {
845  psc_adc_integral_pedsub->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal));
846  psc_adc_peak_pedsub->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal);
847  psc_adc_quality->Fill(hit->QF);
848  }
849 
850  if(CHECK_EMULATED_DATA) {
851  psc_adc_emudelta_integral->Fill( pulse->integral - pulse->integral_emulated );
852  psc_adc_emudelta_peak->Fill( pulse->pulse_peak - pulse->pulse_peak_emulated );
853  psc_adc_emudelta_pedestal->Fill( pulse->pedestal - pulse->pedestal_emulated );
854  psc_adc_emudelta_coarsetime->Fill( pulse->course_time - pulse->course_time_emulated );
855  psc_adc_emudelta_finetime->Fill( pulse->fine_time - pulse->fine_time_emulated );
856 
857  if( pulse->integral != pulse->integral_emulated )
858  cout << "PSC INTEGRAL: " << eventnumber << " " << pulse->rocid << " " << pulse->slot << " " << pulse->channel << endl;
859  if( pulse->course_time != pulse->course_time_emulated )
860  cout << "PSC TIMING: " << eventnumber << " " << pulse->rocid << " " << pulse->slot << " " << pulse->channel << endl;
861  }
862 
863  if(INDIVIDUAL_CHANNEL_DATA) {
864  int ichan = hit->counter_id-1;
865 
866  psc_adc_integral_chan->Fill(hit->pulse_integral, ichan);
867  psc_adc_integral_pedsub_chan->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal), ichan);
868  psc_adc_peak_chan->Fill(hit->pulse_peak, ichan);
869  psc_adc_peak_pedsub_chan->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal, 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);
873  }
874 
875  }
876 
877  for(unsigned int i=0; i < psctdcdigihits.size(); i++) {
878  const DPSCTDCDigiHit *digihit = psctdcdigihits[i];
879  double t_tdc = locTTabUtilities->Convert_DigiTimeToNs_F1TDC(digihit);
880  psc_tdc_time->Fill(t_tdc);
881  // if( hit->counter_id <= Nmods )
882  // psc_tdc_left_occ->Fill(hit->counter_id);
883  // else
884  // psc_tdc_right_occ->Fill(hit->counter_id - Nmods);
885  }
886 
887  ps_adc_multi->Fill(psdigihits.size());
888 
889  for(unsigned int i=0; i < psdigihits.size(); i++) {
890  const DPSDigiHit *hit = psdigihits[i];
891  const Df250PulseData *pulse = NULL;
892  if(CHECK_EMULATED_DATA)
893  hit->GetSingle(pulse);
894 
895  ps_adc_integral->Fill(hit->pulse_integral);
896  ps_adc_peak->Fill(hit->pulse_peak);
897  ps_adc_time->Fill(hit->pulse_time);
898  ps_adc_pedestal->Fill(hit->pedestal);
899 
900  if(MORE_PLOTS) {
901  ps_adc_integral_pedsub->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal));
902  ps_adc_peak_pedsub->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal);
903  ps_adc_quality->Fill(hit->QF);
904  }
905 
906  if(CHECK_EMULATED_DATA) {
907  ps_adc_emudelta_integral->Fill( pulse->integral - pulse->integral_emulated );
908  ps_adc_emudelta_peak->Fill( pulse->pulse_peak - pulse->pulse_peak_emulated );
909  ps_adc_emudelta_pedestal->Fill( pulse->pedestal - pulse->pedestal_emulated );
910  ps_adc_emudelta_coarsetime->Fill( pulse->course_time - pulse->course_time_emulated );
911  ps_adc_emudelta_finetime->Fill( pulse->fine_time - pulse->fine_time_emulated );
912 
913  if( pulse->integral != pulse->integral_emulated )
914  cout << "PS INTEGRAL: " << eventnumber << " " << pulse->rocid << " " << pulse->slot << " " << pulse->channel << endl;
915  if( pulse->course_time != pulse->course_time_emulated )
916  cout << "PS TIMING: " << eventnumber << " " << pulse->rocid << " " << pulse->slot << " " << pulse->channel << endl;
917  }
918 
919  if(INDIVIDUAL_CHANNEL_DATA) {
920  int ichan = hit->column-1 + 145*hit->arm;
921 
922  ps_adc_integral_chan->Fill(hit->pulse_integral, ichan);
923  ps_adc_integral_pedsub_chan->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal), ichan);
924  ps_adc_peak_chan->Fill(hit->pulse_peak, ichan);
925  ps_adc_peak_pedsub_chan->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal, 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);
929  }
930  }
931 
932  //------------------------ RF -------------------------
933  //rf_num_events->Fill(0.5);
934  //for(size_t loc_i = 0; loc_i < rfdigihits.size(); ++loc_i){
935  // DetectorSystem_t locSystem = rfdigihits[loc_i]->dSystem;
936  // rf_occ->Fill(dRFBinValueMap[locSystem]);
937  //}
938 
939  //------------------------ ST -------------------------
940  st_num_events->Fill(0.5);
941  st_adc_multi->Fill(scdigihits.size());
942  st_tdc_multi->Fill(sctdcdigihits.size());
943 
944  for(uint32_t i = 0; i < scdigihits.size(); i++) {
945  const DSCDigiHit *hit = scdigihits[i];
946  const Df250PulseData *pulse = NULL;
947  if(CHECK_EMULATED_DATA)
948  hit->GetSingle(pulse);
949 
950  if(hit->pulse_peak < F250_THRESHOLD) continue;
951 
952  st_adc_integral->Fill(hit->pulse_integral);
953  st_adc_peak->Fill(hit->pulse_peak);
954  st_adc_time->Fill(hit->pulse_time);
955  st_adc_pedestal->Fill(hit->pedestal);
956 
957  if(MORE_PLOTS) {
958  st_adc_integral_pedsub->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal));
959  st_adc_peak_pedsub->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal);
960  st_adc_quality->Fill(hit->QF);
961  }
962 
963  if(CHECK_EMULATED_DATA) {
964  st_adc_emudelta_integral->Fill( pulse->integral - pulse->integral_emulated );
965  st_adc_emudelta_peak->Fill( pulse->pulse_peak - pulse->pulse_peak_emulated );
966  st_adc_emudelta_pedestal->Fill( pulse->pedestal - pulse->pedestal_emulated );
967  st_adc_emudelta_coarsetime->Fill( pulse->course_time - pulse->course_time_emulated );
968  st_adc_emudelta_finetime->Fill( pulse->fine_time - pulse->fine_time_emulated );
969 
970  if( pulse->integral != pulse->integral_emulated )
971  cout << "ST INTEGRAL: " << eventnumber << " " << pulse->rocid << " " << pulse->slot << " " << pulse->channel << endl;
972  if( pulse->course_time != pulse->course_time_emulated )
973  cout << "ST TIMING: " << eventnumber << " " << pulse->rocid << " " << pulse->slot << " " << pulse->channel << endl;
974  }
975 
976  if(INDIVIDUAL_CHANNEL_DATA) {
977  int ichan = hit->sector-1;
978 
979  st_adc_integral_chan->Fill(hit->pulse_integral, ichan);
980  st_adc_integral_pedsub_chan->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal), ichan);
981  st_adc_peak_chan->Fill(hit->pulse_peak, ichan);
982  st_adc_peak_pedsub_chan->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal, 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);
986  }
987  }
988 
989  for(uint32_t i = 0; i < sctdcdigihits.size(); i++) {
990  const DSCTDCDigiHit *digihit = sctdcdigihits[i];
991  double t_tdc = locTTabUtilities->Convert_DigiTimeToNs_F1TDC(digihit);
992  st_tdc_time->Fill(t_tdc);
993  }
994 
995  //------------------------ TAGH -----------------------
996  tag_num_events->Fill(0.5);
997  tagh_adc_multi->Fill(taghdigihits.size());
998  tagh_tdc_multi->Fill(taghtdcdigihits.size());
999 
1000  for(unsigned int i=0; i < taghdigihits.size(); i++) {
1001  const DTAGHDigiHit *hit = taghdigihits[i];
1002  const Df250PulseData *pulse = NULL;
1003  if(CHECK_EMULATED_DATA)
1004  hit->GetSingle(pulse);
1005 
1006  if(hit->pulse_peak < F250_THRESHOLD) continue;
1007 
1008  tagh_adc_integral->Fill(hit->pulse_integral);
1009  tagh_adc_peak->Fill(hit->pulse_peak);
1010  tagh_adc_time->Fill(hit->pulse_time);
1011  tagh_adc_pedestal->Fill(hit->pedestal);
1012 
1013  if(MORE_PLOTS) {
1014  tagh_adc_integral_pedsub->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal));
1015  tagh_adc_peak_pedsub->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal);
1016  tagh_adc_quality->Fill(hit->QF);
1017  }
1018 
1019  if(CHECK_EMULATED_DATA) {
1020  tagh_adc_emudelta_integral->Fill( pulse->integral - pulse->integral_emulated );
1021  tagh_adc_emudelta_peak->Fill( pulse->pulse_peak - pulse->pulse_peak_emulated );
1022  tagh_adc_emudelta_pedestal->Fill( pulse->pedestal - pulse->pedestal_emulated );
1023  tagh_adc_emudelta_coarsetime->Fill( pulse->course_time - pulse->course_time_emulated );
1024  tagh_adc_emudelta_finetime->Fill( pulse->fine_time - pulse->fine_time_emulated );
1025  }
1026 
1027  if(INDIVIDUAL_CHANNEL_DATA) {
1028  int ichan = hit->counter_id-1;
1029 
1030  tagh_adc_integral_chan->Fill(hit->pulse_integral, ichan);
1031  tagh_adc_integral_pedsub_chan->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal), ichan);
1032  tagh_adc_peak_chan->Fill(hit->pulse_peak, ichan);
1033  tagh_adc_peak_pedsub_chan->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal, 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);
1037  }
1038  }
1039 
1040  for(uint32_t i = 0; i < taghtdcdigihits.size(); i++) {
1041  const DTAGHTDCDigiHit *digihit = taghtdcdigihits[i];
1042  double t_tdc = locTTabUtilities->Convert_DigiTimeToNs_F1TDC(digihit);
1043  tagh_tdc_time->Fill(t_tdc);
1044  }
1045 
1046 
1047  //------------------------ TAGM -----------------------
1048  tagm_adc_multi->Fill(tagmdigihits.size());
1049  tagm_tdc_multi->Fill(tagmtdcdigihits.size());
1050 
1051  for(uint32_t i=0; i< tagmdigihits.size(); i++) {
1052  const DTAGMDigiHit *hit = tagmdigihits[i];
1053  if (hit->row != 0) continue; // ignore individually read out columns
1054  const Df250PulseData *pulse = NULL;
1055  if(CHECK_EMULATED_DATA)
1056  hit->GetSingle(pulse);
1057 
1058  if(hit->pulse_peak < F250_THRESHOLD) continue;
1059 
1060  tagm_adc_integral->Fill(hit->pulse_integral);
1061  tagm_adc_peak->Fill(hit->pulse_peak);
1062  tagm_adc_time->Fill(hit->pulse_time);
1063  tagm_adc_pedestal->Fill(hit->pedestal);
1064 
1065  if(MORE_PLOTS) {
1066  tagm_adc_integral_pedsub->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal));
1067  tagm_adc_peak_pedsub->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal);
1068  tagm_adc_quality->Fill(hit->QF);
1069  }
1070 
1071  if(CHECK_EMULATED_DATA) {
1072  tagm_adc_emudelta_integral->Fill( pulse->integral - pulse->integral_emulated );
1073  tagm_adc_emudelta_peak->Fill( pulse->pulse_peak - pulse->pulse_peak_emulated );
1074  tagm_adc_emudelta_pedestal->Fill( pulse->pedestal - pulse->pedestal_emulated );
1075  tagm_adc_emudelta_coarsetime->Fill( pulse->course_time - pulse->course_time_emulated );
1076  tagm_adc_emudelta_finetime->Fill( pulse->fine_time - pulse->fine_time_emulated );
1077  }
1078 
1079  if(INDIVIDUAL_CHANNEL_DATA) {
1080  int ichan = hit->column - 1;
1081 
1082  tagm_adc_integral_chan->Fill(hit->pulse_integral, ichan);
1083  tagm_adc_integral_pedsub_chan->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal), ichan);
1084  tagm_adc_peak_chan->Fill(hit->pulse_peak, ichan);
1085  tagm_adc_peak_pedsub_chan->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal, 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);
1089  }
1090  }
1091 
1092  for(uint32_t i = 0; i < tagmtdcdigihits.size(); i++) {
1093  const DTAGMTDCDigiHit *digihit = tagmtdcdigihits[i];
1094  double t_tdc = locTTabUtilities->Convert_DigiTimeToNs_F1TDC(digihit);
1095  tagm_tdc_time->Fill(t_tdc);
1096  }
1097 
1098 
1099  //------------------------ TPOL -----------------------
1100  //for(unsigned int i=0; i < tpoldigihits.size(); i++) tpol_occ->Fill(tpoldigihits[i]->sector);
1101  // not sure what to put here yet
1102 
1103  //------------------------ TOF ------------------------
1104  tof_num_events->Fill(0.5);
1105  tof_adc_multi->Fill(tofdigihits.size());
1106  tof_tdc_multi->Fill(toftdcdigihits.size());
1107 
1108  // fADC Hits
1109  for(uint32_t i=0; i<tofdigihits.size(); i++) {
1110  const DTOFDigiHit *hit = tofdigihits[i];
1111  const Df250PulseData *pulse = NULL;
1112  if(CHECK_EMULATED_DATA)
1113  hit->GetSingle(pulse);
1114 
1115  if(hit->pulse_peak < F250_THRESHOLD) continue;
1116 
1117  tof_adc_integral->Fill(hit->pulse_integral);
1118  tof_adc_peak->Fill(hit->pulse_peak);
1119  tof_adc_time->Fill(hit->pulse_time);
1120  tof_adc_pedestal->Fill(hit->pedestal);
1121 
1122  if(MORE_PLOTS) {
1123  tof_adc_integral_pedsub->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal));
1124  tof_adc_peak_pedsub->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal);
1125  tof_adc_quality->Fill(hit->QF);
1126  }
1127 
1128  if(CHECK_EMULATED_DATA) {
1129  tof_adc_emudelta_integral->Fill( pulse->integral - pulse->integral_emulated );
1130  tof_adc_emudelta_peak->Fill( pulse->pulse_peak - pulse->pulse_peak_emulated );
1131  tof_adc_emudelta_pedestal->Fill( pulse->pedestal - pulse->pedestal_emulated );
1132  tof_adc_emudelta_coarsetime->Fill( pulse->course_time - pulse->course_time_emulated );
1133  tof_adc_emudelta_finetime->Fill( pulse->fine_time - pulse->fine_time_emulated );
1134  }
1135 
1136  if(INDIVIDUAL_CHANNEL_DATA) {
1137  int ichan = 48*2*hit->plane + 2.*(hit->bar-1) + hit->end;
1138 
1139  tof_adc_integral_chan->Fill(hit->pulse_integral, ichan);
1140  tof_adc_integral_pedsub_chan->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal), ichan);
1141  tof_adc_peak_chan->Fill(hit->pulse_peak, ichan);
1142  tof_adc_peak_pedsub_chan->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal, 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);
1146  }
1147 
1148  }
1149 
1150  for(uint32_t i = 0; i < toftdcdigihits.size(); i++) {
1151  const DTOFTDCDigiHit *digihit = toftdcdigihits[i];
1152  double t_tdc = locTTabUtilities->Convert_DigiTimeToNs_CAEN1290TDC(digihit);
1153  tof_tdc_time->Fill(t_tdc);
1154  }
1155  }
1156 
1157 
1158  if(ANALYZE_F125_DATA) {
1159 
1160  //------------------------ CDC ------------------------
1161  cdc_num_events->Fill(0.5);
1162  cdc_adc_multi->Fill(cdcdigihits.size());
1163 
1164  for(uint32_t i=0; i<cdcdigihits.size(); i++) {
1165  const DCDCDigiHit *hit = cdcdigihits[i];
1166 
1167  //if(hit->pulse_peak < F125_THRESHOLD) continue;
1168 
1169  cdc_adc_integral->Fill(hit->pulse_integral);
1170  //cdc_adc_peak->Fill(hit->pulse_peak);
1171  //cdc_adc_peak_pedsub->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal);
1172  cdc_adc_time->Fill(hit->pulse_time);
1173  cdc_adc_pedestal->Fill(hit->pedestal);
1174 
1175  if(MORE_PLOTS) {
1176  cdc_adc_integral_pedsub->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal));
1177  cdc_adc_quality->Fill(hit->QF);
1178  }
1179 
1180  if(INDIVIDUAL_CHANNEL_DATA) {
1181  int ichan = Nstraws_integrated[hit->ring] + hit->straw;
1182 
1183  cdc_adc_integral_chan->Fill(hit->pulse_integral, ichan);
1184  cdc_adc_integral_pedsub_chan->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal), ichan);
1185  //cdc_adc_peak_chan->Fill(hit->pulse_peak, ichan);
1186  //cdc_adc_peak_pedsub_chan->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal, ichan);
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);
1190  }
1191  }
1192 
1193  //------------------------ FDC ------------------------
1194  fdc_num_events->Fill(0.5);
1195  fdc_adc_multi->Fill(fdccathodehits.size());
1196  fdc_tdc_multi->Fill(fdcwirehits.size());
1197 
1198  for(unsigned int i = 0; i < fdccathodehits.size(); i++){
1199  const DFDCCathodeDigiHit *hit = fdccathodehits[i];
1200 
1201  //if(hit->pulse_peak < F125_THRESHOLD) continue;
1202 
1203  fdc_adc_integral->Fill(hit->pulse_integral);
1204  //fdc_adc_peak->Fill(hit->pulse_peak);
1205  //fdc_adc_peak_pedsub->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal);
1206  fdc_adc_time->Fill(hit->pulse_time);
1207  fdc_adc_pedestal->Fill(hit->pedestal);
1208 
1209  if(MORE_PLOTS) {
1210  fdc_adc_integral_pedsub->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal));
1211  fdc_adc_quality->Fill(hit->QF);
1212  }
1213 
1214  // fix this
1215  if(INDIVIDUAL_CHANNEL_DATA) {
1216  int ud = -1;
1217  if (hit->view == 3) ud = 0;
1218  int ichan = (hit->strip - 1) + 192*(2.*hit->chamber+ud) + 192*6*4*(hit->package-1);
1219 
1220  fdc_adc_integral_chan->Fill(hit->pulse_integral, ichan);
1221  fdc_adc_integral_pedsub_chan->Fill(hit->pulse_integral - hit->pedestal*(hit->nsamples_integral/hit->nsamples_pedestal), ichan);
1222  //fdc_adc_peak_chan->Fill(hit->pulse_peak, ichan);
1223  //fdc_adc_peak_pedsub_chan->Fill(hit->pulse_peak - hit->pedestal/hit->nsamples_pedestal, ichan);
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);
1227  }
1228  }
1229 
1230  // TDC Hits
1231  for(uint32_t i=0; i<fdcwirehits.size(); i++){
1232  const DFDCWireDigiHit *digihit = fdcwirehits[i];
1233  double t_tdc = locTTabUtilities->Convert_DigiTimeToNs_F1TDC(digihit);
1234  fdc_tdc_time->Fill(t_tdc);
1235  }
1236  }
1237 
1238 
1239  //------------------------ FDC ------------------------
1240  // first try, just keeping track of problems
1241  for(uint32_t i=0; i<f1tdchits.size(); i++){
1242  const DF1TDCHit *tdchit = f1tdchits[i];
1243 
1244  if(!tdchit->res_status) {
1245  f1tdc_unlocked->Fill(tdchit->rocid, tdchit->slot);
1246  }
1247  if(!tdchit->res_status) {
1248  f1tdc_bad_output_fifo->Fill(tdchit->rocid, tdchit->slot);
1249  }
1250  if(!tdchit->res_status) {
1251  f1tdc_bad_hit_fifo->Fill(tdchit->rocid, tdchit->slot);
1252  }
1253  }
1254 
1255  japp->RootFillUnLock(this); //RELEASE ROOT FILL LOCK
1256 
1257 
1258  return NOERROR;
1259 }
1260 
1261 //------------------
1262 // erun
1263 //------------------
1265 {
1266  // This is called whenever the run number changes, before it is
1267  // changed to give you a chance to clean up before processing
1268  // events from the next run number.
1269  return NOERROR;
1270 }
1271 
1272 //------------------
1273 // fini
1274 //------------------
1276 {
1277  // Called before program exit after event processing is finished.
1278  return NOERROR;
1279 }
1280 
1281 
1282 // LocalWords: FCAL
uint32_t QF
Quality Factor from FPGA algorithms.
Definition: DFCALDigiHit.h:23
static TH1I * ps_num_events
jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber)
int counter_id
counter id 1-274
Definition: DTAGHDigiHit.h:18
TH1I * fdc_num_events
Definition: FDC_occupancy.C:30
double Convert_DigiTimeToNs_F1TDC(const JObject *locTDCDigiHit) const
uint32_t pedestal
pedestal info used by FPGA (if any)
Definition: DSCDigiHit.h:21
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
Definition: DPSDigiHit.h:21
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
Definition: DTAGMDigiHit.h:21
uint32_t QF
Quality Factor from FPGA algorithms.
Definition: DPSCDigiHit.h:22
static const int NUM_ARMS
Definition: DPSGeometry.h:22
uint32_t fine_time
bool res_status
Definition: DF1TDCHit.h:31
uint32_t pedestal
pedestal info used by FPGA (if any)
Definition: DTOFDigiHit.h:23
uint32_t pulse_peak
maximum sample in pulse
Definition: DFCALDigiHit.h:26
uint32_t pedestal
pedestal info used by FPGA (if any)
Definition: DPSDigiHit.h:23
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
Definition: DPSCDigiHit.h:19
uint32_t nsamples_integral
number of samples used in integral
Definition: DFCALDigiHit.h:24
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
Definition: DCCALDigiHit.h:20
uint32_t QF
Quality Factor from FPGA algorithms.
Definition: DSCDigiHit.h:22
uint32_t nsamples_pedestal
number of samples used in pedestal
Definition: DPSCDigiHit.h:24
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.
uint32_t nsamples_integral
number of samples used in integral
Definition: DTOFDigiHit.h:25
static TH1I * tof_num_events
uint32_t QF
Quality Factor from FPGA algorithms.
Definition: DTAGHDigiHit.h:22
uint32_t nsamples_integral
number of samples used in integral
Definition: DBCALDigiHit.h:34
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
Definition: DPSDigiHit.h:27
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
Definition: DSCDigiHit.h:19
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
Definition: DFCALDigiHit.h:21
JApplication * japp
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
Definition: DCDCDigiHit.h:22
DBCALGeometry::End end
Definition: DBCALDigiHit.h:28
uint32_t pulse_peak
identified pulse height as returned by FPGA algorithm
Definition: DBCALDigiHit.h:30
uint32_t pedestal
pedestal info used by FPGA (if any)
Definition: DCCALDigiHit.h:22
uint32_t pedestal
pedestal info used by FPGA (if any)
Definition: DFCALDigiHit.h:22
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
Definition: DBCALDigiHit.h:29
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
Definition: DTAGHDigiHit.h:19
uint32_t nsamples_integral
number of samples used in integral
Definition: DCDCDigiHit.h:25
static const unsigned int kRowCount
Definition: DTAGMGeometry.h:30
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
Definition: DTAGHDigiHit.h:20
uint32_t integral
uint32_t nsamples_integral
number of samples used in integral
Definition: DPSCDigiHit.h:23
uint32_t nsamples_integral
number of samples used in integral
Definition: DSCDigiHit.h:23
InitPlugin_t InitPlugin
bool f250pulsedata_sorter(const Df250PulseData *a, const Df250PulseData *b)
uint32_t pulse_peak
maximum sample in pulse
Definition: DTAGMDigiHit.h:26
uint32_t pedestal
uint32_t fine_time_emulated
Value calculated from raw data (if available) - debug.
uint32_t nsamples_pedestal
number of samples used in pedestal
Definition: DBCALDigiHit.h:35
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
Definition: DCDCDigiHit.h:21
DPSGeometry::Arm arm
Definition: DPSDigiHit.h:19
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)
Definition: DTAGMDigiHit.h:22
uint32_t nsamples_pedestal
number of samples used in pedestal
Definition: DTOFDigiHit.h:26
uint32_t QF
Quality Factor from FPGA algorithms.
Definition: DBCALDigiHit.h:33
uint32_t QF
Quality Factor from FPGA algorithms.
Definition: DTAGMDigiHit.h:23
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
Definition: DFCALDigiHit.h:20
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
Definition: DTAGMDigiHit.h:20
uint32_t nsamples_pedestal
number of samples used in pedestal
Definition: DFCALDigiHit.h:25
static const int NUM_COARSE_COLUMNS
Definition: DPSGeometry.h:25
int sector
Definition: DSCDigiHit.h:18
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
Definition: DPSCDigiHit.h:20
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
Definition: DSCDigiHit.h:20
uint32_t QF
Quality Factor from FPGA algorithms.
Definition: DCDCDigiHit.h:24
static TH1I * cdc_num_events
int channel(int row, int column) const
uint32_t pedestal
pedestal info used by FPGA (if any)
Definition: DBCALDigiHit.h:32
uint32_t QF
Quality Factor from FPGA algorithms.
Definition: DPSDigiHit.h:24
uint32_t nsamples_pedestal
number of samples used in pedestal
Definition: DSCDigiHit.h:24
uint32_t channel
Definition: DDAQAddress.h:34
int column
Definition: DPSDigiHit.h:20
uint32_t pulse_peak
uint32_t nsamples_pedestal
number of samples used in pedestal
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
Definition: DPSDigiHit.h:22
uint32_t pulse_peak
maximum sample in pulse
Definition: DSCDigiHit.h:25
uint32_t nsamples_pedestal
number of samples used in pedestal
Definition: DPSDigiHit.h:26
uint32_t nsamples_integral
number of samples used in integral
uint32_t rocid
Definition: DDAQAddress.h:32
uint32_t pulse_peak
maximum sample in pulse
Definition: DPSCDigiHit.h:25
uint32_t course_time
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
Definition: DBCALDigiHit.h:31
uint32_t pedestal
pedestal info used by FPGA (if any)
Definition: DTAGHDigiHit.h:21
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
Definition: DTOFDigiHit.h:22
uint32_t nsamples_pedestal
number of samples used in pedestal
Definition: DCDCDigiHit.h:26
uint32_t nsamples_integral
number of samples used in integral
Definition: DTAGMDigiHit.h:24
uint32_t pulse_peak
maximum sample in pulse
Definition: DCCALDigiHit.h:26
uint32_t pedestal
pedestal info used by FPGA (if any)
Definition: DPSCDigiHit.h:21
uint32_t pulse_peak
maximum sample in pulse
Definition: DTOFDigiHit.h:27
uint32_t QF
Quality Factor from FPGA algorithms.
Definition: DTOFDigiHit.h:24
int counter_id
Definition: DPSCDigiHit.h:18
static const int NUM_FINE_COLUMNS
Definition: DPSGeometry.h:26
static const unsigned int kCounterCount
Definition: DTAGHGeometry.h:28
static TH1F * tagm_adc_time
static TH1F * tagm_tdc_time
uint32_t pedestal
pedestal info used by FPGA (if any)
Definition: DCDCDigiHit.h:23
uint32_t pulse_time
identified pulse time as returned by FPGA algorithm
Definition: DCCALDigiHit.h:21
uint32_t nsamples_integral
number of samples used in integral
Definition: DPSDigiHit.h:25
uint32_t nsamples_pedestal
number of samples used in pedestal
Definition: DTAGHDigiHit.h:24
uint32_t pulse_number
pulse number for this channel, this event starting from 0
uint32_t nsamples_pedestal
number of samples used in pedestal
Definition: DTAGMDigiHit.h:25
uint32_t slot
Definition: DDAQAddress.h:33
uint32_t pulse_peak
maximum sample in pulse
Definition: DTAGHDigiHit.h:25
uint32_t nsamples_integral
number of samples used in integral
Definition: DTAGHDigiHit.h:23
uint32_t pulse_integral
identified pulse integral as returned by FPGA algorithm
Definition: DTOFDigiHit.h:21