Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 39 → Rev 38

/sipmScan/src/analysisBias.cpp
32,8 → 32,8
#define NCH 64
#define TDC_BIN 1.0416 // 1 TDC bin in ns
#define MIKRO_BIN 0.49609/1000. //1 mikro step in mm; stage MM3MF
#define OFFSETX 4800 // Right edge of SiPM+Lightguide
#define OFFSETY 3400 // Lower edge of SiPM+Lightguide
#define OFFSETX 5200 // Right edge of SiPM+Lightguide
#define OFFSETY 5400 // Lower edge of SiPM+Lightguide
 
#define RUNREC_ID 1
#define ENDREC_ID 2
/sipmScan/src/analysisScan.cpp
30,8 → 30,8
#define NCH 64
#define TDC_BIN 1.0416 // 1 TDC bin in ns
#define MIKRO_BIN 0.49609/1000. //1 mikro step in mm; stage MM3MF
#define OFFSETX 4800 // Right edge of SiPM+Lightguide
#define OFFSETY 3400 // Lower edge of SiPM+Lightguide
#define OFFSETX 5200 // Right edge of SiPM+Lightguide
#define OFFSETY 5300 // Lower edge of SiPM+Lightguide
 
#define RUNREC_ID 1
#define ENDREC_ID 2
91,10 → 91,9
int analysisScan(char* dfile0="test", int dbg=0, double tdcCut=5.0)
{
 
const double c_tdcOffset = +368*TDC_BIN; // ns
const double c_tdcOffset = +2.5; // ns
printf(" Data to root conversion program\nUsage:\nd2r(input file name <without .dat>, debug on/off, TDC cut +-[ns])\n\n");
printf(" OFFSETS: \n x: %d\n y: %d\n t:%f\n", OFFSETX, OFFSETY, c_tdcOffset);
char fullname[256];
char sbuff[256];
/sipmScan/src/sipmScan.c
31,9 → 31,6
# define USE_CAMAC
# include "camac.h"
# define NDAC 1
# define ASD8 0 // channels
# define AMPDISSH 1
# define SIPM 2
//# define CAEN_V673A 0x10110000 // FMF
# define CAEN_V673A 0x22220000 // IJS
# define CAEN_V462 0x100300
54,7 → 51,6
 
#define IWAIT 200
 
#define POWERSUPPLY 66 // Power supply voltage for SiPM bias
#define NCH 64
 
static int p1h, pID, rID, tfID;
510,10 → 506,6
QueueUserEvent (1000, p1h, P1_RESET);
QueueUserEvent (1000, p1h, P1_ASD8THR);
QueueUserEvent (1000, p1h, P1_AMPDISSHTHR);
QueueUserEvent (1000, p1h, P1_BIAS);
printf("BIAS offset set to: %d\n", POWERSUPPLY);
do {
GetUserEvent (1, &pID, &rID);
switch (rID) {
621,7 → 613,7
{
double value;
GetCtrlVal (p1h, P1_SASD8THR, &value);
SetDac(ASD8, value);
SetDac(0, value);
}
break;
629,18 → 621,10
{
double value;
GetCtrlVal (p1h, P1_SAMPDISSHTHR, &value);
SetDac(AMPDISSH, value);
SetDac(1, value);
 
}
break;
case P1_BIAS:
{
double value;
GetCtrlVal (p1h, P1_SBIAS, &value);
value -= POWERSUPPLY;
SetDac(SIPM, value);
}
break;
}