Subversion Repositories f9daq

Rev

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

Rev 39 Rev 40
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 4800  // Right edge of SiPM+Lightguide
33
#define OFFSETX 15400  // Right edge of SiPM+Lightguide
34
#define OFFSETY 3400 // Lower edge of SiPM+Lightguide
34
#define OFFSETY 6400 // 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 101... Line 101...
101
  FILE *fp;
101
  FILE *fp;
102
 
102
 
103
  //Chanel information
103
  //Chanel information
104
 
104
 
105
  double tdcOffset[NCH];
105
  double tdcOffset[NCH];
106
  sprintf(fullname, "d2r.ini");
106
  sprintf(fullname, "sipmScan.ini");
107
  if( (fp=fopen(fullname, "rt")) == NULL )
107
  if( (fp=fopen(fullname, "rt")) == NULL )
108
    printf("Cannot open pad centers file %s !!!\n", fullname);
108
    printf("Cannot open pad centers file %s !!!\n", fullname);
109
  else {
109
  else {
110
    printf("Opened pad centers file %s\n", fullname);
110
    printf("Opened pad centers file %s\n", fullname);
111
    char* result = fgets(sbuff,256, fp);
111
    char* result = fgets(sbuff,256, fp);
Line 372... Line 372...
372
                  if(time >= tdcmin && time <= tdcmax) {
372
                  if(time >= tdcmin && time <= tdcmax) {
373
                    h_correctedTDC->Fill((time - tdcOffset[channel]), channel);
373
                    h_correctedTDC->Fill((time - tdcOffset[channel]), channel);
374
                    hnhitsx[channel]->Fill((pos.xset - OFFSETX) * MIKRO_BIN);
374
                    hnhitsx[channel]->Fill((pos.xset - OFFSETX) * MIKRO_BIN);
375
                    hnhitsy[channel]->Fill((pos.yset - OFFSETY) * MIKRO_BIN);          
375
                    hnhitsy[channel]->Fill((pos.yset - OFFSETY) * MIKRO_BIN);          
376
                    //h_threshold->Fill(channel, thr.threshold);
376
                    //h_threshold->Fill(channel, thr.threshold);
377
                    if (position(pos.xset-OFFSETX, pos.yset-OFFSETY, channel)) {
377
                    //if (position(pos.xset-OFFSETX, pos.yset-OFFSETY, channel)) {
378
                    h2d[channel]->Fill((pos.xset - OFFSETX) * MIKRO_BIN, (pos.yset - OFFSETY) * MIKRO_BIN);
378
                    h2d[channel]->Fill((pos.xset - OFFSETX) * MIKRO_BIN, (pos.yset - OFFSETY) * MIKRO_BIN);
379
                    }
379
                    //}
380
                  }
380
                  }
381
                  //gV673A->Fill(data,channel);
381
                  //gV673A->Fill(data,channel);
382
                  //gsumV673A[channel/16]->Fill(data);
382
                  //gsumV673A[channel/16]->Fill(data);
383
                }
383
                }
384
              }
384
              }