Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JEventProcessor_DIRC_online.cc
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: JEventProcessor_DIRC_online.cc
4 
5 
6 #include <stdint.h>
7 #include <vector>
8 
10 #include <JANA/JApplication.h>
11 
12 using namespace std;
13 using namespace jana;
14 
15 #include "TTAB/DTTabUtilities.h"
16 #include <DAQ/DDIRCTDCHit.h>
17 #include <DIRC/DDIRCTDCDigiHit.h>
18 #include <DIRC/DDIRCPmtHit.h>
19 #include <DIRC/DDIRCLEDRef.h>
20 #include <DAQ/DDIRCTriggerTime.h>
21 #include <DAQ/Df250PulseData.h>
22 #include <TRIGGER/DL1Trigger.h>
23 
24 #include <TDirectory.h>
25 #include <TH1.h>
26 #include <TH2.h>
27 #include <TProfile.h>
28 
29 const int Nboxes = 2;
30 const int Nchannels = 108*64;
31 const int Npixelrows = 48;
32 const int Npixelcolumns = 144;
33 
34 const int NmultBins = 50;
35 const int Nmult = 500;
36 const int NmultDigi = 1000;
37 
38 // Hit pointers
39 static TH1I *dirc_num_events;
40 static TH1I *hLEDRefAdcTime;
41 static TH1I *hLEDRefTdcTime;
42 static TH1I *hLEDRefIntegral;
43 static TH2I *hLEDRefAdcVsTdcTime;
48 static TH1I *hRefTime;
49 static TH1I *hHit_NHits[2];
50 static TH1I *hHit_Box[2];
51 static TH2I *hHit_NHitsVsBox[2];
52 static TH1I *hHit_TimeOverThreshold[Nboxes][2];
54 static TH1I *hHit_tdcTime[Nboxes][2];
55 static TH2I *hHit_tdcTimeVsEvent[Nboxes][2];
56 static TH2I *hHit_tdcTimeVsChannel[Nboxes][2];
57 static TH2I *hHit_pixelOccupancy[Nboxes][2];
60 
61 // DigiHit pointers
62 static TH1I *hDigiHit_NtdcHits[2];
63 static TH1I *hDigiHit_Box[2];
64 static TH2I *hDigiHit_NtdcHitsVsBox[2];
65 static TH1I *hDigiHit_tdcTime[Nboxes][2];
68 
69 // LED specific histograms
73 
74 //----------------------------------------------------------------------------------
75 
76 // Routine used to create our JEventProcessor
77 extern "C"{
78  void InitPlugin(JApplication *app){
79  InitJANAPlugin(app);
80  app->AddProcessor(new JEventProcessor_DIRC_online());
81  }
82 }
83 
84 
85 //----------------------------------------------------------------------------------
86 
87 
89 }
90 
91 
92 //----------------------------------------------------------------------------------
93 
94 
96 }
97 
98 
99 //----------------------------------------------------------------------------------
100 
102 
103  // create root folder for psc and cd to it, store main dir
104  TDirectory *mainDir = gDirectory;
105  TDirectory *dircDir = gDirectory->mkdir("DIRC_online");
106  dircDir->cd();
107 
108  hLEDRefAdcTime = new TH1I("LEDRefAdcTime", "LED ADC reference SiPM time; time (ns)", 100, -20, 20);
109  hLEDRefTdcTime = new TH1I("LEDRefTdcTime", "LED TDC reference SiPM time; time (ns)", 100, -20, 20);
110  hLEDRefIntegral = new TH1I("LEDRefIntegral", "LED reference SiPM integral; integral (ADC)", 100, 1000, 1500);
111  hLEDRefAdcVsTdcTime = new TH2I("LEDRefAdcVsTdcTime", "LED ADC vs TDC reference SiPM time; TDC time (ns); ADC time (ns)", 100, -20, 20, 100, -20, 20);
112  hLEDRefTdcChannelTimeDiff = new TH1I("LEDRefTdcChannelTimeDiff", "PMT pixel hit - LED TDC reference SiPM time; PMT Channel - SiPM TDC time (ns)", 400, 110, 150);
113  hLEDRefTdcVsChannelTime = new TH2I("LEDRefTdcVsChannelTime", "LED TDC reference SiPM time vs PMT pixel hit time; PMT Channel time (ns); TDC time (ns)", 40, 110, 150, 100, -20, 20);
114  hLEDRefAdcVsChannelTime = new TH2I("LEDRefAdcVsChannelTime", "LED ADC reference SiPM time vs PMT pixel hit time; PMT Channel time (ns); ADC time (ns)", 40, 110, 150, 100, -20, 20);
115  hLEDRefIntegralVsTdcTime = new TH2I("LEDRefIntegralVsTdcTime", "LED TDC reference SiPM time; TDC time (ns); Pulse Integral", 100, -20, 20, 100, 1000, 1500);
116  hRefTime = new TH1I("RefTime", "Reference time from mean hit time; time (ns)", 500, 0, 100);
117 
118  // book hists
119  dirc_num_events = new TH1I("dirc_num_events","DIRC Number of events",1,0.5,1.5);
120  TDirectory *hitDir = gDirectory->mkdir("Hit"); hitDir->cd();
121 
122  TString trig_str[] = {"LED","NonLED"};
123  for (int j = 0; j < 2; j++) {
124  hHit_NHits[j] = new TH1I("Hit_NHits_"+trig_str[j],"DIRCPmtHit multiplicity " + trig_str[j] + "; hits; events",NmultBins,0.5,0.5+Nmult);
125  hHit_Box[j] = new TH1I("Hit_Box_"+trig_str[j],"DIRCPmtHit box" + trig_str[j] + "; box; hits",2,-0.5,-0.5+2);
126  hHit_NHitsVsBox[j] = new TH2I("Hit_NHitsVsBox_"+trig_str[j],"DIRCPmtHit multiplicity vs. box" + trig_str[j] + "; box; hits",2,-0.5,-0.5+2,NmultBins,0.5,0.5+Nmult);
127  }
128 
129  TString box_str[] = {"NorthUpper","SouthLower"};
130  for (int i = 0; i < Nboxes; i++) {
131  gDirectory->mkdir(box_str[i]+"Box")->cd();
132  for (int j = 0; j < 2; j++) {
133  TString strN = "_" + trig_str[j];
134  TString strT = ", " + box_str[i] + " box " + trig_str[j] + " trigger";
135  hHit_pixelOccupancy[i][j] = new TH2I("Hit_PixelOccupancy"+strN,"DIRCPmtHit pixel occupancy "+strT+"; pixel rows; pixel columns",Npixelcolumns,-0.5,-0.5+Npixelcolumns,Npixelrows,-0.5,-0.5+Npixelrows);
136  hHit_TimeOverThreshold[i][j] = new TH1I("Hit_TimeOverThreshold"+strN,"DIRCPmtHit time-over-threshold "+strT+"; time-over-threshold (ns); hits",100,0.0,100.);
137  hHit_TimeOverThresholdVsChannel[i][j] = new TH2I("Hit_TimeOverThresholdVsChannel"+strN,"DIRCPmtHit time-over-threshold vs channel "+strT+"; channel; time-over-threshold [ns]",Nchannels,-0.5,-0.5+Nchannels,100,0.0,100.);
138  hHit_tdcTime[i][j] = new TH1I("Hit_Time"+strN,"DIRCPmtHit time "+strT+";time [ns]; hits",500,0.0,500.0);
139  hHit_tdcTimeVsEvent[i][j] = new TH2I("Hit_TimeVsEvent"+strN,"DIRCPmtHit time "+strT+"; event #; time [ns]; hits",1000,0,100e6,500,0.0,500.0);
140  hHit_tdcTimeVsChannel[i][j] = new TH2I("Hit_TimeVsChannel"+strN,"DIRCPmtHit time vs. channel "+strT+"; channel;time [ns]",Nchannels,-0.5,-0.5+Nchannels,500,0.0,500.0);
141  }
142 
143  // LED specific histograms
144  hHit_tdcTimeDiffVsChannel[i] = new TH2I("Hit_LEDTimeDiffVsChannel","LED DIRCPmtHit time diff vs. channel; channel;time [ns]",Nchannels,-0.5,-0.5+Nchannels,100,-10.0,30.0);
145  hHit_tdcTimeDiffEvent[i] = new TH1I("Hit_LEDTimeDiffEvent","LED DIRCPmtHit time diff in event; #Delta t [ns]",200,-50,50);
146 
147  hHit_TimeEventMeanVsLEDRef[i] = new TH2I("Hit_TimeEventMeanVsLEDRef","LED Time Event Mean DIRCPmtHit time vs. LED Reference time; LED reference time [ns] ; LED pixel event mean time [ns]", 100, 100, 150, 400, -10, 30);
148  hHit_TimeDiffEventMeanLEDRefVsTimestamp[i] = new TH2I("Hit_TimeDiffeventMeanLEDRefVsTimestamp","LED Time Event Mean DIRCPmtHit time - LED reference time vs. event timestamp; event timestamp [ns?] ; time difference [ns]", 1000, 0, 1e10, 400, 100, 140);
149 
150  if(i==1) {
151  gDirectory->mkdir("Timewalk")->cd();
152  for(int j=0; j<Nchannels; j++) {
153  hHit_Timewalk[i][j] = new TH2I(Form("Hit_Timewalk_%d",j),Form("DIRCPmtHit channel %d: #Delta t vs time-over-threshold; time-over-threshold [ns]; #Delta t [ns]",j),100,0,100,100,-50.,50.);
154  }
155  }
156 
157  hitDir->cd();
158  }
159 
160  // DIRCTDC digihit-level hists
161  dircDir->cd();
162  TDirectory *digihitDir = gDirectory->mkdir("DigiHit"); digihitDir->cd();
163 
164  for (int j = 0; j < 2; j++) {
165  hDigiHit_NtdcHits[j] = new TH1I("DigiHit_NHits_"+trig_str[j],"DIRCTDCDigiHit multiplicity "+ trig_str[j] +";hits;events",NmultBins,0.5,0.5+NmultDigi);
166  hDigiHit_Box[j] = new TH1I("DigiHit_Box_"+trig_str[j],"DIRCTDCDigiHit box" + trig_str[j] + ";box;hits",Nboxes,-0.5,-0.5+Nboxes);
167  hDigiHit_NtdcHitsVsBox[j] = new TH2I("DigiHit_NHitsVsBox_"+trig_str[j],"DIRCTDCDigiHit multiplicity vs box" + trig_str[j] +";box;hits",Nboxes,-0.5,-0.5+Nboxes,NmultBins,0.5,0.5+NmultDigi);
168  }
169 
170  for (int i = 0; i < Nboxes; i++) {
171  gDirectory->mkdir(box_str[i]+"Box")->cd();
172  for (int j = 0; j < 2; j++) {
173  TString strN = "_" + trig_str[j];
174  TString strT = ", " + box_str[i] + " box " + trig_str[j] + " trigger";
175  hDigiHit_pixelOccupancy[i][j] = new TH2I("TDCDigiHit_PixelOccupancy"+strN,"DIRCTDCDigiHit pixel occupancy"+strT+"; pixel rows; pixel columns",Npixelcolumns,-0.5,-0.5+Npixelcolumns,Npixelrows,-0.5,-0.5+Npixelrows);
176  hDigiHit_tdcTime[i][j] = new TH1I("TDCDigiHit_Time"+strN,"DIRCTDCDigiHit time"+strT+";time [ns]; hits",500,0.0,500.0);
177  hDigiHit_tdcTimeVsChannel[i][j] = new TH2I("TDCDigiHit_TimeVsChannel"+strN,"DIRCTDCDigiHit time"+strT+"; channel; time [ns]",Nchannels,-0.5,-0.5+Nchannels,500,0.0,500.0);
178  }
179 
180  digihitDir->cd();
181  }
182  // back to main dir
183  mainDir->cd();
184 
185  return NOERROR;
186 }
187 
188 
189 //----------------------------------------------------------------------------------
190 
191 
192 jerror_t JEventProcessor_DIRC_online::brun(JEventLoop *eventLoop, int32_t runnumber) {
193  // This is called whenever the run number changes
194 
195  return NOERROR;
196 }
197 
198 
199 //----------------------------------------------------------------------------------
200 
201 
202 jerror_t JEventProcessor_DIRC_online::evnt(JEventLoop *eventLoop, uint64_t eventnumber) {
203  // This is called for every event. Use of common resources like writing
204  // to a file or filling a histogram should be mutex protected. Using
205  // loop-Get(...) to get reconstructed objects (and thereby activating the
206  // reconstruction algorithm) should be done outside of any mutex lock
207  // since multiple threads may call this method at the same time.
208 
209  vector<const DDIRCGeometry*> locDIRCGeometryVec;
210  eventLoop->Get(locDIRCGeometryVec);
211  auto locDIRCGeometry = locDIRCGeometryVec[0];
212 
213  // Get data for DIRC
214  vector<const DDIRCTDCDigiHit*> digihits;
215  eventLoop->Get(digihits);
216  vector<const DDIRCPmtHit*> hits;
217  eventLoop->Get(hits);
218  vector<const DDIRCTriggerTime*> timestamps;
219  eventLoop->Get(timestamps);
220 
221  const DTTabUtilities* locTTabUtilities = nullptr;
222  eventLoop->GetSingle(locTTabUtilities);
223 
224  // Get DCODAROCInfo for this ROC
225  vector<const DCODAROCInfo*> locCODAROCInfos;
226  eventLoop->Get(locCODAROCInfos);
227  uint64_t locReferenceClockTime = 0;
228  for (const auto& locCODAROCInfo : locCODAROCInfos) {
229  if(locCODAROCInfo->rocid == 92) {
230  locReferenceClockTime = locCODAROCInfo->timestamp;
231  }
232  }
233  //if(locReferenceClockTime%2 != 0)
234  // return NOERROR;
235 
236  // check for LED triggers
237  bool locDIRCLEDTrig = false;
238  bool locPhysicsTrig = false;
239  vector<const DL1Trigger*> trig;
240  eventLoop->Get(trig);
241  if (trig.size() > 0) {
242  // LED appears as "bit" 15 in L1 front panel trigger monitoring plots
243  if (trig[0]->fp_trig_mask & 0x4000){
244  locDIRCLEDTrig = true;
245  }
246  // Physics trigger appears as "bit" 1 in L1 trigger monitoring plots
247  if (trig[0]->trig_mask & 0x1){
248  locPhysicsTrig = true;
249  }
250  }
251  int loc_itrig = 1;
252  if(locDIRCLEDTrig) loc_itrig = 0;
253  else if(locPhysicsTrig) loc_itrig = 1;
254  else return NOERROR;
255 
256  // LED specific information
257  double locLEDRefTime = 0;
258  double locLEDRefAdcTime = 0;
259  double locLEDRefTdcTime = 0;
260  if(locDIRCLEDTrig) {
261 
262  // Get LED SiPM reference
263  //vector<const DCAEN1290TDCHit*> sipmtdchits;
264  //eventLoop->Get(sipmtdchits);
265  //vector<const Df250PulseData*> sipmadchits;
266  //eventLoop->Get(sipmadchits);
267 
268  vector<const DDIRCLEDRef*> dircLEDRefs;
269  eventLoop->Get(dircLEDRefs);
270  for(uint i=0; i<dircLEDRefs.size(); i++) {
271  const DDIRCLEDRef* dircLEDRef = (DDIRCLEDRef*)dircLEDRefs[i];
272  locLEDRefAdcTime = dircLEDRef->t_fADC;
273  locLEDRefTdcTime = dircLEDRef->t_TDC;
274  locLEDRefTime = dircLEDRef->t_TDC;
275 
276  japp->RootFillLock(this); //ACQUIRE ROOT FILL LOCK
277  hLEDRefAdcTime->Fill(locLEDRefAdcTime);
278  hLEDRefIntegral->Fill(dircLEDRef->integral);
279  hLEDRefTdcTime->Fill(locLEDRefTdcTime);
280  hLEDRefAdcVsTdcTime->Fill(locLEDRefTdcTime, locLEDRefAdcTime);
281  hLEDRefIntegralVsTdcTime->Fill(locLEDRefTdcTime, dircLEDRef->integral);
282  japp->RootFillUnLock(this); //ACQUIRE ROOT FILL LOCK
283  }
284  }
285 
286 /*
287  for(uint i=0; i<sipmadchits.size(); i++) {
288  const Df250PulseData* sipmadchit = (Df250PulseData*)sipmadchits[i];
289  if(sipmadchit->rocid == 77 && sipmadchit->slot == 16 && sipmadchit->channel == 15) {
290  locLEDRefAdcTime = (double)((sipmadchit->course_time<<6) + sipmadchit->fine_time);
291  locLEDRefAdcTime *= 0.0625; // convert time from flash to ns
292  japp->RootFillLock(this); //ACQUIRE ROOT FILL LOCK
293  hLEDRefAdcTime->Fill(locLEDRefAdcTime);
294  hLEDRefIntegral->Fill(sipmadchit->integral);
295  japp->RootFillUnLock(this); //ACQUIRE ROOT FILL LOCK
296  locLEDRefTime = locLEDRefAdcTime;
297  }
298  }
299 
300  for(uint i=0; i<sipmtdchits.size(); i++) {
301  const DCAEN1290TDCHit* sipmtdchit = (DCAEN1290TDCHit*)sipmtdchits[i];
302  if(sipmtdchit->rocid == 78 && sipmtdchit->slot == 8 && sipmtdchit->channel == 30) {
303  locLEDRefTdcTime = (double)((sipmtdchit->time));
304  japp->RootFillLock(this); //ACQUIRE ROOT FILL LOCK
305  hLEDRefTdcTime->Fill(locLEDRefTdcTime);
306  japp->RootFillUnLock(this); //ACQUIRE ROOT FILL LOCK
307  locLEDRefTime = locLEDRefTdcTime;
308  }
309  }
310  }
311 */
312 
313  // FILL HISTOGRAMS
314  // Since we are filling histograms local to this plugin, it will not interfere with other ROOT operations: can use plugin-wide ROOT fill lock
315  japp->RootFillLock(this); //ACQUIRE ROOT FILL LOCK
316 
317  if (digihits.size() > 0) dirc_num_events->Fill(1);
318 
319  // Fill digihit hists
320  int NDigiHits[] = {0,0};
321  hDigiHit_NtdcHits[loc_itrig]->Fill(digihits.size());
322  for (const auto& hit : digihits) {
323  int box = (hit->channel < Nchannels) ? 1 : 0;
324  int channel = (hit->channel < Nchannels) ? hit->channel : (hit->channel - Nchannels);
325  NDigiHits[box]++;
326  hDigiHit_Box[loc_itrig]->Fill(box);
327  hDigiHit_pixelOccupancy[box][loc_itrig]->Fill(locDIRCGeometry->GetPixelRow(hit->channel), locDIRCGeometry->GetPixelColumn(hit->channel));
328  hDigiHit_tdcTime[box][loc_itrig]->Fill(hit->time);
329  hDigiHit_tdcTimeVsChannel[box][loc_itrig]->Fill(channel,hit->time);
330  }
331  hDigiHit_NtdcHitsVsBox[loc_itrig]->Fill(0.,NDigiHits[0]); hDigiHit_NtdcHitsVsBox[loc_itrig]->Fill(1.,NDigiHits[1]);
332 
333  // Loop over calibrated hits to get mean for reference time
334  double locRefTime = 0;
335  int locNHits = 0;
336  double locFirstFiberTime = 128.1; // 205.5; used for no time offset
337  for (const auto& hit : hits) {
338  int channel = (hit->ch < Nchannels) ? hit->ch : (hit->ch - Nchannels);
339  int pmtrow = locDIRCGeometry->GetPmtRow(channel);
340  if(pmtrow < 6 && fabs(hit->t-locFirstFiberTime) < 5.) {
341  //cout<<pmtrow<<" "<<hit->t<<endl;
342  locRefTime += hit->t;
343  locNHits++;
344  }
345  else if(pmtrow > 5 && pmtrow < 12 && fabs(hit->t-locFirstFiberTime-10) < 5.) {
346  //cout<<pmtrow<<" "<<hit->t<<endl;
347  locRefTime += (hit->t - 10);
348  locNHits++;
349  }
350  else if(pmtrow > 11 && pmtrow < 18 && fabs(hit->t-locFirstFiberTime-20) < 5.) {
351  //cout<<pmtrow<<" "<<hit->t<<endl;
352  locRefTime += (hit->t - 20);
353  locNHits++;
354  }
355  //cout<<"locRefTime "<<locRefTime<<" "<<locNHits<<endl;
356  }
357  locRefTime /= locNHits;
358  hRefTime->Fill(locRefTime);
359  //if(locReferenceClockTime%2 == 0)
360  // locRefTime += 4.0;
361 
362  // Fill calibrated-hit hists
363  int NHits[] = {0,0};
364  bool ledFiber[3] = {false, false, false};
365  for (const auto& hit : hits) {
366  int box = (hit->ch < Nchannels) ? 1 : 0;
367  int channel = (hit->ch < Nchannels) ? hit->ch : (hit->ch - Nchannels);
368  int pmtrow = locDIRCGeometry->GetPmtRow(channel);
369  if(pmtrow < 6) ledFiber[0] = true;
370  else if(pmtrow < 12) ledFiber[1] = true;
371  else ledFiber[2] = true;
372  hHit_Box[loc_itrig]->Fill(box);
373  NHits[box]++;
374  hHit_pixelOccupancy[box][loc_itrig]->Fill(locDIRCGeometry->GetPixelRow(hit->ch), locDIRCGeometry->GetPixelColumn(hit->ch));
375  hHit_TimeOverThreshold[box][loc_itrig]->Fill(hit->tot);
376  hHit_TimeOverThresholdVsChannel[box][loc_itrig]->Fill(channel,hit->tot);
377  hHit_tdcTime[box][loc_itrig]->Fill(hit->t);
378  hHit_tdcTimeVsEvent[box][loc_itrig]->Fill(eventnumber,hit->t);
379  hHit_tdcTimeVsChannel[box][loc_itrig]->Fill(channel,hit->t);
380 
381  // LED specific histograms
382  if(locDIRCLEDTrig) {
383  hHit_tdcTimeDiffEvent[box]->Fill(hit->t-locRefTime);
384  hHit_tdcTimeDiffVsChannel[box]->Fill(channel,hit->t-locRefTime);
385 
386  if(locLEDRefTdcTime > 0) {
387  hHit_TimeEventMeanVsLEDRef[box]->Fill(locRefTime,locLEDRefTdcTime);
388  hHit_TimeDiffEventMeanLEDRefVsTimestamp[box]->Fill(locReferenceClockTime, locRefTime-locLEDRefTdcTime);
389  }
390 
391  if(box==1 && channel==2490) {
392  hLEDRefTdcChannelTimeDiff->Fill(hit->t-locLEDRefTdcTime);
393  hLEDRefTdcVsChannelTime->Fill(hit->t,locLEDRefTdcTime);
394  hLEDRefAdcVsChannelTime->Fill(hit->t,locLEDRefAdcTime);
395  }
396 
397  double locDeltaT = hit->t - locRefTime;
398  if(ledFiber[1]) locDeltaT -= 10.;
399  if(ledFiber[2]) locDeltaT -= 20.;
400  hHit_Timewalk[box][channel]->Fill(hit->tot, locDeltaT);
401  }
402 
403  }
404  hHit_NHits[loc_itrig]->Fill(NHits[0]+NHits[1]);
405  hHit_NHitsVsBox[loc_itrig]->Fill(0.,NHits[0]); hHit_NHitsVsBox[loc_itrig]->Fill(1.,NHits[1]);
406 
407  japp->RootFillUnLock(this); //RELEASE ROOT FILL LOCK
408 
409  return NOERROR;
410 }
411 
412 
413 //----------------------------------------------------------------------------------
414 
415 
417  // This is called whenever the run number changes, before it is
418  // changed to give you a chance to clean up before processing
419  // events from the next run number.
420  return NOERROR;
421 }
422 
423 
424 //----------------------------------------------------------------------------------
425 
426 
428  // Called before program exit after event processing is finished.
429  return NOERROR;
430 }
431 
432 
433 //----------------------------------------------------------------------------------
434 //----------------------------------------------------------------------------------
jerror_t erun(void)
Called everytime run number changes, provided brun has been called.
static TH1I * hRefTime
static TH1I * hLEDRefIntegral
static TH2I * hHit_tdcTimeVsChannel[Nboxes][2]
const int NmultDigi
static TH2I * hHit_tdcTimeVsEvent[Nboxes][2]
static TH1I * hHit_tdcTimeDiffEvent[Nboxes]
File: DDIRCLEDRef.h.
Definition: DDIRCLEDRef.h:12
static TH2I * hLEDRefIntegralVsTdcTime
const int Nboxes
static TH1I * hDigiHit_tdcTime[Nboxes][2]
static TH2I * hHit_TimeEventMeanVsLEDRef[Nboxes]
jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber)
Called everytime a new run number is detected.
static TH2I * hHit_TimeOverThresholdVsChannel[Nboxes][2]
const int NmultBins
TDirectory * mainDir
Definition: p2k_hists.C:2
static TH2I * hLEDRefTdcVsChannelTime
trig[33-1]
const int Npixelrows
static TH1I * hLEDRefTdcChannelTimeDiff
const int Npixelcolumns
JApplication * japp
static TH2I * hHit_Timewalk[Nboxes][Nchannels]
jerror_t fini(void)
Called after last event of last event source has been processed.
static TH1I * hLEDRefAdcTime
static TH2I * hHit_NHitsVsBox[2]
static TH1I * dirc_num_events
static TH1I * hHit_NHits[2]
static TH2I * hDigiHit_tdcTimeVsChannel[Nboxes][2]
InitPlugin_t InitPlugin
jerror_t init(void)
Called once at program start.
float t_fADC
Definition: DDIRCLEDRef.h:19
static TH2I * hHit_TimeDiffEventMeanLEDRefVsTimestamp[Nboxes]
static TH1I * hDigiHit_NtdcHits[2]
static TH1I * hHit_tdcTime[Nboxes][2]
static TH2I * hDigiHit_NtdcHitsVsBox[2]
static TH1I * hDigiHit_Box[2]
const int Nmult
static TH1I * hHit_TimeOverThreshold[Nboxes][2]
float integral
Definition: DDIRCLEDRef.h:18
float t_TDC
Definition: DDIRCLEDRef.h:20
const int Nchannels
static TH2I * hDigiHit_pixelOccupancy[Nboxes][2]
static TH2I * hLEDRefAdcVsChannelTime
static TH1I * hLEDRefTdcTime
jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber)
Called every event.
static TH2I * hHit_tdcTimeDiffVsChannel[Nboxes]
static TH2I * hHit_pixelOccupancy[Nboxes][2]
static TH1I * hHit_Box[2]
static TH2I * hLEDRefAdcVsTdcTime