mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-29 09:30:02 +02:00
included without root writing
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@45 113b152e-814d-439b-b186-022a431db7b5
This commit is contained in:
parent
eee5f7f743
commit
98c0bd163e
@ -4,10 +4,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define X_PIXELS 1280
|
|
||||||
#define Y_PIXELS 1
|
|
||||||
#define NPACKETS 2
|
|
||||||
#define BUFFERSIZE 1286
|
|
||||||
|
|
||||||
#define FRAMEMASK 0xFFFFFFFE
|
#define FRAMEMASK 0xFFFFFFFE
|
||||||
#define PACKETMASK 1
|
#define PACKETMASK 1
|
||||||
@ -28,7 +25,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
gotthardModuleData(double c=0): slsReceiverData<uint16_t>(X_PIXELS, Y_PIXELS, NPACKETS, BUFFERSIZE), xtalk(c) {
|
gotthardModuleData(double c=0): slsReceiverData<uint16_t>(xpixels, ypixels, npackets, buffersize), xtalk(c) {
|
||||||
|
|
||||||
uint16_t **dMask;
|
uint16_t **dMask;
|
||||||
int **dMap;
|
int **dMap;
|
||||||
@ -36,23 +33,23 @@ public:
|
|||||||
int initial_offset = 2;
|
int initial_offset = 2;
|
||||||
int offset = initial_offset;
|
int offset = initial_offset;
|
||||||
|
|
||||||
dMask=new uint16_t*[Y_PIXELS];
|
dMask=new uint16_t*[ypixels];
|
||||||
dMap=new int*[Y_PIXELS];
|
dMap=new int*[ypixels];
|
||||||
for (int i = 0; i < Y_PIXELS; i++) {
|
for (int i = 0; i < ypixels; i++) {
|
||||||
dMap[i] = new int[X_PIXELS];
|
dMap[i] = new int[xpixels];
|
||||||
dMask[i] = new uint16_t[X_PIXELS];
|
dMask[i] = new uint16_t[xpixels];
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ix=0; ix<Y_PIXELS; ++ix)
|
for(ix=0; ix<ypixels; ++ix)
|
||||||
for(iy=0; iy<X_PIXELS; ++iy)
|
for(iy=0; iy<xpixels; ++iy)
|
||||||
dMask[ix][iy] = 0x0;
|
dMask[ix][iy] = 0x0;
|
||||||
|
|
||||||
for(ix=0; ix<Y_PIXELS; ++ix){
|
for(ix=0; ix<ypixels; ++ix){
|
||||||
if(ix == (Y_PIXELS/2)){
|
if(ix == (ypixels/2)){
|
||||||
offset += initial_offset;//2
|
offset += initial_offset;//2
|
||||||
offset++;
|
offset++;
|
||||||
}
|
}
|
||||||
for(iy=0; iy<X_PIXELS; ++iy){
|
for(iy=0; iy<xpixels; ++iy){
|
||||||
dMap[ix][iy] = offset;
|
dMap[ix][iy] = offset;
|
||||||
offset++;
|
offset++;
|
||||||
}
|
}
|
||||||
@ -138,10 +135,14 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
double xtalk; /**<output buffer crosstalk correction parameter */
|
double xtalk; /**<output buffer crosstalk correction parameter */
|
||||||
|
const static int xpixels = 1280;
|
||||||
|
const static int ypixels = 1;
|
||||||
|
const static int npackets = 2;
|
||||||
|
const static int buffersize = 1286;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,10 +4,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define X_PIXELS 256
|
|
||||||
#define Y_PIXELS 1
|
|
||||||
#define NPACKETS 1
|
|
||||||
#define BUFFERSIZE 518
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -25,26 +21,26 @@ public:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
gotthardShortModuleData(double c=0): slsReceiverData<uint16_t>(X_PIXELS, Y_PIXELS, NPACKETS, BUFFERSIZE), xtalk(c){
|
gotthardShortModuleData(double c=0): slsReceiverData<uint16_t>(xpixels, ypixels, npackets, buffersize), xtalk(c){
|
||||||
|
|
||||||
uint16_t **dMask;
|
uint16_t **dMask;
|
||||||
int **dMap;
|
int **dMap;
|
||||||
int ix, iy;
|
int ix, iy;
|
||||||
int offset = 2;
|
int offset = 2;
|
||||||
|
|
||||||
dMask=new uint16_t*[Y_PIXELS];
|
dMask=new uint16_t*[ypixels];
|
||||||
dMap=new int*[Y_PIXELS];
|
dMap=new int*[ypixels];
|
||||||
for (int i = 0; i < Y_PIXELS; i++) {
|
for (int i = 0; i < ypixels; i++) {
|
||||||
dMap[i] = new int[X_PIXELS];
|
dMap[i] = new int[xpixels];
|
||||||
dMask[i] = new uint16_t[X_PIXELS];
|
dMask[i] = new uint16_t[xpixels];
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ix=0; ix<Y_PIXELS; ++ix)
|
for(ix=0; ix<ypixels; ++ix)
|
||||||
for(iy=0; iy<X_PIXELS; ++iy)
|
for(iy=0; iy<xpixels; ++iy)
|
||||||
dMask[ix][iy] = 0x0;
|
dMask[ix][iy] = 0x0;
|
||||||
|
|
||||||
for(ix=0; ix<Y_PIXELS; ++ix)
|
for(ix=0; ix<ypixels; ++ix)
|
||||||
for(iy=0; iy<X_PIXELS; ++iy){
|
for(iy=0; iy<xpixels; ++iy){
|
||||||
dMap[ix][iy] = offset;
|
dMap[ix][iy] = offset;
|
||||||
offset++;
|
offset++;
|
||||||
}
|
}
|
||||||
@ -120,7 +116,10 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
double xtalk; /**<output buffer crosstalk correction parameter */
|
double xtalk; /**<output buffer crosstalk correction parameter */
|
||||||
|
const static int xpixels = 256;
|
||||||
|
const static int ypixels = 1;
|
||||||
|
const static int npackets = 1;
|
||||||
|
const static int buffersize = 518;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include "commonModeSubtraction.h"
|
#include "commonModeSubtraction.h"
|
||||||
|
|
||||||
|
|
||||||
#define MYROOT1
|
//#define MYROOT1
|
||||||
|
|
||||||
#ifdef MYROOT1
|
#ifdef MYROOT1
|
||||||
#include <TTree.h>
|
#include <TTree.h>
|
||||||
@ -92,6 +92,8 @@ class singlePhotonDetector {
|
|||||||
setClusterSize(csize);
|
setClusterSize(csize);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
destructor. Deletes the cluster structure and the pdestalSubtraction array
|
destructor. Deletes the cluster structure and the pdestalSubtraction array
|
||||||
*/
|
*/
|
||||||
@ -349,6 +351,9 @@ class singlePhotonDetector {
|
|||||||
// tall->Branch("rms",&(cluster->rms),"rms/D");
|
// tall->Branch("rms",&(cluster->rms),"rms/D");
|
||||||
return tall;
|
return tall;
|
||||||
};
|
};
|
||||||
|
#else
|
||||||
|
/** write cluster to filer*/
|
||||||
|
void writeCluster(FILE* myFile){cluster->write(myFile);};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -373,7 +378,6 @@ class singlePhotonDetector {
|
|||||||
double tot; /**< sum of the 3x3 cluster */
|
double tot; /**< sum of the 3x3 cluster */
|
||||||
double quadTot; /**< sum of the maximum 2x2cluster */
|
double quadTot; /**< sum of the maximum 2x2cluster */
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user