/cvi/instr/AitSipmDAQ/Ait.cws |
---|
12,13 → 12,11 |
Number of Projects = 1 |
Active Project = 1 |
Project 0001 = "Ait.prj" |
Project 0001 Folder Source Files Collapsed = True |
Project 0001 FolderId 1 Collapsed = True |
Drag Bar Left = 428 |
Window Top = 41 |
Window Left = 19 |
Window Bottom = 760 |
Window Right = 1281 |
Window Top = 299 |
Window Left = 114 |
Window Bottom = 993 |
Window Right = 1476 |
Maximized = False |
Maximized Children = True |
Max32 Number Of Errors = 20 |
32,7 → 30,7 |
Hide Windows = False |
Break At First Statement = False |
Sort Type = "File Name" |
Number of Opened Files = 0 |
Number of Opened Files = 9 |
Window Confinement Region Enabled = True |
MainColumnWidth = 411 |
FileDateColumnWidth = 70 |
50,7 → 48,7 |
[File 0001] |
Path = "/c/home/cvi/instr/HISTO/H1D.fp" |
File Type = "Function Panel" |
Disk Date = 3604311472 |
Disk Date = 3604315072 |
In Projects = "1," |
Window Top = 268 |
Window Left = 131 |
60,7 → 58,7 |
[File 0002] |
Path = "/c/home/cvi/instr/HISTO/H2D.fp" |
File Type = "Function Panel" |
Disk Date = 3604311472 |
Disk Date = 3604315072 |
In Projects = "1," |
Window Top = 154 |
Window Left = 71 |
70,7 → 68,7 |
[File 0003] |
Path = "/c/home/cvi/instr/HISTO/H3D.fp" |
File Type = "Function Panel" |
Disk Date = 3604311472 |
Disk Date = 3604315072 |
In Projects = "1," |
Window Top = 230 |
Window Left = 111 |
80,74 → 78,139 |
[File 0004] |
Path = "/c/home/cvi/instr/MIKRO/MIKRO.fp" |
File Type = "Function Panel" |
Disk Date = 3604311476 |
Disk Date = 3604315076 |
In Projects = "1," |
[File 0005] |
Path = "/c/home/cvi/instr/uSMC/uSMC.fp" |
File Type = "Function Panel" |
Disk Date = 3604311473 |
Disk Date = 3604315073 |
In Projects = "1," |
[File 0006] |
Path = "/c/home/cvi/instr/AitSipmDAQ/AitInterface.c" |
File Type = "CSource" |
Disk Date = 3604311475 |
Path = "/c/home/cvi/instr/AitSipmDAQ/XYSCAN.uir" |
File Type = "User Interface Resource" |
Disk Date = 3604902358 |
In Projects = "1," |
Window Top = 192 |
Window Left = 91 |
Source Window State = "1,1004,1004,1004,56,61,61,0,0,0,0,704,0,0,0,0,985,0,1004,56,349,683,1,13," |
Window Top = 95 |
Window Left = 42 |
Window Height = 206 |
Window Width = 683 |
Window Z-Order = 9 |
[File 0007] |
Path = "/c/home/cvi/instr/AitSipmDAQ/AitGui.c" |
File Type = "CSource" |
Disk Date = 3604766959 |
Disk Date = 3605871788 |
In Projects = "1," |
Window Top = 33 |
Window Left = 10 |
Source Window State = "1,757,757,757,23,35,23,0,0,0,0,1,0,1,0,0,740,0,774,39,349,587,1,0," |
Window Z-Order = 1 |
Source Window State = "1,198,198,198,17,18,17,0,0,112,0,1,0,1,0,33,541,0,564,71,349,587,1,0," |
[File 0008] |
Path = "/c/home/cvi/instr/uSMC/uSMC.c" |
File Type = "CSource" |
Disk Date = 3604315076 |
In Projects = "" |
Window Top = 157 |
Window Left = 74 |
Window Z-Order = 5 |
Source Window State = "1,118,118,118,5,21,21,0,0,80,0,0,0,0,0,22,250,0,309,35,310,683,1,0," |
[File 0009] |
Path = "/c/home/cvi/instr/AitSipmDAQ/AitInterface.c" |
File Type = "CSource" |
Disk Date = 3604315075 |
In Projects = "1," |
Window Top = 192 |
Window Left = 91 |
Window Z-Order = 2 |
Source Window State = "1,281,281,281,9,22,22,0,0,80,0,704,0,0,0,25,131,0,143,8,349,683,1,13," |
[File 0010] |
Path = "/c/home/cvi/instr/AitSipmDAQ/AitGui.uir" |
File Type = "User Interface Resource" |
Disk Date = 3604766959 |
Disk Date = 3604770559 |
In Projects = "1," |
Window Top = 40 |
Window Left = 11 |
Window Height = 349 |
Window Width = 683 |
Window Z-Order = 8 |
[File 0009] |
Path = "/c/home/cvi/instr/AitSipmDAQ/XYSCAN.uir" |
File Type = "User Interface Resource" |
Disk Date = 3604766959 |
In Projects = "1," |
[File 0011] |
Path = "/c/home/cvi/instr/HISTO/H1D.c" |
File Type = "CSource" |
Disk Date = 3604315072 |
In Projects = "" |
Window Top = 126 |
Window Left = 58 |
Window Z-Order = 4 |
Source Window State = "1,0,0,0,0,0,0,0,0,80,0,0,0,0,0,22,56,0,67,6,310,683,1,0," |
[File 0012] |
Path = "/c/home/cvi/instr/HISTO/H2D.c" |
File Type = "CSource" |
Disk Date = 3605871871 |
In Projects = "" |
Window Top = 33 |
Window Left = 10 |
Window Z-Order = 3 |
Source Window State = "1,290,290,290,0,34,34,0,0,80,0,0,0,0,0,20,267,0,289,69,284,683,1,0," |
[File 0013] |
Path = "/c/home/cvi/instr/uSMC/uSMC.h" |
File Type = "Include" |
Disk Date = 3604315076 |
In Projects = "" |
Window Top = 64 |
Window Left = 26 |
Window Z-Order = 7 |
Source Window State = "1,35,35,35,13,22,22,0,3,80,0,0,0,0,0,22,4,0,35,13,310,683,1,0," |
[File 0014] |
Path = "/c/Program Files (x86)/National Instruments/CVI2013/toolslib/toolbox/toolbox.h" |
File Type = "Include" |
Disk Date = 3486528000 |
In Projects = "" |
Window Top = 95 |
Window Left = 42 |
Window Height = 206 |
Window Width = 683 |
Window Z-Order = 6 |
Source Window State = "1,348,348,348,8,13,13,0,3,80,0,0,0,0,0,22,337,0,348,8,310,683,1,0," |
[File 0010] |
[File 0015] |
Path = "/c/home/cvi/instr/AitSipmDAQ/AitMduManager.lib" |
File Type = "Library" |
Disk Date = 3604311477 |
Disk Date = 3604315077 |
In Projects = "1," |
[File 0011] |
[File 0016] |
Path = "/c/home/cvi/instr/uSMC/msvc/USMCDLL.lib" |
File Type = "Library" |
Disk Date = 3604311472 |
Disk Date = 3604315072 |
In Projects = "1," |
[File 0012] |
[File 0017] |
Path = "/c/home/cvi/instr/AitSipmDAQ/AitInterface.h" |
File Type = "Include" |
Disk Date = 3604311477 |
Disk Date = 3604315077 |
In Projects = "1," |
Window Top = 154 |
Window Left = 71 |
Source Window State = "1,14,15,14,5,26,5,0,0,0,0,0,0,0,0,0,11,0,14,15,349,771,1,0," |
[Tab Order] |
Tab 0001 = "/c/home/cvi/instr/AitSipmDAQ/XYSCAN.uir" |
Tab 0002 = "/c/home/cvi/instr/AitSipmDAQ/AitGui.c" |
Tab 0003 = "/c/home/cvi/instr/uSMC/uSMC.c" |
Tab 0004 = "/c/home/cvi/instr/AitSipmDAQ/AitInterface.c" |
Tab 0005 = "/c/home/cvi/instr/AitSipmDAQ/AitGui.uir" |
Tab 0006 = "/c/home/cvi/instr/uSMC/uSMC.h" |
Tab 0007 = "/c/Program Files (x86)/National Instruments/CVI2013/toolslib/toolbox/toolbox.h" |
Tab 0008 = "/c/home/cvi/instr/HISTO/H1D.c" |
Tab 0009 = "/c/home/cvi/instr/HISTO/H2D.c" |
[Default Build Config 0001 Debug] |
Generate Browse Info = True |
Enable Uninitialized Locals Runtime Warning = True |
/cvi/instr/AitSipmDAQ/AitGui.c |
---|
543,7 → 543,7 |
MIKRO_Init(2,0); |
#endif |
#ifdef uSMC_USB |
uSMC_Open(); |
if (uSMC_Open()) MessagePopup("SMC Error","SMC Open Failed"); |
for (int i=0; i<3; i++) { |
node[i]=uSMC_FindSerial(serials[i])+1; |
uSMC_Init(node[i],1); |
741,6 → 741,16 |
direction = -1; |
GetCtrlVal(panel, SCAN_STEPY, &step); |
break; |
case SCAN_BF : |
axis = 3; |
direction = 1; |
GetCtrlVal(panel, SCAN_STEPZ, &step); |
break; |
case SCAN_BB : |
axis = 3; |
direction = -1; |
GetCtrlVal(panel, SCAN_STEPZ, &step); |
break; |
} |
#ifdef MIKRO |
{ |
749,6 → 759,7 |
MIKRO_GetPosition(axis,&n); |
if (axis == 1) SetCtrlVal (panel, SCAN_XP, n); |
if (axis == 2) SetCtrlVal (panel, SCAN_YP, n); |
if (axis == 3) SetCtrlVal (panel, SCAN_ZP, n); |
} |
#endif // MIKRO |
759,6 → 770,7 |
uSMC_GetPosition(node[axis-1],&n); |
if (axis == 1) SetCtrlVal (panel, SCAN_XP, n); |
if (axis == 2) SetCtrlVal (panel, SCAN_YP, n); |
if (axis == 3) SetCtrlVal (panel, SCAN_ZP, n); |
} |
#endif // MIKRO |
} |
814,10 → 826,32 |
return 0; |
} |
int CVICALLBACK GoZCB (int panel, int control, int event, |
void *callbackData, int eventData1, int eventData2) { |
int n2; |
switch (event) { |
case EVENT_COMMIT: |
GetCtrlVal (panel, SCAN_ZG, &n2); |
#ifdef MIKRO |
MIKRO_MoveTo(3,n2); |
MIKRO_GetPosition(3,&n2); |
#endif |
#ifdef uSMC_USB |
uSMC_MoveTo(node[2],n2); |
uSMC_GetPosition(node[2],&n2); |
#endif |
SetCtrlVal (panel, SCAN_ZP, n2); |
break; |
} |
return 0; |
} |
int CVICALLBACK GetCurrentPositionCB (int panel, int control, int event, |
void *callbackData, int eventData1, int eventData2) { |
int n[2]; |
int n[3]; |
switch (event) { |
case EVENT_COMMIT: { |
#ifdef MIKRO |
825,6 → 859,8 |
SetCtrlVal (panel, SCAN_XP, n[0]); |
MIKRO_GetPosition(2,&n[1]); |
SetCtrlVal (panel, SCAN_YP, n[1]); |
MIKRO_GetPosition(3,&n[2]); |
SetCtrlVal (panel, SCAN_ZP, n[2]); |
#endif |
#ifdef uSMC_USB |
uSMC_GetPosition(node[0],&n[0]); |
831,6 → 867,8 |
SetCtrlVal (panel, SCAN_XP, n[0]); |
uSMC_GetPosition(node[1],&n[1]); |
SetCtrlVal (panel, SCAN_YP, n[1]); |
uSMC_GetPosition(node[2],&n[2]); |
SetCtrlVal (panel, SCAN_ZP, n[2]); |
#endif |
break; |
} |
/cvi/instr/AitSipmDAQ/XYSCAN.h |
---|
1,65 → 1,72 |
/**************************************************************************/ |
/* LabWindows/CVI User Interface Resource (UIR) Include File */ |
/* */ |
/* WARNING: Do not add to, delete from, or otherwise modify the contents */ |
/* of this include file. */ |
/**************************************************************************/ |
#include <userint.h> |
#ifdef __cplusplus |
extern "C" { |
#endif |
/* Panels and Controls: */ |
#define SCAN 1 |
#define SCAN_OPENMAIN 2 /* control type: command, callback function: OpenMainCB */ |
#define SCAN_BD 3 /* control type: command, callback function: MoveStageCB */ |
#define SCAN_BR 4 /* control type: command, callback function: MoveStageCB */ |
#define SCAN_GETPOSITION 5 /* control type: command, callback function: GetCurrentPositionCB */ |
#define SCAN_SCAN 6 /* control type: command, callback function: StartCB */ |
#define SCAN_BU 7 /* control type: command, callback function: MoveStageCB */ |
#define SCAN_HO 8 /* control type: command, callback function: HomeCB */ |
#define SCAN_BL 9 /* control type: command, callback function: MoveStageCB */ |
#define SCAN_XG 10 /* control type: numeric, callback function: (none) */ |
#define SCAN_YG 11 /* control type: numeric, callback function: (none) */ |
#define SCAN_IX 12 /* control type: numeric, callback function: (none) */ |
#define SCAN_IY 13 /* control type: numeric, callback function: (none) */ |
#define SCAN_NSTEPSX 14 /* control type: numeric, callback function: (none) */ |
#define SCAN_NSTEPSY 15 /* control type: numeric, callback function: (none) */ |
#define SCAN_STEPX 16 /* control type: numeric, callback function: (none) */ |
#define SCAN_STEPY 17 /* control type: numeric, callback function: (none) */ |
#define SCAN_STARTX 18 /* control type: numeric, callback function: (none) */ |
#define SCAN_STARTY 19 /* control type: numeric, callback function: (none) */ |
#define SCAN_XP 20 /* control type: numeric, callback function: (none) */ |
#define SCAN_YP 21 /* control type: numeric, callback function: (none) */ |
#define SCAN_GY 22 /* control type: command, callback function: GoYCB */ |
#define SCAN_GX 23 /* control type: command, callback function: GoXCB */ |
#define SCAN_PORT 24 /* control type: numeric, callback function: (none) */ |
/* Control Arrays: */ |
/* (no control arrays in the resource file) */ |
/* Menu Bars, Menus, and Menu Items: */ |
/* (no menu bars in the resource file) */ |
/* Callback Prototypes: */ |
int CVICALLBACK GetCurrentPositionCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK GoXCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK GoYCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK HomeCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK MoveStageCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK OpenMainCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK StartCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
#ifdef __cplusplus |
} |
#endif |
/**************************************************************************/ |
/* LabWindows/CVI User Interface Resource (UIR) Include File */ |
/* */ |
/* WARNING: Do not add to, delete from, or otherwise modify the contents */ |
/* of this include file. */ |
/**************************************************************************/ |
#include <userint.h> |
#ifdef __cplusplus |
extern "C" { |
#endif |
/* Panels and Controls: */ |
#define SCAN 1 |
#define SCAN_OPENMAIN 2 /* control type: command, callback function: OpenMainCB */ |
#define SCAN_BB 3 /* control type: command, callback function: MoveStageCB */ |
#define SCAN_BD 4 /* control type: command, callback function: MoveStageCB */ |
#define SCAN_BR 5 /* control type: command, callback function: MoveStageCB */ |
#define SCAN_GETPOSITION 6 /* control type: command, callback function: GetCurrentPositionCB */ |
#define SCAN_BF 7 /* control type: command, callback function: MoveStageCB */ |
#define SCAN_SCAN 8 /* control type: command, callback function: StartCB */ |
#define SCAN_BU 9 /* control type: command, callback function: MoveStageCB */ |
#define SCAN_HO 10 /* control type: command, callback function: HomeCB */ |
#define SCAN_ZG 11 /* control type: numeric, callback function: (none) */ |
#define SCAN_BL 12 /* control type: command, callback function: MoveStageCB */ |
#define SCAN_XG 13 /* control type: numeric, callback function: (none) */ |
#define SCAN_YG 14 /* control type: numeric, callback function: (none) */ |
#define SCAN_IX 15 /* control type: numeric, callback function: (none) */ |
#define SCAN_IY 16 /* control type: numeric, callback function: (none) */ |
#define SCAN_NSTEPSX 17 /* control type: numeric, callback function: (none) */ |
#define SCAN_NSTEPSY 18 /* control type: numeric, callback function: (none) */ |
#define SCAN_STEPX 19 /* control type: numeric, callback function: (none) */ |
#define SCAN_STEPZ 20 /* control type: numeric, callback function: (none) */ |
#define SCAN_STEPY 21 /* control type: numeric, callback function: (none) */ |
#define SCAN_ZP 22 /* control type: numeric, callback function: (none) */ |
#define SCAN_GZ 23 /* control type: command, callback function: GoZCB */ |
#define SCAN_STARTX 24 /* control type: numeric, callback function: (none) */ |
#define SCAN_STARTY 25 /* control type: numeric, callback function: (none) */ |
#define SCAN_XP 26 /* control type: numeric, callback function: (none) */ |
#define SCAN_YP 27 /* control type: numeric, callback function: (none) */ |
#define SCAN_GY 28 /* control type: command, callback function: GoYCB */ |
#define SCAN_GX 29 /* control type: command, callback function: GoXCB */ |
#define SCAN_PORT 30 /* control type: numeric, callback function: (none) */ |
/* Control Arrays: */ |
/* (no control arrays in the resource file) */ |
/* Menu Bars, Menus, and Menu Items: */ |
/* (no menu bars in the resource file) */ |
/* Callback Prototypes: */ |
int CVICALLBACK GetCurrentPositionCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK GoXCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK GoYCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK GoZCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK HomeCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK MoveStageCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK OpenMainCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
int CVICALLBACK StartCB(int panel, int control, int event, void *callbackData, int eventData1, int eventData2); |
#ifdef __cplusplus |
} |
#endif |
/cvi/instr/AitSipmDAQ/XYSCAN.uir |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/cvi/instr/AitSipmDAQ/data/aitana.cxx |
---|
9,13 → 9,13 |
#include <TLegend.h> |
// Program za analizo podatkov zajetih z AITSiPMDAQ |
int aitana( const char *fname="a1.dat", int range=10, float cut=500, int *offset = NULL) |
int aitana( const char *fname="a1.dat", int range=5, float cut=300, int *offset = NULL) |
{ |
int debug=0; |
//int off[4]={507,521,497,459}; |
int off[4]={87,125,95,80}; |
//int off[4]={198,203,190,150}; /// run 1 |
int off[4]={120,120,120,120}; /// run 6 |
if (offset) for (int i=0;i<4;i++){off[i]=offset[i];}; |
gStyle->SetOptStat(0); |
char rootname[0xFF]; |
27,7 → 27,7 |
TH1F *hadcsum; |
TH1F *hadcsumx; |
TH1F *hadcsumy; |
TH2F *hxy; |
TH2F *hxy,*hxy1,*hxy2; |
TH2F *h2d=NULL; |
TH2F *h2dx=NULL; |
TH2F *h2dy=NULL; |
42,8 → 42,9 |
hadcsum=new TH1F("adcsum","adcsum",200,0.5,8*200*range+0.5); |
hadcsumx=new TH1F("adcsumx","adcsumx",200,0.5,200*range+0.5); |
hadcsumy=new TH1F("adcsumy","adcsumy",200,0.5,200*range+0.5); |
hxy=new TH2F("hxy","Center of gravity;ycog(a.u.);xcog(a.u.)",200,0,1,200,0,1); |
hxy=new TH2F("hxy","Center of gravity;ycog(a.u.);xcog(a.u.)",200,-0.1,1.1,200,-0.1,1.1); |
hxy1=new TH2F("hxy1","Center of gravity for position 1;ycog(a.u.);xcog(a.u.)",200,-0.1,1.1,200,-0.1,1.1); |
hxy2=new TH2F("hxy2","Center of gravity for position 2;ycog(a.u.);xcog(a.u.)",200,-0.1,1.1,200,-0.1,1.1); |
FILE *fin=fopen(fname,"rb"); |
if (fin==NULL) { |
printf("Error opening file %s\n",fname); |
81,7 → 82,8 |
a[j]=adc[j]&0xFFF; |
//sum+=a[j]; |
hadc[j]->Fill(a[j]); |
b[j]=a[j]-off[j]+10; |
b[j]=a[j]-off[j]; |
if (b[j]< 0) b[j]=0; |
sum+=b[j]; |
} |
hadcsum->Fill(sum); |
95,6 → 97,8 |
if (sum>cut) { |
hxy->Fill(y,x); |
if (pos[3]==poshdr[6]/4 && pos[4]==poshdr[7]/4) hxy1->Fill(y,x); |
if (pos[3]==poshdr[6]/4*3 && pos[4]==poshdr[7]/4*3) hxy2->Fill(y,x); |
if (hxcorr) hxcorr->Fill(pos[0],y); |
if (hycorr) hycorr->Fill(pos[1],x); |
} |
161,10 → 165,10 |
c= new TCanvas("c1","ait reconstruction",750,50,700,700); |
c->Divide(2,3); |
c->Divide(2,4); |
if (!h2d){ |
c->Clear(); |
c->Divide(1,4); |
c->Divide(2,3); |
} |
171,19 → 175,21 |
hxy->SetMinimum(-1); |
hxy->SetMaximum(1000); |
c->cd(1)->SetLogz(); hxy->DrawCopy("colz"); |
c->cd(4)->SetLogy(); hadcsum->DrawCopy(); |
c->cd(3)->SetLogz(); hxy1->DrawCopy("colz"); |
c->cd(4)->SetLogz(); hxy2->DrawCopy("colz"); |
c->cd(2)->SetLogy(); hadcsum->DrawCopy(); |
if (h2d){ |
hxcorr->SetMinimum(-1); |
hycorr->SetMinimum(-1); |
c->cd(5); hxcorr->DrawCopy("colz"); |
c->cd(6); hycorr->DrawCopy("colz"); |
c->cd(7); hxcorr->DrawCopy("colz"); |
c->cd(8); hycorr->DrawCopy("colz"); |
} |
TH1D *px = hxy->ProjectionX("_px",0,-1); |
c->cd(2); px->DrawCopy(); |
c->cd(5); px->DrawCopy(); |
TH1D *py = hxy->ProjectionY("_py",0,-1); |
c->cd(3); py->DrawCopy(); |
c->cd(6); py->DrawCopy(); |
c->Modified(); |
c->Update(); |