1 #include <ktracker/SRawEvent.h>
12 const double DT = 4.0/9.0;
13 if (n_bin <= 0)
return;
15 time_hi = time_lo + n_bin * DT;
18 while (n_dt * DT * n_bin < time_hi - time_lo) n_dt++;
19 n_bin = (int)((time_hi - time_lo) / (n_dt * DT));
20 int bin_ce = (int)((time_hi + time_lo) / 2 / DT);
21 time_lo = DT * (bin_ce - n_bin / 2.0);
22 time_hi = DT * (bin_ce + n_bin / 2.0);
36 memset(occ_det, 0,
sizeof(
int[
N_DET+1]));
37 for (
int i_hit = 0; i_hit < raw->
getNHitsAll(); i_hit++) {
39 if (in_time && (!hit.
isInTime()))
continue;
57 occ_D0 = occ_D1 = occ_D2 = occ_D3 = 0;
58 for (
int i = 1; i <= 6; i++) occ_D0 += occ_det[i];
59 for (
int i = 7; i <= 12; i++) occ_D1 += occ_det[i];
60 for (
int i = 13; i <= 18; i++) occ_D2 += occ_det[i];
61 for (
int i = 19; i <= 30; i++) occ_D3 += occ_det[i];
Definition of hit structure.
void FindTaiwanTdcBinning(int &n_bin, double &time_lo, double &time_hi)
Find a proper set of "n_bin", "time_lo" and "time_hi".
void GetOccupancy(SRawEvent *raw, const bool in_time, int occ_det[N_DET+1])
Get the occupancy of each detector (plane).