Low-Energy Muon (LEM) Experiment  0.5.1
tof_ana_module.c
Go to the documentation of this file.
1 /********************************************************************\
2 
3  Name: tof_ana_module.c
4  Created by: Thomas Prokscha
5  Date: 01-Apr-2007
6 
7  Contents: Ana module to create time-of-flight and beam spot
8  histograms for LEM experiment
9 
10 
11 \********************************************************************/
12 
13 /*-- Include files -------------------------------------------------*/
14 
15 /* standard includes */
16 #include <stdio.h>
17 #include <time.h>
18 #include <string.h>
19 #include <math.h>
20 
21 /* midas includes */
22 #include "midas.h"
23 #include "rmidas.h"
24 #include "v1190.h"
25 #include "experim.h"
26 #include "nemu_experim.h"
27 
28 #ifdef HAVE_HBOOK
29 #include <cfortran.h>
30 #include <hbook.h>
31 #else
32 /* root includes */
33 #include <TH1F.h>
34 #include <TH2F.h>
35 #include <TTree.h>
36 #endif
37 
38 /*-- ODB Parameters ------------------------------------------------*/
39 //extern RUNINFO runinfo;
40 //extern EXP_PARAM exp_param;
41 extern RUNINFO runinfo;
44 TOFANAMODULE_PARAM_STR(tof_ana_param_str);
45 
47 
48 /*-- Module declaration --------------------------------------------*/
49 INT tof_init(void);
50 INT tof_ana(EVENT_HEADER*,void*);
51 INT tof_bor(INT run_number);
52 INT tof_eor(INT run_number);
53 
54 ANA_MODULE tof_ana_module = {
55  "TOFAnaModule", /* module name */
56  "Thomas Prokscha", /* author */
57  tof_ana, /* event routine */
58  tof_bor, /* BOR routine */
59  tof_eor, /* EOR routine */
60  tof_init, /* init routine */
61  NULL, /* exit routine */
62  &tof_ana_param, /* parameter structure */
63  sizeof(tof_ana_param), /* structure size */
64  (const char **)tof_ana_param_str, /* initial parameters */
65 };
66 
67 /*-- other global variables ----------------------------------------*/
68 #define N_TOFHIST 17
69 #define N_POSHIST 8
70 #ifndef HAVE_HBOOK
71 static TH1F* hTOFHist[2*N_TOFHIST]; // double number of histograms for Ext. stimulus ON/OFF
72 static TH1F* hProjHist[2*2]; // double number of histograms for Ext. stimulus ON/OFF
73 static TH2F* hPosHist[2*N_POSHIST]; // double number of histograms for Ext. stimulus ON/OFF
74 //the following objects are from mana.c
75 extern TFolder *gManaHistosFolder;
76 extern TObjArray *gHistoFolderStack;
77 #endif
78 
79 // rotation cosine and sine
80 static float rotCos, rotSin;
81 
82 /*-- INIT routine --------------------------------------------------*/
83 INT tof_init(void)
84 {
85 HNDLE hDB;
86 POSI_BANK_STR(posi_bank_str);
87 extern char runname[256];
88 char title[256], name[256];
89 int nbin, i;
90 float xlow, xhigh;
91 
92  cm_get_experiment_database(&hDB, NULL);
93  db_create_record(hDB, 0, "/Equipment/Trigger/Variables/POSI", strcomb(posi_bank_str));
94 
95  // histograms with external stimulus OFF
96  for (i=0; i<N_TOFHIST; i++){
97  sprintf(name, "hTOF%02d", i);
98  sprintf(title, "%s, Ext. OFF, Run %s_%04d", tof_ana_param.histotitles.toftitles.titles[i],
99  runname, runinfo.run_number);
100  nbin = tof_ana_param.histobinning.tofbin.histonbin[i];
101  xlow = tof_ana_param.histobinning.tofbin.histoxlow[i];
102  xhigh = tof_ana_param.histobinning.tofbin.histoxup[i];
103  hTOFHist[i] = H1_BOOK(name, title, nbin, xlow, xhigh);
104  }
105 
106  // histograms with external stimulus ON
107  for (i=N_TOFHIST; i<2*N_TOFHIST; i++){
108  sprintf(name, "hTOF%02d", i+N_OFFSET_ONOFF_HISTOGRAMS-N_TOFHIST);
109  sprintf(title, "%s, Ext. ON, Run %s_%04d", tof_ana_param.histotitles.toftitles.titles[i-N_TOFHIST],
110  runname, runinfo.run_number);
111  nbin = tof_ana_param.histobinning.tofbin.histonbin[i-N_TOFHIST];
112  xlow = tof_ana_param.histobinning.tofbin.histoxlow[i-N_TOFHIST];
113  xhigh = tof_ana_param.histobinning.tofbin.histoxup[i-N_TOFHIST];
114  hTOFHist[i] = H1_BOOK(name, title, nbin, xlow, xhigh);
115  }
116 
117  // histograms with external stimulus OFF
118  for (i=0; i<2; i++){
119  sprintf(name, "hProj%02d", i);
120  sprintf(title, "%s, Ext. OFF, Run %s_%04d", tof_ana_param.histotitles.projtitles.titles[i],
121  runname, runinfo.run_number);
122  nbin = tof_ana_param.histobinning.projbin.histonbin[i];
123  xlow = tof_ana_param.histobinning.projbin.histoxlow[i];
124  xhigh = tof_ana_param.histobinning.projbin.histoxup[i];
125  hProjHist[i] = H1_BOOK(name, title, nbin, xlow, xhigh);
126  }
127 
128  // histograms with external stimulus ON
129  for (i=2; i<4; i++){
130  sprintf(name, "hProj%02d", i+N_OFFSET_ONOFF_HISTOGRAMS-2);
131  sprintf(title, "%s, Ext. ON, Run %s_%04d", tof_ana_param.histotitles.projtitles.titles[i-2],
132  runname, runinfo.run_number);
133  nbin = tof_ana_param.histobinning.projbin.histonbin[i-2];
134  xlow = tof_ana_param.histobinning.projbin.histoxlow[i-2];
135  xhigh = tof_ana_param.histobinning.projbin.histoxup[i-2];
136  hProjHist[i] = H1_BOOK(name, title, nbin, xlow, xhigh);
137  }
138 
139  // histograms with external stimulus OFF
140  for (i=0; i<N_POSHIST; i++){
141  sprintf(name, "hPos%02d", i);
142  sprintf(title, "%s, EXT. OFF, Run %s_%04d", tof_ana_param.histotitles.positiontitles.titles[i],
143  runname, runinfo.run_number);
144  nbin = tof_ana_param.histobinning.positionbin.histonbin[i];
145  xlow = tof_ana_param.histobinning.positionbin.histoxlow[i];
146  xhigh = tof_ana_param.histobinning.positionbin.histoxup[i];
147  hPosHist[i] = H2_BOOK(name, title, nbin, xlow, xhigh, nbin, xlow, xhigh);
148  }
149 
150  // histograms with external stimulus ON
151  for (i=N_POSHIST; i<2*N_POSHIST; i++){
152  sprintf(name, "hPos%02d", i+N_OFFSET_ONOFF_HISTOGRAMS-N_POSHIST);
153  sprintf(title, "%s, EXT. ON, Run %s_%04d", tof_ana_param.histotitles.positiontitles.titles[i-N_POSHIST],
154  runname, runinfo.run_number);
155  nbin = tof_ana_param.histobinning.positionbin.histonbin[i-N_POSHIST];
156  xlow = tof_ana_param.histobinning.positionbin.histoxlow[i-N_POSHIST];
157  xhigh = tof_ana_param.histobinning.positionbin.histoxup[i-N_POSHIST];
158  hPosHist[i] = H2_BOOK(name, title, nbin, xlow, xhigh, nbin, xlow, xhigh);
159  }
160 
161  rotCos = rotSin = 0.;
162 
163  return SUCCESS;
164 }
165 
166 /*-- BOR routine ---------------------------------------------------*/
167 
168 INT tof_bor(INT run_number)
169 {
170 int i;
171 char title[256];
172 extern char runname[256];
173 
174  // histograms with external stimulus OFF
175  for (i=0; i<N_TOFHIST; i++){
176  sprintf(title, "%s, Ext. OFF, Run %s_%04d", tof_ana_param.histotitles.toftitles.titles[i],
177  runname, runinfo.run_number);
178  hTOFHist[i]->SetTitle(title);
179  }
180 
181  // histograms with external stimulus ON
182  for (i=N_TOFHIST; i<2*N_TOFHIST; i++){
183  sprintf(title, "%s, Ext. ON, Run %s_%04d", tof_ana_param.histotitles.toftitles.titles[i-N_TOFHIST],
184  runname, runinfo.run_number);
185  hTOFHist[i]->SetTitle(title);
186  }
187 
188  // histograms with external stimulus OFF
189  for (i=0; i<2; i++){
190  sprintf(title, "%s, Ext. OFF, Run %s_%04d", tof_ana_param.histotitles.projtitles.titles[i],
191  runname, runinfo.run_number);
192  hProjHist[i]->SetTitle(title);
193  }
194 
195  // histograms with external stimulus ON
196  for (i=2; i<4; i++){
197  sprintf(title, "%s, Ext. ON, Run %s_%04d", tof_ana_param.histotitles.projtitles.titles[i-2],
198  runname, runinfo.run_number);
199  hProjHist[i]->SetTitle(title);
200  }
201 
202  // histograms with external stimulus OFF
203  for (i=0; i<N_POSHIST; i++){
204  if ( i == 2 || i == 3 )
205  sprintf(title, "%s, Ext. OFF, %d - %d Run %s_%04d",
206  tof_ana_param.histotitles.positiontitles.titles[i],
207  (int) tof_ana_param.tofm2fmin,
208  (int) tof_ana_param.tofm2fmax,
209  runname, runinfo.run_number);
210  else
211  sprintf(title, "%s, Ext. OFF, Run %s_%04d", tof_ana_param.histotitles.positiontitles.titles[i],
212  runname, runinfo.run_number);
213 
214  hPosHist[i]->SetTitle(title);
215  }
216 
217  // histograms with external stimulus ON
218  for (i=N_POSHIST; i<2*N_POSHIST; i++){
219  if ( i == 2+N_POSHIST || i == 3+N_POSHIST )
220  sprintf(title, "%s, Ext. ON, %d - %d Run %s_%04d",
221  tof_ana_param.histotitles.positiontitles.titles[i-N_POSHIST],
222  (int) tof_ana_param.tofm2fmin,
223  (int) tof_ana_param.tofm2fmax,
224  runname, runinfo.run_number);
225  else
226  sprintf(title, "%s, Ext. ON, Run %s_%04d", tof_ana_param.histotitles.positiontitles.titles[i-N_POSHIST],
227  runname, runinfo.run_number);
228 
229  hPosHist[i]->SetTitle(title);
230  }
231 
232  if ( trigger_settings.event_1_settings.td_master )
233  masterChannel = TD;
234  else
236 
237  rotCos = cos(tof_ana_param.rotationangle/180.*3.14);
238  rotSin = sin(tof_ana_param.rotationangle/180.*3.14);
239 
240  return SUCCESS;
241 }
242 
243 /*-- EOR routine ---------------------------------------------------*/
244 
245 INT tof_eor(INT run_number)
246 {
247 
248  return SUCCESS;
249 }
250 
251 /*-- event routine -------------------------------------------------*/
258 INT tof_ana(EVENT_HEADER *pheader, void *pevent)
259 {
260 INT n, i, j, channel, counter[N_TDC_CHANNELS];
261 DWORD *ptdc, tdc_data[N_TDC_CHANNELS][DATA_N_HITS];
262 float tof_TD_M2F, tof_TD_M2R;
263 float x, y, x1, x2, y1, y2, timesum;
264 float rotX, rotY; //for beam spot rotation
265 POSI_BANK *pposi;
266 BOOL TIMEcut, SUMcut, TOFcut, foundTD, foundM2, foundBC; /* flag for time cuts on x,y position */
267 LEM_DATA *lem_data;
268 INT difftime_last, difftime_now;
269 
270  /* look for TDC0 bank */
271  n = bk_locate(pevent, "TDC0", &ptdc);
272  if (n == 0 )
273  return 1;
274 
275  // return if we don't have the NEW_EVENT_FLAG present
276  if ( !(ptdc[0] & NEW_EVENT_MASK)) return 1;
277 
278  // return if EVENT_0_TYPE (Muons on MCP1)
279  if ( ptdc[0] & (EVENT_0_TYPE<<16) ) return 1;
280 
281  TIMEcut = SUMcut = TOFcut = foundM2 = foundTD = foundBC = FALSE;
282  memset(&counter, 0x00, sizeof(counter));
283  memset(&tdc_data, 0x00, sizeof(tdc_data));
284 
285  for (i = 1; i < n; i++){ // i=0 is a control word, including the event length
286  lem_data = (LEM_DATA *) &ptdc[i];
287  channel = lem_data->channel;
288  if ( channel > N_TDC_CHANNELS-1 ) continue; //not understood how this can happen, but it can happen
289  //after a HV break at the moderator (all channel get "many" hits, like
290  //a "flash" in the detectors
291  tdc_data[channel][counter[channel]] = lem_data->data;
292  counter[channel]++;
293 
294  switch (channel){
295  case TD:
296  foundTD = TRUE;
297  break;
298 
299  case MCP2F:
300  foundM2 = TRUE;
301  break;
302 
303  case BCL1: case BCL2: case BCL3: case BCL4: case BCR1: case BCR2: case BCR3: case BCR4:
304  foundBC = TRUE;
305  break;
306 
307  default:
308  break;
309  }
310  }
311 
312  if ( foundM2 ){
313  // don't consider pileup counts here
314  tof_TD_M2F = (float) (tdc_data[MCP2F][0] - tdc_data[TD][0]);
315  tof_TD_M2R = (float) (tdc_data[MCP2R][0] - tdc_data[TD][0]);
316  x1 = (float) (tdc_data[MCP2X1][0] - tdc_data[MCP2F][0]);
317  x2 = (float) (tdc_data[MCP2X2][0] - tdc_data[MCP2F][0]);
318  y1 = (float) (tdc_data[MCP2Y1][0] - tdc_data[MCP2F][0]);
319  y2 = (float) (tdc_data[MCP2Y2][0] - tdc_data[MCP2F][0]);
320  timesum = x1 + x2 + y1 + y2;
321  if ( ptdc[0] & EXTOFF1_FLAG){
322  hTOFHist[0]->Fill(tof_TD_M2F, 1.);
323  hTOFHist[1]->Fill(tof_TD_M2R, 1.);
324  hTOFHist[2]->Fill(x1, 1.);
325  hTOFHist[3]->Fill(x2, 1.);
326  hTOFHist[4]->Fill(y1, 1.);
327  hTOFHist[5]->Fill(y2, 1.);
328  hTOFHist[6]->Fill(timesum, 1.);
329  }
330  if ( ptdc[0] & EXTON1_FLAG){
331  hTOFHist[0+N_TOFHIST]->Fill(tof_TD_M2F, 1.);
332  hTOFHist[1+N_TOFHIST]->Fill(tof_TD_M2R, 1.);
333  hTOFHist[2+N_TOFHIST]->Fill(x1, 1.);
334  hTOFHist[3+N_TOFHIST]->Fill(x2, 1.);
335  hTOFHist[4+N_TOFHIST]->Fill(y1, 1.);
336  hTOFHist[5+N_TOFHIST]->Fill(y2, 1.);
337  hTOFHist[6+N_TOFHIST]->Fill(timesum, 1.);
338  }
339 
340  x = (x1 - x2) * tof_ana_param.scalefactor + tof_ana_param.xoffset_mm_; // scale to mm and add offset in mm
341  y = (y1 - y2) * tof_ana_param.scalefactor + tof_ana_param.yoffset_mm_; // scale to mm and add offset in mm
342  rotX = rotCos*x - rotSin*y;
343  rotY = rotSin*x + rotCos*y;
344 
345  bk_create(pevent, "POSI", TID_STRUCT, (void**)&pposi);
346  pposi->x = rotX;
347  pposi->y = rotY;
348  bk_close(pevent, pposi+1);
349 
350  if ((tof_ana_param.timemin <= x1 && x1 <= tof_ana_param.timemax) &&
351  (tof_ana_param.timemin <= x2 && x2 <= tof_ana_param.timemax) &&
352  (tof_ana_param.timemin <= y1 && y1 <= tof_ana_param.timemax) &&
353  (tof_ana_param.timemin <= y2 && y2 <= tof_ana_param.timemax) )
354  TIMEcut = TRUE;
355  else
356  TIMEcut = FALSE;
357 
358  if ( tof_ana_param.timesummin <= timesum && timesum <= tof_ana_param.timesummax)
359  SUMcut = TRUE;
360  else
361  SUMcut = FALSE;
362 
363  if ( tof_ana_param.tofm2fmin <= tof_TD_M2F && tof_TD_M2F <= tof_ana_param.tofm2fmax)
364  TOFcut = TRUE;
365  else
366  TOFcut = FALSE;
367 
368  if ( TIMEcut && SUMcut ){
369  if ( ptdc[0] & EXTOFF1_FLAG){
370  hPosHist[0]->Fill(pposi->x, pposi->y, 1.); // "fine" binning
371  hPosHist[1]->Fill(pposi->x, pposi->y, 1.); // "course" binning
372  hPosHist[4]->Fill(x1+x2, x1-x2, 1.); // control histogram
373  hPosHist[5]->Fill(y1+y2, y1-y2, 1.); // control histogram
374  hPosHist[6]->Fill(x1, x2, 1.); // control histogram
375  hPosHist[7]->Fill(y1, y2, 1.); // control histogram
376  }
377  if ( ptdc[0] & EXTON1_FLAG){
378  hPosHist[0+N_POSHIST]->Fill(pposi->x, pposi->y, 1.); // "fine" binning
379  hPosHist[1+N_POSHIST]->Fill(pposi->x, pposi->y, 1.); // "course" binning
380  hPosHist[4+N_POSHIST]->Fill(x1+x2, x1-x2, 1.); // control histogram
381  hPosHist[5+N_POSHIST]->Fill(y1+y2, y1-y2, 1.); // control histogram
382  hPosHist[6+N_POSHIST]->Fill(x1, x2, 1.); // control histogram
383  hPosHist[7+N_POSHIST]->Fill(y1, y2, 1.); // control histogram
384  }
385  }
386  if (TIMEcut && SUMcut && TOFcut ){
387  if ( ptdc[0] & EXTOFF1_FLAG){
388  hPosHist[2]->Fill(pposi->x, pposi->y, 1.); // "course" binning
389  hPosHist[3]->Fill(pposi->x, pposi->y, 1.);
390  hProjHist[0]->Fill(pposi->x, 1.);
391  hProjHist[1]->Fill(pposi->y, 1.);
392  }
393  if ( ptdc[0] & EXTON1_FLAG){
394  hPosHist[2+N_POSHIST]->Fill(pposi->x, pposi->y, 1.); // "course" binning
395  hPosHist[3+N_POSHIST]->Fill(pposi->x, pposi->y, 1.);
396  hProjHist[0+2]->Fill(pposi->x, 1.);
397  hProjHist[1+2]->Fill(pposi->y, 1.);
398  }
399  }
400  }
401 
402  if ( foundBC ){
403  // find the next most distant BC hit with respect to TD and fill it in the TOF histogram
404 /*
405  difftime_now = difftime_last = 0;
406  if ( foundTD ){
407  for ( i=BCL1; i<=BCR4; i++){
408  if ( counter[i] == 0 ) continue;
409  for (j = 0; j<counter[i]; j++){
410  difftime_now = tdc_data[TD][0] - tdc_data[i][j];
411  if ( (difftime_now > 0) &&
412  (difftime_now < trigger_settings.tof_bc_window) &&
413  (difftime_now > difftime_last))
414  difftime_last = difftime_now;
415  }
416  }
417  hTOFHist[7]->Fill( (float) difftime_last, 1.);
418 */
419  // find the nearest BC hit with respect to TD and fill it in the TOF histogram
420 /* difftime_now = difftime_last = -2*trigger_settings.tof_bc_window;
421  for ( i=BCL1; i<=BCR4; i++){
422  if ( counter[i] == 0 ) continue;
423  for (j = 0; j<counter[i]; j++){
424  difftime_now = tdc_data[TD][0] - tdc_data[i][j];
425  if ( (difftime_now < 0) && (fabs(difftime_now) < trigger_settings.tof_bc_window) &&
426  (difftime_now > difftime_last)) //we have negative differences
427  difftime_last = difftime_now;
428  }
429  if ( counter[i] > 0 ) break; //leave loop when a hit was found
430  }
431  difftime_last += trigger_settings.tof_bc_window; //to have "forward" timing
432  if ( ptdc[0] & EXTOFF1_FLAG)
433  hTOFHist[7]->Fill( (float) difftime_last, 1.);
434  */
435  // this is for forward timing, when "BC" signal occurs after TD
436  difftime_now = difftime_last = 0.;
437  if ( foundTD ){
438  for ( i=BCL1; i<=BCR4; i++){
439  if ( counter[i] == 0 ) continue;
440  difftime_last = tdc_data[i][0] - tdc_data[TD][0];
441 
442  if ( ptdc[0] & EXTOFF1_FLAG){
443  hTOFHist[7]->Fill( (float) difftime_last, 1.);
444  switch (i){
445  case BCR1:
446  hTOFHist[9]->Fill( (float) difftime_last, 1.);
447  break;
448 
449  case BCR2:
450  hTOFHist[10]->Fill( (float) difftime_last, 1.);
451  break;
452 
453  case BCR3:
454  hTOFHist[11]->Fill( (float) difftime_last, 1.);
455  break;
456 
457  case BCR4:
458  hTOFHist[12]->Fill( (float) difftime_last, 1.);
459  break;
460 
461  default:
462  break;
463  }
464  }
465  }
466 
467  if ( ptdc[0] & EXTON1_FLAG)
468  hTOFHist[7+N_TOFHIST]->Fill( (float) difftime_last, 1.);
469  }
470  /*
471  difftime_now = difftime_last = 0;
472  if ( foundM2 ){
473  for ( i=BCL1; i<=BCR4; i++){
474  if ( counter[i] == 0 ) continue;
475  for (j = 0; j<counter[i]; j++){
476  difftime_now = tdc_data[MCP2_F][0] - tdc_data[i][j];
477  if ( (difftime_now > 0) &&
478  (difftime_now < trigger_settings.tof_bc_window) &&
479  (difftime_now > difftime_last))
480  difftime_last = difftime_now;
481  }
482  }
483  hTOFHist[8]->Fill( (float) difftime_last, 1.);
484  }
485 */
486  // find the nearest BC hit with respect to MCP2 and fill it in the TOF histogram
487  difftime_now = difftime_last = -2*trigger_settings.tof_bc_window;
488  if ( foundM2 ){
489  for ( i=BCL1; i<=BCR4; i++){
490  if ( counter[i] == 0 ) continue;
491  for (j = 0; j<counter[i]; j++){
492  difftime_now = tdc_data[i][j] - tdc_data[MCP2F][0];
493  if ( (difftime_now < 0) &&
494  ( fabs(difftime_now) < trigger_settings.tof_bc_window) &&
495  (difftime_now > difftime_last))
496  difftime_last = difftime_now;
497  }
498  if ( counter[i] > 0 ) break; //leave loop when a hit was found
499  }
500  difftime_last += trigger_settings.tof_bc_window; //to have "forward" timing
501 
502  if ( ptdc[0] & EXTOFF1_FLAG){
503  hTOFHist[8]->Fill( (float) difftime_last, 1.);
504  switch (i){
505  case BCR1:
506  hTOFHist[13]->Fill( (float) difftime_last, 1.);
507  break;
508 
509  case BCR2:
510  hTOFHist[14]->Fill( (float) difftime_last, 1.);
511  break;
512 
513  case BCR3:
514  hTOFHist[15]->Fill( (float) difftime_last, 1.);
515  break;
516 
517  case BCR4:
518  hTOFHist[16]->Fill( (float) difftime_last, 1.);
519  break;
520 
521  default:
522  break;
523  }
524 
525  }
526  if ( ptdc[0] & EXTON1_FLAG)
527  hTOFHist[8+N_TOFHIST]->Fill( (float) difftime_last, 1.);
528  }
529  }
530 
531  return SUCCESS;
532 }
533 /* ----------------------------------------------------------------------------*\
534  EOF tof_ana_module.c
535 \* ----------------------------------------------------------------------------*/
#define BCR1
Definition: nemu_experim.h:22
WORD channel
Definition: nemu_experim.h:93
#define MCP2R
Definition: nemu_experim.h:50
static TH2F * hPosHist[2 *N_POSHIST]
#define BCR4
Definition: nemu_experim.h:25
#define MCP2X2
Definition: nemu_experim.h:52
#define BCL4
Definition: nemu_experim.h:21
POSI_BANK_STR(posi_bank_str)
INT tof_eor(INT run_number)
struct TOFANAMODULE_PARAM::@4::@8 positiontitles
#define MCP2Y2
Definition: nemu_experim.h:54
TOFANAMODULE_PARAM tof_ana_param
float rotationangle
Definition: experim.h:176
struct TOFANAMODULE_PARAM::@5::@10 projbin
struct TOFANAMODULE_PARAM::@5::@11 positionbin
#define EXTON1_FLAG
flag for &quot;red/green&quot;, &quot;on/off&quot; mode: ON
Definition: nemu_experim.h:68
INT tof_init(void)
char runname[256]
Definition: analyzer.c:92
RUNINFO runinfo
/Runinfo ODB key, defined in from midas.h
Definition: vme_fe.c:193
float x
Definition: experim.h:595
#define MCP2Y1
Definition: nemu_experim.h:53
#define BCL1
Definition: nemu_experim.h:18
#define BCL3
Definition: nemu_experim.h:20
ANA_MODULE tof_ana_module
static TH1F * hProjHist[2 *2]
HNDLE hDB
Definition: write_summary.c:97
struct TRIGGER_SETTINGS::@19 event_1_settings
INT masterChannel
DWORD tof_bc_window
Definition: experim.h:692
INT tof_bor(INT run_number)
static TH1F * hTOFHist[2 *N_TOFHIST]
#define BCR2
Definition: nemu_experim.h:23
#define MCP2F
Definition: nemu_experim.h:49
INT tof_ana(EVENT_HEADER *, void *)
#define DATA_N_HITS
max. of DATA_N_HITS in data file
Definition: nemu_experim.h:66
TOFANAMODULE_PARAM_STR(tof_ana_param_str)
TObjArray * gHistoFolderStack
struct TOFANAMODULE_PARAM::@5::@9 tofbin
#define EXTOFF1_FLAG
flag for &quot;red/green&quot;, &quot;on/off&quot; mode: OFF
Definition: nemu_experim.h:69
struct TOFANAMODULE_PARAM::@4::@6 toftitles
#define BCR3
Definition: nemu_experim.h:24
#define NEW_EVENT_MASK
Definition: nemu_experim.h:67
struct TOFANAMODULE_PARAM::@4 histotitles
TRIGGER_SETTINGS trigger_settings
/Equipment/Trigger/Settings
Definition: vme_fe.c:188
#define N_TDC_CHANNELS
number of TDC channels
Definition: nemu_experim.h:64
#define N_TOFHIST
#define BCL2
Definition: nemu_experim.h:19
static float rotCos
struct TOFANAMODULE_PARAM::@4::@7 projtitles
DWORD data
Definition: nemu_experim.h:92
#define MCP2X1
Definition: nemu_experim.h:51
#define N_OFFSET_ONOFF_HISTOGRAMS
ID offset for &quot;on/off&quot;, &quot;red/green&quot; histograms: no offset means &quot;off&quot;.
Definition: nemu_experim.h:73
#define TD
Definition: nemu_experim.h:17
#define N_POSHIST
float y
Definition: experim.h:596
static float rotSin
#define EVENT_0_TYPE
EVENT type 0 = BC-MCP1-(e+)
Definition: nemu_experim.h:75
TFolder * gManaHistosFolder
struct TOFANAMODULE_PARAM::@5 histobinning