Subversion Repositories f9daq

Rev

Rev 40 | Rev 50 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 40 Rev 47
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 15400  // Right edge of SiPM+Lightguide
33
#define OFFSETX 5220  // Right edge of SiPM+Lightguide
34
#define OFFSETY 6400 // Lower edge of SiPM+Lightguide
34
#define OFFSETY 5860 // 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 = +368*TDC_BIN; // ns
94
  const double c_tdcOffset = +96*TDC_BIN; // ns, SiPM4    
95
   
-
 
96
  printf(" Data to root conversion program\nUsage:\nd2r(input file name <without .dat>, debug on/off, TDC cut +-[ns])\n\n");
95
  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);
96
  printf(" OFFSETS: \n     x: %d\n     y: %d\n     t:%f\n", OFFSETX, OFFSETY, c_tdcOffset);
98
 
97
 
99
  char fullname[256];
98
  char fullname[256];
100
  char sbuff[256];
99
  char sbuff[256];