Rev 35 | Rev 40 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 35 | Rev 39 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | // data format |
28 | // data format |
29 | #define MAXDATA 16 |
29 | #define MAXDATA 16 |
30 | #define NCH 64 |
30 | #define NCH 64 |
31 | #define TDC_BIN 1.0416 // 1 TDC bin in ns |
31 | #define TDC_BIN 1.0416 // 1 TDC bin in ns |
32 | #define MIKRO_BIN 0.49609/1000. //1 mikro step in mm; stage MM3MF |
32 | #define MIKRO_BIN 0.49609/1000. //1 mikro step in mm; stage MM3MF |
33 | #define OFFSETX |
33 | #define OFFSETX 4800 // Right edge of SiPM+Lightguide |
34 | #define OFFSETY |
34 | #define OFFSETY 3400 // Lower edge of SiPM+Lightguide |
35 | 35 | ||
36 | #define RUNREC_ID 1 |
36 | #define RUNREC_ID 1 |
37 | #define ENDREC_ID 2 |
37 | #define ENDREC_ID 2 |
38 | #define POSREC_ID 3 |
38 | #define POSREC_ID 3 |
39 | #define EVTREC_ID 4 |
39 | #define EVTREC_ID 4 |
Line 89... | Line 89... | ||
89 | // ------------------------------------------------------------------------------ |
89 | // ------------------------------------------------------------------------------ |
90 | 90 | ||
91 | int analysisScan(char* dfile0="test", int dbg=0, double tdcCut=5.0) |
91 | int analysisScan(char* dfile0="test", int dbg=0, double tdcCut=5.0) |
92 | { |
92 | { |
93 | 93 | ||
94 | const double c_tdcOffset = + |
94 | const double c_tdcOffset = +368*TDC_BIN; // ns |
95 | 95 | ||
96 | printf(" Data to root conversion program\nUsage:\nd2r(input file name <without .dat>, debug on/off, TDC cut +-[ns])\n\n"); |
96 | printf(" Data to root conversion program\nUsage:\nd2r(input file name <without .dat>, debug on/off, TDC cut +-[ns])\n\n"); |
- | 97 | printf(" OFFSETS: \n x: %d\n y: %d\n t:%f\n", OFFSETX, OFFSETY, c_tdcOffset); |
|
97 | 98 | ||
98 | char fullname[256]; |
99 | char fullname[256]; |
99 | char sbuff[256]; |
100 | char sbuff[256]; |
100 | FILE *fp; |
101 | FILE *fp; |
101 | 102 |