61 (
const char **)mcp1_ana_param_str,
80 char title[256], name[256];
85 sprintf(name,
"hMCP1%02d", i);
90 hMCP1Hist[i] = H1_BOOK(name, title, nbin, xlow, xhigh);
137 INT difftime_last, difftime_now;
138 BOOL foundBC, foundPOS;
142 n = bk_locate(pevent,
"TDC0", &ptdc);
143 if (n == 0 )
return 1;
151 memset(&counter, 0x00,
sizeof(counter));
152 memset(&tdc_data, 0x00,
sizeof(tdc_data));
153 foundBC = foundPOS = FALSE;
155 for (i = 1; i < n; i++){
161 tdc_data[channel][counter[channel]] = lem_data->
data;
178 if ( !foundBC && !foundPOS )
return 1;
196 difftime_now = difftime_last = -2*trigger_settings.
tof_bc_window;
198 if ( counter[i] == 0 )
continue;
199 for (j = 0; j<counter[i]; j++){
200 difftime_now = tdc_data[
MCP1][0] - tdc_data[i][j];
201 if ( (difftime_now < 0) && (fabs(difftime_now) < trigger_settings.
tof_bc_window) &&
202 (difftime_now > difftime_last))
203 difftime_last = difftime_now;
208 hMCP1Hist[0]->Fill( (
float) difftime_last, 1.);
212 difftime_last = tdc_data[
POSMCP1I][0] - tdc_data[
MCP1][0];
213 hMCP1Hist[1]->Fill( (
float) difftime_last, 1.);
216 if ( tdc_data[
MCP1][1] != 0 &&
static TH1F * hMCP1Hist[N_MCP1HIST]
ANA_MODULE mcp1_ana_module
INT mcp1_eor(INT run_number)
struct MCP1ANAMODULE_PARAM::@14 histotitles
RUNINFO runinfo
/Runinfo ODB key, defined in from midas.h
MCP1ANAMODULE_PARAM mcp1_ana_param
INT mcp1_bor(INT run_number)
struct MCP1ANAMODULE_PARAM::@15 histobinning
#define DATA_N_HITS
max. of DATA_N_HITS in data file
TObjArray * gHistoFolderStack
TRIGGER_SETTINGS trigger_settings
/Equipment/Trigger/Settings
#define N_TDC_CHANNELS
number of TDC channels
MCP1ANAMODULE_PARAM_STR(mcp1_ana_param_str)
struct TRIGGER_SETTINGS::@18 event_0_settings
static DWORD dataWindowMuonDecay
#define EVENT_0_TYPE
EVENT type 0 = BC-MCP1-(e+)
INT mcp1_ana(EVENT_HEADER *, void *)
TFolder * gManaHistosFolder