Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 38 → Rev 39

/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 5200 // Right edge of SiPM+Lightguide
#define OFFSETY 5400 // Lower edge of SiPM+Lightguide
#define OFFSETX 4800 // Right edge of SiPM+Lightguide
#define OFFSETY 3400 // 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 5200 // Right edge of SiPM+Lightguide
#define OFFSETY 5300 // Lower edge of SiPM+Lightguide
#define OFFSETX 4800 // Right edge of SiPM+Lightguide
#define OFFSETY 3400 // Lower edge of SiPM+Lightguide
 
#define RUNREC_ID 1
#define ENDREC_ID 2
91,9 → 91,10
int analysisScan(char* dfile0="test", int dbg=0, double tdcCut=5.0)
{
 
const double c_tdcOffset = +2.5; // ns
const double c_tdcOffset = +368*TDC_BIN; // 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,6 → 31,9
# 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
51,6 → 54,7
 
#define IWAIT 200
 
#define POWERSUPPLY 66 // Power supply voltage for SiPM bias
#define NCH 64
 
static int p1h, pID, rID, tfID;
506,6 → 510,10
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) {
613,7 → 621,7
{
double value;
GetCtrlVal (p1h, P1_SASD8THR, &value);
SetDac(0, value);
SetDac(ASD8, value);
}
break;
621,10 → 629,18
{
double value;
GetCtrlVal (p1h, P1_SAMPDISSHTHR, &value);
SetDac(1, value);
SetDac(AMPDISSH, value);
 
}
break;
case P1_BIAS:
{
double value;
GetCtrlVal (p1h, P1_SBIAS, &value);
value -= POWERSUPPLY;
SetDac(SIPM, value);
}
break;
}