59 (
const char **)mcp1_ana_param_str,
78 char title[256], name[256];
83 sprintf(name,
"hMCP1%02d", i);
88 hMCP1Hist[i] = H1_BOOK(name, title, nbin, xlow, xhigh);
133 INT difftime_last, difftime_now;
134 BOOL foundBC, foundPOS;
138 n = bk_locate(pevent,
"TDC0", &ptdc);
139 if (n == 0 )
return 1;
147 memset(&counter, 0x00,
sizeof(counter));
148 memset(&tdc_data, 0x00,
sizeof(tdc_data));
149 foundBC = foundPOS = FALSE;
151 for (
int i=1; i<n; i++){
157 tdc_data[channel][counter[channel]] = lem_data->
data;
174 if ( !foundBC && !foundPOS )
return 1;
179 difftime_now = difftime_last = -2*trigger_settings.
tof_bc_window;
181 if ( counter[i] == 0 )
continue;
182 for (
int j=0; j<counter[i]; j++){
183 difftime_now = tdc_data[
MCP1][0] - tdc_data[i][j];
184 if ( (difftime_now < 0) && (fabs(difftime_now) < trigger_settings.
tof_bc_window) &&
185 (difftime_now > difftime_last))
186 difftime_last = difftime_now;
191 hMCP1Hist[0]->Fill( (
float) difftime_last, 1.);
195 difftime_last = tdc_data[
POSMCP1I][0] - tdc_data[
MCP1][0];
196 hMCP1Hist[1]->Fill( (
float) difftime_last, 1.);
199 if ( tdc_data[
MCP1][1] != 0 &&
ANA_MODULE mcp1_ana_module
struct MCP1ANAMODULE_PARAM::@14 histotitles
INT mcp1_bor(INT run_number)
MCP1ANAMODULE_PARAM_STR(mcp1_ana_param_str)
static DWORD dataWindowMuonDecay
INT mcp1_eor(INT run_number)
TObjArray * gHistoFolderStack
MCP1ANAMODULE_PARAM mcp1_ana_param
TRIGGER_SETTINGS trigger_settings
INT mcp1_ana(EVENT_HEADER *, void *)
struct MCP1ANAMODULE_PARAM::@15 histobinning
#define DATA_N_HITS
max. of DATA_N_HITS in data file
static TH1F * hMCP1Hist[N_MCP1HIST]
TFolder * gManaHistosFolder
#define N_TDC_CHANNELS
number of TDC channels
struct TRIGGER_SETTINGS::@18 event_0_settings
#define EVENT_0_TYPE
EVENT type 0 = BC-MCP1-(e+)