Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 36 → Rev 37

/sipmScan/sipmThreshold.prj
11,10 → 11,10
Warn User If Debugging Release = 1
Flags = 17
Drag Bar Left = 354
Window Top = 512
Window Left = 688
Window Bottom = 1016
Window Right = 1432
Window Top = 121
Window Left = 174
Window Bottom = 625
Window Right = 918
 
[File 0001]
File Type = "User Interface Resource"
21,7 → 21,7
Path = "/c/HOME/dino/sipmScan/include/sipmThreshold_ui.uir"
Res Id = 1
Exclude = False
Disk Date = 3479104556
Disk Date = 3479299749
Project Flags = 0
Window Top = 94
Window Left = 42
33,17 → 33,17
Path = "/c/HOME/dino/sipmScan/src/sipmThreshold.c"
Res Id = 2
Exclude = False
Disk Date = 3479113285
Disk Date = 3479299774
Project Flags = 0
Compile Into Object File = False
Object Format = "Win32-MSVC"
ForceCompile_Debug = False
ForceCompile_Release = True
Window Top = 88
Window Left = 244
Window Top = 91
Window Left = 257
Window Height = 0
Window Width = 0
Source Window State = "1,150,150,150,4,37,38,0,0,108,0,0,0,0,0,55,218,0,249,7,"
Source Window State = "1,150,150,150,4,37,38,0,0,108,0,0,0,0,0,55,629,0,656,37,"
Header Dependencies Line0001 = "1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27,29,30,31,32,3"
Header Dependencies Line0002 = "3,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,56,57,58,"
 
52,7 → 52,7
Path = "/c/HOME/dino/sipmScan/include/sipmThreshold_ui.h"
Res Id = 3
Exclude = False
Disk Date = 3477045406
Disk Date = 3479299749
Project Flags = 0
Window Top = 324
Window Left = 162
245,7 → 245,7
 
[Create Executable]
Executable File_Debug = "/c/HOME/dino/sipmScan/sipmThr_dbg.exe"
Target Creation Date_Debug = 3479113436
Target Creation Date_Debug = 3479459591
Force Creation of Target_Debug = False
Executable File_Release = "/c/HOME/dino/sipmScan/sipmThr.exe"
Target Creation Date_Release = 0
/sipmScan/sipmBias.prj
11,9 → 11,9
Warn User If Debugging Release = 1
Flags = 17
Drag Bar Left = 354
Window Top = 525
Window Top = 512
Window Left = 811
Window Bottom = 1029
Window Bottom = 1016
Window Right = 1555
 
[File 0001]
58,7 → 58,7
Window Width = 0
Source Window State = "1,265,267,267,0,31,32,0,0,146,0,606,0,623,60,52,282,0,308,31,"
Header Dependencies Line0001 = "1,2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,27,29,30,31,32,3"
Header Dependencies Line0002 = "3,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,56,57,58,"
Header Dependencies Line0002 = "3,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,58,59,"
Breakpoint 0001 = "371,0,disabled,"
 
[File 0004]
184,22 → 184,19
Include Path 3 = "/c/HOME/dino/sipmScan/include"
 
[Included Headers]
Header 0055 = "/c/HOME/dino/sipmScan/include/camac.h"
Header 0055 = "/c/HOME/dino/sipmScan/include/sipmThreshold_ui.h"
Header 0058 = "/c/HOME/dino/sipmScan/include/camac.h"
Header 0029 = "/c/MeasurementStudio/cvi/instr/WIENVME_DLL/wienvme_dll.h"
Header 0001 = "/c/MeasurementStudio/cvi/include/utility.h"
Header 0002 = "/c/MeasurementStudio/cvi/include/cvidef.h"
Header 0003 = "/c/MeasurementStudio/cvi/include/cvirte.h"
Header 0004 = "/c/MeasurementStudio/cvi/include/formatio.h"
Header 0005 = "/c/MeasurementStudio/cvi/include/ansi_c.h"
Header 0006 = "/c/MeasurementStudio/cvi/include/ansi/assert.h"
Header 0007 = "/c/MeasurementStudio/cvi/include/ansi/ctype.h"
Header 0008 = "/c/MeasurementStudio/cvi/include/ansi/errno.h"
Header 0009 = "/c/MeasurementStudio/cvi/include/ansi/float.h"
Header 0010 = "/c/MeasurementStudio/cvi/include/ansi/limits.h"
Header 0011 = "/c/MeasurementStudio/cvi/include/ansi/locale.h"
Header 0012 = "/c/MeasurementStudio/cvi/include/ansi/math.h"
Header 0013 = "/c/MeasurementStudio/cvi/include/ansi/setjmp.h"
Header 0014 = "/c/MeasurementStudio/cvi/include/ansi/signal.h"
Header 0015 = "/c/MeasurementStudio/cvi/include/ansi/stdarg.h"
Header 0016 = "/c/MeasurementStudio/cvi/include/ansi/stddef.h"
Header 0017 = "/c/MeasurementStudio/cvi/include/ansi/stdio.h"
210,43 → 207,47
Header 0022 = "/c/MeasurementStudio/cvi/include/ivi.h"
Header 0023 = "/c/MeasurementStudio/cvi/include/visa.h"
Header 0024 = "/c/MeasurementStudio/cvi/include/visatype.h"
Header 0025 = "/c/MeasurementStudio/cvi/include/vpptype.h"
Header 0026 = "/c/MeasurementStudio/cvi/include/rs232.h"
Header 0027 = "/c/MeasurementStudio/cvi/instr/CAENV673A/CAENV673A.h"
Header 0028 = "/c/MeasurementStudio/cvi/instr/CAENV673A/CAENV673A_DEF.h"
Header 0030 = "/c/MeasurementStudio/cvi/sdk/include/windows.h"
Header 0031 = "/c/MeasurementStudio/cvi/sdk/include/windef.h"
Header 0032 = "/c/MeasurementStudio/cvi/sdk/include/winnt.h"
Header 0033 = "/c/MeasurementStudio/cvi/sdk/include/basetsd.h"
Header 0034 = "/c/MeasurementStudio/cvi/sdk/include/Guiddef.h"
Header 0039 = "/c/MeasurementStudio/cvi/sdk/include/winbase.h"
Header 0041 = "/c/MeasurementStudio/cvi/sdk/include/wingdi.h"
Header 0043 = "/c/MeasurementStudio/cvi/sdk/include/winuser.h"
Header 0045 = "/c/MeasurementStudio/cvi/sdk/include/winnls.h"
Header 0050 = "/c/MeasurementStudio/cvi/sdk/include/winsvc.h"
Header 0052 = "/c/MeasurementStudio/cvi/sdk/include/imm.h"
Header 0053 = "/c/MeasurementStudio/cvi/instr/CAENV462/CAENV462.h"
Header 0056 = "/c/MeasurementStudio/cvi/include/userint.h"
Header 0057 = "/c/MeasurementStudio/cvi/include/analysis.h"
Header 0004 = "/c/MeasurementStudio/cvi/include/formatio.h"
Header 0026 = "/c/MeasurementStudio/cvi/include/rs232.h"
Header 0028 = "/c/MeasurementStudio/cvi/instr/CAENV673A/CAENV673A_DEF.h"
Header 0054 = "/c/MeasurementStudio/cvi/instr/CAENV462/CAENV462_DEF.h"
Header 0059 = "/c/HOME/dino/sipmScan/include/sipmBias_ui.h"
Header 0006 = "/c/MeasurementStudio/cvi/include/ansi/assert.h"
Header 0010 = "/c/MeasurementStudio/cvi/include/ansi/limits.h"
Header 0014 = "/c/MeasurementStudio/cvi/include/ansi/signal.h"
Header 0025 = "/c/MeasurementStudio/cvi/include/vpptype.h"
Header 0035 = "/c/MeasurementStudio/cvi/sdk/include/pshpack4.h"
Header 0036 = "/c/MeasurementStudio/cvi/sdk/include/poppack.h"
Header 0037 = "/c/MeasurementStudio/cvi/sdk/include/pshpack2.h"
Header 0038 = "/c/MeasurementStudio/cvi/sdk/include/pshpack8.h"
Header 0039 = "/c/MeasurementStudio/cvi/sdk/include/winbase.h"
Header 0040 = "/c/MeasurementStudio/cvi/sdk/include/winerror.h"
Header 0041 = "/c/MeasurementStudio/cvi/sdk/include/wingdi.h"
Header 0042 = "/c/MeasurementStudio/cvi/sdk/include/pshpack1.h"
Header 0043 = "/c/MeasurementStudio/cvi/sdk/include/winuser.h"
Header 0044 = "/c/MeasurementStudio/cvi/sdk/include/tvout.h"
Header 0045 = "/c/MeasurementStudio/cvi/sdk/include/winnls.h"
Header 0046 = "/c/MeasurementStudio/cvi/sdk/include/wincon.h"
Header 0047 = "/c/MeasurementStudio/cvi/sdk/include/winver.h"
Header 0048 = "/c/MeasurementStudio/cvi/sdk/include/winreg.h"
Header 0049 = "/c/MeasurementStudio/cvi/sdk/include/winnetwk.h"
Header 0050 = "/c/MeasurementStudio/cvi/sdk/include/winsvc.h"
Header 0051 = "/c/MeasurementStudio/cvi/sdk/include/mcx.h"
Header 0052 = "/c/MeasurementStudio/cvi/sdk/include/imm.h"
Header 0053 = "/c/MeasurementStudio/cvi/instr/CAENV462/CAENV462.h"
Header 0054 = "/c/MeasurementStudio/cvi/instr/CAENV462/CAENV462_DEF.h"
Header 0056 = "/c/MeasurementStudio/cvi/include/userint.h"
Header 0057 = "/c/MeasurementStudio/cvi/include/analysis.h"
Header 0058 = "/c/HOME/dino/sipmScan/include/sipmBias_ui.h"
Max Header Number = 58
Max Header Number = 59
 
[Create Executable]
Executable File_Debug = "/c/HOME/dino/sipmScan/sipmBias_dbg.exe"
Target Creation Date_Debug = 3479210500
Target Creation Date_Debug = 3479460502
Force Creation of Target_Debug = False
Executable File_Release = "/c/HOME/dino/sipmScan/sipmBias.exe"
Target Creation Date_Release = 0
/sipmScan/include/sipmThreshold_ui.uir
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/sipmScan/include/sipmThreshold_ui.h
59,14 → 59,17
#define P1_STHRLOW 43
#define P1_STHRUP 44
#define P1_STEP 45
#define P1_TIMER 46 /* callback function: cb_timer */
#define P1_DECORATION 47
#define P1_TEXTMSG 48
#define P1_TEXTMSG_2 49
#define P1_TEXTMSG_3 50
#define P1_TEXTMSG_4 51
#define P1_TEXTMSG_5 52
#define P1_TEXTMSG_6 53
#define P1_SBIAS 46
#define P1_BIAS 47
#define P1_ASD8THR 48
#define P1_TIMER 49 /* callback function: cb_timer */
#define P1_DECORATION 50
#define P1_TEXTMSG 51
#define P1_TEXTMSG_2 52
#define P1_TEXTMSG_3 53
#define P1_TEXTMSG_4 54
#define P1_TEXTMSG_5 55
#define P1_TEXTMSG_6 56
 
 
/* Menu Bars, Menus, and Menu Items: */
/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;
/sipmScan/examples/tdc.C
3,6 → 3,7
#include "TBenchmark.h"
#include "TH1F.h"
#include "TH2F.h"
#include "TH3F.h"
#include "TCanvas.h"
#include "TStyle.h"
#include "TPad.h"
11,7 → 12,7
#include "TSpectrum.h"
#include "stdio.h"
 
#include "include/RTUtil.h"
//#include "include/RTUtil.h"
 
int tdc(char filename[256] = "test", int chX=0, int chY=0, double rangeLeft=-16, double rangeRight=16, bool debug = false)
{
52,9 → 53,11
gStyle->SetCanvasColor(0);
gStyle->SetStatColor(0);
gStyle->SetOptFit(11);
gStyle->SetOptStat(0);
gStyle->SetOptStat("ne");
gStyle->SetPadTopMargin(0.15);
gStyle->SetPadBottomMargin(0.15);
gStyle->SetPadRightMargin(0.15);
gStyle->SetPadLeftMargin(0.12);
gStyle->SetPadLeftMargin(0.15);
//gStyle->SetTitleYOffset(1.4);
TCanvas* canvas1 = new TCanvas("canvas1","canvas1",1000,1000);