Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 36 → Rev 37

/sipmScan/src/analysisThreshold.cpp
91,7 → 91,7
 
// ------------------------------------------------------------------------------
 
int d2r(char* dfile0="test", int dbg=0, double tdcCut=5.0)
int analysisThreshold(char* dfile0="test", int dbg=0, double tdcCut=5.0)
{
const double c_tdcOffset = 1; // ns
369,7 → 369,7
double tdcmin = tdcOffset[channel] - tdcCut;
double tdcmax = tdcOffset[channel] + tdcCut;
double time = data*TDC_BIN - tdcOffset[channel];
if(time >= -tdcCut and time <= tdcCut) {
if((time >= -tdcCut) && (time <= tdcCut)) {
h_correctedTDC->Fill(channel, thr.threshold/1000.0, time);
hnhitsx[channel]->Fill((pos.xset - OFFSETX) * MIKRO_BIN);
hnhitsy[channel]->Fill((pos.yset - OFFSETY) * MIKRO_BIN);
466,7 → 466,7
int position(int x, int y, int channel)
{
int flag = 0;
if ( (x > (padCenter[channel][0] - 5000)) and (x < (padCenter[channel][0] + 5000)) and
(y > (padCenter[channel][1] - 5000)) and (y < (padCenter[channel][1] + 5000)) ) flag = 1;
if ( (x > (padCenter[channel][0] - 5000)) && (x < (padCenter[channel][0] + 5000)) &&
(y > (padCenter[channel][1] - 5000)) && (y < (padCenter[channel][1] + 5000)) ) flag = 1;
return flag;
}
/sipmScan/src/sipmThreshold.c
545,8 → 545,9
SetCtrlVal(p1h, P1_ADCHL, runrec.xy-2);
 
QueueUserEvent (1000, p1h, P1_RESET);
//QueueUserEvent (1000, p1h, P1_ASD8THR);
QueueUserEvent (1000, p1h, P1_ASD8THR);
QueueUserEvent (1000, p1h, P1_AMPDISSHTHR);
QueueUserEvent (1000, p1h, P1_BIAS);
do {
GetUserEvent (1, &pID, &rID);
switch (rID) {
650,14 → 651,21
SetCtrlAttribute (p1h, P1_ADC, ATTR_YMAP_MODE, status);
update_plots();
break;
/*case P1_ASD8THR:
case P1_ASD8THR:
{
double value;
GetCtrlVal (p1h, P1_SASD8THR, &value);
GetCtrlVal (p1h, P1_STHRLOW, &value);
SetDac(0, value);
}
break;*/
break;
case P1_BIAS:
{
double value;
GetCtrlVal (p1h, P1_SBIAS, &value);
SetDac(2, value);
}
break;
case P1_AMPDISSHTHR:
{
double value;